/* ── Reset & base  */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--color-text);
    line-height: 1.75;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
}

/* ── Header  */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2.5rem;
    background: rgba(255, 250, 250, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

#logo_hm {
    height: 52px;
    width: auto;
    object-fit: contain;
    transition: transform var(--transition-fast);
}

#logo_hm:hover {
    transform: scale(1.04);
}

/* ── Navbar  */
.navbar ul {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.navbar a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-title);
    text-decoration: none;
    position: relative;
    padding-bottom: 3px;
    transition: color var(--transition-fast);
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    border-radius: 99px;
    transition: width var(--transition-normal);
}

.navbar a:hover {
    color: var(--color-secondary);
}

.navbar a:hover::after {
    width: 100%;
}

.navbar .cta-nav {
    padding: 0.5rem 1.25rem;
    background: var(--color-accent);
    color: var(--color-text-light) !important;
    background-size: 200% auto;
    
    font-weight: 600;
    border-radius: var(--radius-sm);
    box-shadow: 0 3px 14px rgba(255, 164, 0, 0.35);
    transition: background-position var(--transition-normal),
                box-shadow var(--transition-normal),
                transform var(--transition-fast);
}

.navbar .cta-nav::after {
    display: none;
}

.navbar .cta-nav:hover {
    background-position: right center;
    box-shadow: 0 6px 20px rgba(255, 164, 0, 0.5);
    transform: translateY(-1px);
    color: var(--color-text) !important;
}

/* ── Hero */
.hero {
    background: var(--gradient-hero);
    padding: 5rem 2.5rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 60% at 20% 50%, rgba(255, 193, 7, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 50% 80% at 80% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--bg-color);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.hero h1 {
    position: relative;
    z-index: 1;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    color: var(--color-text-light);
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
    animation: heroFadeIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Main content */
main {
    max-width: 820px;
    margin: 0 auto;
    padding: 3.5rem 2rem 5rem;
    animation: contentFadeIn 0.5s 0.2s ease both;
}

@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Titres de section  */
main h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-title);
    margin: 2.5rem 0 0.75rem;
    padding-left: 1rem;
    border-left: 4px solid var(--color-primary);
    line-height: 1.3;
    transition: border-color var(--transition-fast);
}

main h2:first-child {
    margin-top: 0;
}

/* ── Paragraphes  */
main p {
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
    max-width: 70ch;
}

/* ── Listes  */
main ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

main ul li {
    font-size: 0.92rem;
    color: #3a3a4a;
    padding: 0.55rem 0.85rem 0.55rem 2.2rem;
    background: rgba(94, 0, 148, 0.04);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    position: relative;
    transition: background var(--transition-card),
                border-color var(--transition-card),
                transform var(--transition-card);
}

main ul li::before {
    content: '⚡';
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.78rem;
    opacity: 0.75;
}

main ul li:hover {
    background: rgba(94, 0, 148, 0.08);
    border-color: rgba(94, 0, 148, 0.15);
    transform: translateX(3px);
}

main ul li strong {
    color: var(--color-title);
    font-weight: 600;
    margin-right: 0.25rem;
}

/* ── Footer  */
footer {
    background: var(--footer-bg);
    font-family: var(--footer-body-font);
    border-top: 1px solid var(--footer-border);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3.5rem 2.5rem 2rem;
}

/* ── Footer cards  */
.footer-card {
    font-style: normal;
}

.footer-card h3 {
    font-family: var(--footer-font);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--footer-accent);
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--footer-border);
}

.footer-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.55rem;
    background: transparent;
}

.footer-card ul li {
    padding: 0;
    background: transparent;
    border: none;
    font-size: 0.88rem;
}

.footer-card ul li::before {
    display: none;
}

.footer-card ul li:hover {
    background: transparent;
    border-color: transparent;
    transform: none;
}

.footer-card a {
    color: var(--footer-text);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color var(--transition-fast);
}

