/* ---------- Header / Nav ---------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 78px;
    background: var(--color-white);
    border-bottom: 0.5px solid var(--color-border);
    transition: box-shadow 0.3s;
}

.site-header.is-sticky {
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}

.site-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
}

.logo-img {
    height: 48px;
    width: auto;
}

.site-baseline {
    font-size: 9.5px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: .02em;
    color: var(--color-muted, #6b6b6b);
    max-width: 230px;
}

.footer-logo {
    font-size: 34px;
    font-weight: 400;
    color: #fff;
    letter-spacing: 2px;
}

.logo-r {
    font-style: italic;
    color: var(--color-gold);
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-list li a {
    position: relative;
    font-size: 15px;
    color: var(--color-muted);
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

.nav-list li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-gold);
    transition: width 0.3s ease;
}

.nav-list li a:hover,
.nav-list li.current-menu-item a {
    color: var(--color-gold);
}

.nav-list li a:hover::after,
.nav-list li.current-menu-item a::after {
    width: 100%;
}

/* ---------- Sous-menu dropdown ---------- */

.nav-list li {
    position: relative;
}

.nav-list .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    list-style: none;
    background: var(--color-white);
    border: 0.5px solid var(--color-border);
    border-radius: 4px;
    padding: 8px 0;
    min-width: 200px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.nav-list li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-list .sub-menu li a {
    display: block;
    padding: 8px 20px;
    font-size: 14px;
    white-space: nowrap;
}

/* ---------- Sous-sous-menu (niveau 3) : deploiement lateral ---------- */
.nav-list .sub-menu li {
    position: relative;
}

.nav-list .sub-menu .sub-menu {
    top: -9px;
    left: 100%;
    margin-left: 1px;
    transform: translateX(8px);
    z-index: 60;
}

/* Chevron sur les items de sous-menu qui ouvrent un sous-sous-menu */
.nav-list .sub-menu .menu-item-has-children > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.nav-list .sub-menu .menu-item-has-children > a::after {
    content: '\203A';
    position: static;
    width: auto;
    height: auto;
    background: none;
    font-size: 16px;
    line-height: 1;
    color: var(--color-muted);
    transition: color 0.3s ease;
}

.nav-list .sub-menu .menu-item-has-children:hover > a::after {
    color: var(--color-gold);
}

/* bouton chevron d'accordéon : mobile uniquement (voir media query) */
.submenu-toggle {
    display: none;
}

.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 9px 24px;
    border-radius: 20px;
}

/* ---------- Burger ---------- */

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.burger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--color-text);
    transition: transform 0.3s, opacity 0.3s;
}

.burger.is-open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
    opacity: 0;
}

.burger.is-open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ---------- Footer ---------- */

.site-footer {
    background: #111;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 28px;
    padding-bottom: 25px;
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 40px;
}

.footer-logo {
    color: #fff;
    display: inline-block;
    margin-bottom: 16px;
}

.footer-logo-img {
    height: 50px;
    width: auto;
    background: #fff;
    border-radius: 3px;
    padding: 8px 14px;
    margin-bottom: 12px;
}

.footer-baseline {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255,255,255,0.5);
    margin-bottom: 16px;
}

.footer-contact {
    margin-bottom: 4px;
}

.footer-phone {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-phone svg {
    flex-shrink: 0;
}

.footer-contact a:hover {
    color: var(--color-gold);
}

.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.footer-socials a {
    color: rgba(255,255,255,0.5);
    transition: color 0.2s;
}

.footer-socials a:hover {
    color: var(--color-gold);
}

.footer-col-title {
    color: #a5a5a5;
    font-size: 14px;
    font-weight: 100;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.footer-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav a:hover {
    color: #fff;
}

.qualiopi-logo {
    margin-bottom: 12px;
    opacity: 0.9;
}

.qualiopi-text {
    margin-bottom: 12px;
    line-height: 1.5;
}

.qualiopi-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-gold);
    font-size: 14px;
    transition: opacity 0.2s;
}

.qualiopi-download:hover {
    opacity: 0.8;
}

.qualiopi-download svg {
    flex-shrink: 0;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 28px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.footer-bottom a:hover {
    color: #fff;
}

/* ---------- Hover effects ---------- */

.grid-cell {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.grid-cell:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.approche-item {
    transition: background 0.25s ease;
}

.approche-item:hover {
    background: var(--color-gray-bg);
}

.stat-item {
    transition: transform 0.25s ease;
}

.stat-item:hover {
    transform: scale(1.04);
}

/* ---------- Cards agenda ---------- */

.agenda-badge {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    padding: 4px 10px;
    border-radius: 2px;
    margin-bottom: 16px;
}

.agenda-card--dark {
    background: #c9922a;
    color: #000;
}

.agenda-card--dark .agenda-badge {
    background: rgba(0,0,0,0.22);
    color: #fff;
}

.agenda-card--white {
    background: var(--color-white);
}

.agenda-card--white .agenda-badge {
    background: var(--color-gold-light);
    color: var(--color-gold);
}

.agenda-card--gray {
    background: var(--color-white);
    border: 0.5px solid var(--color-border);
}

.agenda-card--gray .agenda-badge {
    background: rgba(0,0,0,0.06);
    color: var(--color-muted);
}

.agenda-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.agenda-intervenants {
    font-size: 13px;
    margin-bottom: 6px;
}

.agenda-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--color-muted);
    margin-bottom: 16px;
}

