/*
Theme Name: RGAA Audit Theme
Theme URI:
Description: Thème minimaliste pour la déclaration d'accessibilité RGAA 4.1.2. Styles inspirés du Système de Design de l'État (DSFR).
Version: 1.0.0
Author: RGAA Audit
Text Domain: rgaa-theme
Requires at least: 6.0
Requires PHP: 7.4
*/

/* === Variables DSFR === */
:root {
    --dsfr-blue: #6C63FC;
    --dsfr-blue-light: #e3e3fd;
    --dsfr-green: #dc6e25;
    --dsfr-green-light: #b8fec9;
    --dsfr-red: #D84162;
    --dsfr-red-light: #ffe9e6;
    --dsfr-yellow: #695240;
    --dsfr-grey-50: #f6f6f6;
    --dsfr-grey-100: #eeeeee;
    --dsfr-grey-200: #e5e5e5;
    --dsfr-grey-425: #929292;
    --dsfr-grey-625: #666666;
    --dsfr-grey-900: #1e1e1e;
    --dsfr-font: "Marianne", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --dsfr-max-width: 78rem;
}

/* === Reset & Base === */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--dsfr-font);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dsfr-grey-900);
    background-color: #fff;
    margin: 0;
    padding: 0;
}

a {
    color: var(--dsfr-blue);
    text-decoration: underline;
}

a:hover,
a:focus {
    text-decoration: none;
}

a:focus-visible {
    outline: 2px solid var(--dsfr-blue);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
}

/* === Skip Link === */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--dsfr-blue);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 10000;
    text-decoration: none;
    font-weight: 700;
}

.skip-link:focus {
    top: 0;
}

/* === Header === */
.site-header {
    background-color: #fff;
    border-bottom: 2px solid var(--dsfr-blue);
}

.site-header .header-inner {
    max-width: var(--dsfr-max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-branding .republic-mark {
    font-size: 0.75rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--dsfr-blue);
    font-weight: 700;
    border-right: 2px solid var(--dsfr-red);
    padding-right: 1rem;
}

.site-logo img {
    height: 50px;
    width: auto;
    display: block;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: var(--dsfr-grey-900);
    text-decoration: none;
}

.site-title a:hover {
    text-decoration: underline;
}

.site-description {
    font-size: 0.875rem;
    color: var(--dsfr-grey-625);
    margin: 0;
}

/* === Navigation === */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.25rem;
}

.main-navigation li a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--dsfr-grey-900);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.25rem;
}

.main-navigation li a:hover,
.main-navigation li a:focus {
    background-color: var(--dsfr-grey-50);
}

.main-navigation li.current-menu-item a {
    background-color: var(--dsfr-blue-light);
    color: var(--dsfr-blue);
}

/* === Main Content === */
.site-main {
    max-width: var(--dsfr-max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 60vh;
}

/* === Footer === */
.site-footer {
    background-color: var(--dsfr-grblueey-50);
    border-top: 2px solid var(--dsfrblue-blue);
    margin-top: 3rem;
    color: #FFFFFF;
}

.site-footer .footer-inner {
    max-width: var(--dsfr-max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--dsfr-grey-200);
}

.footer-brand {
    font-weight: 700;
    color: var(--dsfr-blue);
}

.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #FFF;
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-bottom {
    padding-top: 1rem;
    font-size: 0.75rem;
    color: var(--dsfr-grey-425);
    text-align: center;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    color: var(--dsfr-grey-900);
    line-height: 1.25;
    margin-top: 0;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* === Breadcrumb === */
.breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.breadcrumb li::after {
    content: ">";
    margin-left: 0.25rem;
    color: var(--dsfr-grey-425);
}

.breadcrumb li:last-child::after {
    content: "";
}

.breadcrumb a {
    color: var(--dsfr-grey-625);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* === Page Entry === */
.entry-header {
    margin-bottom: 2rem;
}

.entry-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.entry-content {
    line-height: 1.7;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.entry-content li {
    margin-bottom: 0.25rem;
}

/* === Declaration Page === */
.declaration-page {
    max-width: 52rem;
}

.declaration-header {
    background-color: var(--dsfr-blue-light);
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.declaration-header h1 {
    color: var(--dsfr-blue);
    margin-bottom: 0.5rem;
}

.declaration-meta {
    font-size: 0.875rem;
    color: var(--dsfr-grey-625);
}

.declaration-section {
    margin-bottom: 2.5rem;
}

.declaration-section h2 {
    color: var(--dsfr-blue);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--dsfr-blue-light);
}

/* Conformity badge */
.conformity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1.125rem;
    margin: 1rem 0;
}

.conformity-badge--full {
    background-color: var(--dsfr-green-light);
    color: var(--dsfr-green);
}

.conformity-badge--partial {
    background-color: #fef3cd;
    color: var(--dsfr-yellow);
}

.conformity-badge--non {
    background-color: var(--dsfr-red-light);
    color: var(--dsfr-red);
}

/* Stats in declaration */
.declaration-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.declaration-stat {
    background: var(--dsfr-grey-50);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
}

.declaration-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    color: var(--dsfr-blue);
}

.declaration-stat .stat-label {
    font-size: 0.75rem;
    color: var(--dsfr-grey-625);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Criteria detail table */
.criteria-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.criteria-table th,
.criteria-table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--dsfr-grey-200);
    text-align: left;
}

.criteria-table thead th {
    background-color: var(--dsfr-grey-50);
    font-weight: 600;
}

.criteria-table .status-C {
    color: var(--dsfr-green);
    font-weight: 600;
}

.criteria-table .status-NC {
    color: var(--dsfr-red);
    font-weight: 600;
}

.criteria-table .status-NA {
    color: var(--dsfr-grey-425);
}

/* Contact section */
.declaration-contact {
    background-color: var(--dsfr-grey-50);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--dsfr-blue);
}

.declaration-contact h3 {
    margin-top: 0;
}

/* === Responsive === */
@media (max-width: 768px) {
    .site-header .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-navigation ul {
        flex-direction: column;
        width: 100%;
    }

    h1 {
        font-size: 1.5rem;
    }

    .declaration-header {
        padding: 1.25rem;
    }

    .footer-top {
        flex-direction: column;
    }
}