.footer-card a:hover {
    color: var(--footer-link-hover);
}

/* ── Footer social/media images  */
.footer-card img {
    filter: brightness(0.7) saturate(0);
    transition: filter var(--transition-normal), transform var(--transition-fast);
    display: block;
}

.footer-card img:hover {
    filter: brightness(1) saturate(1);
    transform: scale(1.04);
}

/* ── Footer address  */
address.footer-card p {
    color: var(--footer-text);
    font-size: 0.88rem;
    margin-bottom: 0.55rem;
    max-width: none;
}

address.footer-card a {
    color: var(--footer-text);
}

address.footer-card a:hover {
    color: var(--footer-link-hover);
}

/* ── Footer horaires  */
.footer-card time,
.footer-card p {
    color: var(--footer-text);
    font-size: 0.88rem;
}

/* ── Footer bottom bar  */
.footer-bottom {
    border-top: 1px solid var(--footer-border);
    padding: 1.25rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: #5a6270;
    max-width: none;
    margin: 0;
}

.footer-bottom a {
    color: var(--footer-accent-dim);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-bottom a:hover {
    color: var(--footer-accent);
}


/* ── Hamburger button (caché par défaut)  */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: none;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 6px;
    transition: background var(--transition-fast), border-color var(--transition-fast);
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-title);
    border-radius: 99px;
    transition: transform 0.35s ease, opacity 0.25s ease, width 0.25s ease;
    transform-origin: center;
}

.nav-toggle:hover {
    background: rgba(94, 0, 148, 0.06);
    border-color: var(--color-secondary);
}

/* Croix quand le menu est ouvert */
.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
    width: 0;
}
.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* TABLETTE  —  768px ≤ width ≤ 1023px */
   
@media (min-width: 768px) and (max-width: 1023px) {

    /* Header */
    header {
        padding: 0.75rem 2rem;
    }

    #logo_hm {
        height: 46px;
    }

    /* Navbar : on compresse les gaps et la taille */
    .navbar ul {
        gap: 1.25rem;
    }

    .navbar a {
        font-size: 0.85rem;
    }

    .navbar .cta-nav {
        padding: 0.45rem 1rem;
        font-size: 0.82rem;
    }

    /* Hero */
    .hero {
        padding: 4rem 2rem 3.5rem;
    }

    /* Main */
    main {
        max-width: 680px;
        padding: 3rem 2rem 4.5rem;
    }

    main h2 {
        font-size: 1.08rem;
        margin: 2.2rem 0 0.65rem;
    }

    main p {
        font-size: 0.93rem;
    }

    main ul li {
        font-size: 0.9rem;
    }

    /* Footer */
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 2.5rem;
        padding: 3rem 2rem 1.75rem;
    }

    /* La 3e et 4e card passent en 2e ligne */
    .footer-container > *:nth-child(1),
    .footer-container > *:nth-child(2) {
        border-bottom: 1px solid var(--footer-border);
        padding-bottom: 1.5rem;
    }

    .footer-bottom {
        padding: 1rem 2rem;
    }

    .footer-bottom p {
        font-size: 0.78rem;
    }
}



   /* MOBILE  —  < 768px */