.agenda-intervenants {
    opacity: 0.65;
}

.agenda-card--dark .agenda-date {
    color: rgba(0,0,0,0.55);
}

.agenda-card--dark .agenda-meta {
    color: rgba(0,0,0,0.6);
}

.agenda-card--dark .agenda-link {
    color: #000;
    font-weight: 600;
}

.agenda-link {
    font-size: 13px;
    color: var(--color-gold);
    margin-top: auto;
}

.agenda-link:hover {
    text-decoration: underline;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .site-header {
        height: 64px;
    }

    .site-logo {
        flex-direction: row;
        align-items: center;
        gap: 0;
    }

    .site-baseline {
        display: none;
    }

    .header-cta {
        display: none;
    }

    .burger {
        display: flex;
        margin-left: auto;
    }

    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-white);
        padding: 8px 22px 32px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(100%);
        transition: transform 0.3s;
        z-index: 999;
    }

    .main-nav.is-open {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    /* ---- Rangées de premier niveau : séparées par des filets ---- */
    .nav-list > li {
        border-bottom: 1px solid var(--color-border);
    }
    .nav-list > li:last-child {
        border-bottom: none;
    }

    .nav-list > li > a {
        display: block;
        padding: 16px 0;
        font-size: 17px;
        font-weight: 500;
        color: var(--color-black);
    }
    /* pas de soulignement animé dans une liste verticale */
    .nav-list li a::after {
        display: none;
    }
    .nav-list > li.current-menu-item > a,
    .nav-list > li.current-menu-parent > a {
        color: var(--color-gold);
    }

    /* ---- Rangée parent (lien + chevron sur la même ligne) ---- */
    .nav-list .menu-item-has-children {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        width: 100%;
    }
    .nav-list .menu-item-has-children > a {
        flex: 1 1 auto;
    }

    /* bouton chevron (injecté par le JS) */
    .submenu-toggle {
        display: flex;
        flex: 0 0 auto;
        align-self: stretch;
        align-items: center;
        justify-content: flex-end;
        width: 48px;
        padding: 0;
        margin: 0 -8px 0 0;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--color-muted);
    }
    .submenu-toggle svg {
        width: 20px;
        height: 20px;
        transition: transform 0.25s ease;
    }
    .menu-item-has-children.is-expanded > .submenu-toggle {
        color: var(--color-gold);
    }
    .menu-item-has-children.is-expanded > .submenu-toggle svg {
        transform: rotate(180deg);
    }

    /* ---- Sous-menus : repliés par défaut ---- */
    .nav-list .sub-menu,
    .nav-list .sub-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        box-shadow: none;
        border-radius: 0;
        background: transparent;
        min-width: 0;
        flex-basis: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
        top: auto;
        left: auto;
        display: none;
    }

    /* niveau 2 déplié : bloc teinté avec liseré doré = groupe identifiable */
    .menu-item-has-children.is-expanded > .sub-menu {
        display: block;
        background: var(--color-gray-bg);
        border-left: 3px solid var(--color-gold);
        border-radius: 0 8px 8px 0;
        padding: 4px 16px;
        margin: 4px 0 14px;
    }
    .nav-list .sub-menu li {
        margin: 0;
    }
    .nav-list .sub-menu li + li {
        border-top: 1px solid var(--color-border);
    }
    .nav-list .sub-menu li a {
        display: block;
        white-space: normal;
        font-size: 15px;
        font-weight: 400;
        color: var(--color-text);
        padding: 11px 0;
    }
    .nav-list .sub-menu li.current-menu-item > a {
        color: var(--color-gold);
    }
    /* le chevron ::after des parents de niveau 3 est remplacé par le bouton */
    .nav-list .sub-menu .menu-item-has-children > a::after {
        display: none;
    }

    /* niveau 3 déplié : simple retrait + liseré clair, sans fond (imbrication) */
    .nav-list .sub-menu .menu-item-has-children.is-expanded > .sub-menu {
        background: transparent;
        border-left: 2px solid var(--color-gold-light);
        border-radius: 0;
        padding: 0 0 0 14px;
        margin: 0 0 8px;
    }
    .nav-list .sub-menu .sub-menu li a {
        font-size: 14px;
        color: var(--color-muted);
        padding: 9px 0;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
