/* ===== Bases — LearnThis navigation pill ===== */
:root {
    --fond: #ececef;
    --surface: #ffffff;
    --texte: #1a1a1a;
    --texte-muet: #6b6b6b;
    --bordure: #e4e4e7;
    --accent: #039ff4;
    --accent-doux: #4fbcf7;
    --ombre: 0 10px 30px rgba(0, 0, 0, 0.08);
    --rayon-pillule: 999px;
    --police: "Manrope", system-ui, sans-serif;
}

html:has(#bascule-theme:checked) {
    --fond: #101012;
    --surface: #1c1c1f;
    --texte: #f4f4f5;
    --texte-muet: #a1a1aa;
    --bordure: #2e2e33;
    --ombre: 0 10px 30px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--police);
    color: var(--texte);
    background: var(--fond);
    line-height: 1.55;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Barre flottante ===== */
.barre-flottante {
    position: fixed;
    top: 1.25rem;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
    pointer-events: none;
}

.nav-pillule {
    pointer-events: auto;
    width: min(920px, 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 0.45rem 0.55rem 0.45rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-pillule);
    box-shadow: var(--ombre);
}

/* Logo à gauche */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--texte);
    font-weight: 800;
    font-size: 0.95rem;
    padding: 0.35rem 0.7rem 0.35rem 0.35rem;
    border-radius: var(--rayon-pillule);
    border: 1px solid var(--bordure);
    background: var(--fond);
    transition: transform 0.3s ease;
}

.logo img {
    width: 28px;
    height: 28px;
    display: block;
}

.logo .marque {
    color: var(--accent);
}

.logo.reduit {
    transform: scale(0.92);
}

/* Menu burger (mobile uniquement) */
.bascule-menu {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bouton-menu {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--bordure);
    background: var(--fond);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--texte);
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-left: auto;
}

.icone-fermer {
    display: none;
}

.bascule-menu:checked + .bouton-menu .icone-ouvrir {
    display: none;
}

.bascule-menu:checked + .bouton-menu .icone-fermer {
    display: inline;
}

/* Liens centraux */
.liens {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.liens > li {
    position: relative;
}

.liens a {
    display: inline-block;
    padding: 0.45rem 0.75rem;
    text-decoration: none;
    color: var(--texte-muet);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.liens a:hover {
    color: var(--texte);
}

/* Indicateur actif (emplacement courant) */
.lien-nav.actif {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.declencheur.lien-nav.actif {
    color: var(--accent);
}

/* Dropdown */
.bascule-deroulant {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.declencheur {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    color: var(--texte-muet);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    user-select: none;
}

.declencheur:hover {
    color: var(--texte);
}

.declencheur .chevron {
    font-size: 0.7rem;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.sous-menu {
    list-style: none;
    margin: 0;
    padding: 0.4rem;
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 150px;
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: 16px;
    box-shadow: var(--ombre);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 20;
}

.sous-menu a {
    display: block;
    width: 100%;
    border-radius: 10px;
}

.deroulant:hover > .sous-menu,
.deroulant:focus-within > .sous-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Actions à droite : thème | Contactez-nous | bouton */
.actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.bascule-theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--bordure);
    background: var(--fond);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--texte);
}

.theme-soleil {
    display: none;
}

html:has(#bascule-theme:checked) .theme-lune {
    display: none;
}

html:has(#bascule-theme:checked) .theme-soleil {
    display: inline;
}

.lien-contact {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.95rem;
    border-radius: var(--rayon-pillule);
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
}

.lien-contact:hover {
    background: var(--accent-doux);
    border-color: var(--accent-doux);
    color: #ffffff;
}

.bouton-principal {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.05rem;
    border-radius: var(--rayon-pillule);
    border: 1px solid var(--bordure);
    background: var(--fond);
    color: var(--texte);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

.bouton-principal:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== Contenu ===== */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 7.5rem 1.5rem 4rem;
}

.hero {
    text-align: center;
    padding: 2rem 0 3rem;
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.hero h1 span {
    color: var(--accent);
}

.lead {
    margin: 0 auto 1.75rem;
    max-width: 540px;
    color: var(--texte-muet);
    font-size: 1.05rem;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

.bloc {
    padding: 2.5rem 0;
    border-top: 1px solid var(--bordure);
}

.bloc h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.bloc > p {
    margin: 0;
    color: var(--texte-muet);
}

.cartes {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.cartes li {
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: var(--ombre);
}

.cartes h3 {
    margin: 0 0 0.4rem;
    color: var(--accent);
    font-size: 1.05rem;
}

.cartes p {
    margin: 0;
    color: var(--texte-muet);
    font-size: 0.92rem;
}

.pied {
    text-align: center;
    padding: 2rem 1rem 3rem;
    color: var(--texte-muet);
    font-size: 0.85rem;
}

.pied p {
    margin: 0;
}

.lien-mobile-contact {
    display: none;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .lien-mobile-contact {
        display: list-item;
    }
    .barre-flottante {
        top: 0.75rem;
    }

    .nav-pillule {
        flex-wrap: wrap;
        border-radius: 28px;
        padding: 0.55rem;
        gap: 0.5rem;
    }

    .logo {
        order: 1;
    }

    .bouton-menu {
        display: inline-flex;
        order: 3;
    }

    .actions {
        order: 2;
        margin-left: auto;
    }

    .lien-contact {
        display: none;
    }

    .liens {
        display: none;
        order: 4;
        flex: 0 0 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--bordure);
    }

    .bascule-menu:checked ~ .liens {
        display: flex;
    }

    .bascule-menu:checked ~ .actions .lien-contact {
        display: none;
    }

    .liens a,
    .declencheur {
        display: flex;
        width: 100%;
        padding: 0.7rem 0.85rem;
        border-radius: 12px;
    }

    .declencheur {
        justify-content: space-between;
    }

    .bascule-deroulant:checked + .declencheur .chevron {
        transform: rotate(180deg);
    }

    /* Sous-menu fermé par défaut — s’ouvre au tap (checkbox) */
    .sous-menu {
        position: static;
        left: auto;
        top: auto;
        transform: none !important;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0;
        min-width: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease, padding 0.25s ease;
    }

    .bascule-deroulant:checked ~ .sous-menu {
        max-height: 12rem;
        padding: 0.15rem 0 0.35rem 0.85rem;
    }

    .sous-menu a {
        color: var(--texte-muet);
        font-weight: 500;
        font-size: 0.88rem;
        padding: 0.55rem 0.85rem;
    }

    .sous-menu a:hover {
        color: var(--accent);
        background: color-mix(in srgb, var(--accent) 10%, transparent);
    }

    /* Désactive le hover desktop qui décale le sous-menu */
    .deroulant:hover > .sous-menu,
    .deroulant:focus-within > .sous-menu {
        transform: none !important;
    }

    .cartes {
        grid-template-columns: 1fr;
    }

    main {
        padding-top: 6.5rem;
    }
}