@media (max-width: 767px) {

    /* ── Header mobile */
    header {
        padding: 0.65rem 1.25rem;
        flex-wrap: nowrap;
        position: relative;
    }

    #logo_hm {
        height: 42px;
    }

    /* Affichage du bouton hamburger */
    .nav-toggle {
        display: flex;
    }

    /* Navbar : panneau déroulant vertical */
    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 250, 250, 0.97);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid var(--color-border);
        border-bottom: 2px solid var(--color-primary);
        box-shadow: var(--shadow-medium);
        overflow: hidden;

        /* Animation ouverture */
        max-height: 0;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease;
        z-index: 99;
    }

    /* État ouvert — activé via JS en ajoutant .is-open sur .navbar */
    .navbar.is-open {
        max-height: 400px;
        opacity: 1;
        pointer-events: auto;
    }

    .navbar ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 0;
    }

    .navbar ul li {
        width: 100%;
    }

    .navbar a {
        display: block;
        font-size: 0.92rem;
        padding: 0.85rem 1.5rem;
        border-left: 3px solid transparent;
        transition: background var(--transition-fast),
                    border-color var(--transition-fast),
                    color var(--transition-fast);
    }

    .navbar a::after {
        display: none;
    }

    .navbar a:hover {
        background: rgba(94, 0, 148, 0.06);
        border-left-color: var(--color-primary);
        color: var(--color-secondary);
    }

    /* CTA mobile : pleine largeur avec centrage */
    .navbar .cta-nav {
        display: block;
        margin: 0.5rem 1.25rem 0.75rem;
        padding: 0.75rem 1.25rem;
        text-align: center;
        font-size: 0.9rem;
        border-radius: var(--radius-sm);
        border-left: 3px solid transparent !important;
        background: var(--gradient-btn);
    }

    .navbar .cta-nav:hover {
        border-left-color: transparent !important;
        background: var(--gradient-btn);
        transform: none;
    }

    /* ── Hero mobile  */
    .hero {
        padding: 3rem 1.25rem 2.75rem;
    }

    .hero::after {
        height: 40px;
    }

    /* ── Main mobile  */
    main {
        padding: 2rem 1.25rem 3rem;
    }

    main h2 {
        font-size: 1rem;
        margin: 2rem 0 0.6rem;
        padding-left: 0.85rem;
        border-left-width: 3px;
    }

    main p {
        font-size: 0.9rem;
        max-width: 100%;
    }

    main ul li {
        font-size: 0.88rem;
        padding: 0.5rem 0.75rem 0.5rem 2rem;
    }

    /* Supprime le hover translateX sur mobile (pas de curseur) */
    main ul li:hover {
        transform: none;
    }

    /* ── Footer mobile  */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }

    /* Chaque card devient un accordéon visuel */
    .footer-card {
        padding: 1.25rem 1.25rem;
        border-bottom: 1px solid var(--footer-border);
    }

    .footer-card h3 {
        margin-bottom: 0.9rem;
        font-size: 0.72rem;
    }

    .footer-card ul {
        gap: 0.5rem;
    }

    .footer-card ul li {
        font-size: 0.85rem;
        padding: 0.2rem 0;
    }

    .footer-card a {
        font-size: 0.85rem;
    }

    /* Images partenaires : horizontales sur mobile */
    .footer-card ul:has(img) {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 1rem;
    }

    .footer-card img[width="200"] {
        width: 130px !important;
    }

    .footer-card img[width="100"] {
        width: 70px !important;
    }

    address.footer-card p {
        font-size: 0.85rem;
    }

    .footer-bottom {
        padding: 1rem 1.25rem;
        gap: 0.35rem;
    }

    .footer-bottom p {
        font-size: 0.74rem;
        line-height: 1.6;
    }
}



   /* PETIT MOBILE  —  < 480px */
   
@media (max-width: 479px) {

    header {
        padding: 0.6rem 1rem;
    }

    #logo_hm {
        height: 36px;
    }

    .hero {
        padding: 2.5rem 1rem 2.5rem;
    }

    .hero h1 {
        font-size: 1.6rem;
        letter-spacing: -0.01em;
    }

    main {
        padding: 1.75rem 1rem 2.5rem;
    }

    main h2 {
        font-size: 0.95rem;
    }

    main p,
    main ul li {
        font-size: 0.85rem;
    }

    .footer-card {
        padding: 1rem;
    }

    .footer-bottom p {
        font-size: 0.7rem;
    }

    /* Liens du footer-bottom empilés verticalement */
    .footer-bottom p:first-child {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }

    /* Masquer les séparateurs | sur très petit écran */
    .footer-bottom p:first-child::before,
    .footer-bottom p:first-child::after {
        display: none;
    }
}
