/* ============================================================
   Malley Lumières — Charte officielle V6
   Variables de couleurs, typographies, layouts globaux.
   Chargé sur toutes les pages.
   ============================================================ */

:root {
    /* Couleurs officielles charte V6 (validées Couleurs_HEX_Malley_Lumieres.txt) */
    --ink: #363d43;        /* Gris Anthracite (logo principal) */
    --grey: #a7a2a0;       /* Blanc Aluminium (secondaire) */
    --white: #ffffff;
    --grey-light: #ededed; /* Noir 10 % */
    --yellow: #fdf6b7;     /* Jaune charte */
    --turquoise: #74c5c4;  /* Turquoise charte */
    --cyan: #eaf6fe;       /* Cyan 10 % */

    /* Variations dérivées (non-officielles, usage layout) */
    --yellow-soft: #fefcde;
    --turquoise-soft: #c5e8e6;
    --green: #5dc07a;
}

/* ============================================================
   Fonts officielles self-hosted (charte V6)
   Lato (toutes graisses) + Euclid Flex Bold (réservé wordmark logo)
   ============================================================ */
@font-face {
    font-family: 'Lato'; font-style: normal; font-weight: 100;
    font-display: swap;
    src: url('../fonts/lato/Lato-Thin.ttf') format('truetype');
}
@font-face {
    font-family: 'Lato'; font-style: italic; font-weight: 100;
    font-display: swap;
    src: url('../fonts/lato/Lato-ThinItalic.ttf') format('truetype');
}
@font-face {
    font-family: 'Lato'; font-style: normal; font-weight: 300;
    font-display: swap;
    src: url('../fonts/lato/Lato-Light.ttf') format('truetype');
}
@font-face {
    font-family: 'Lato'; font-style: italic; font-weight: 300;
    font-display: swap;
    src: url('../fonts/lato/Lato-LightItalic.ttf') format('truetype');
}
@font-face {
    font-family: 'Lato'; font-style: normal; font-weight: 400;
    font-display: swap;
    src: url('../fonts/lato/Lato-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Lato'; font-style: italic; font-weight: 400;
    font-display: swap;
    src: url('../fonts/lato/Lato-Italic.ttf') format('truetype');
}
@font-face {
    font-family: 'Lato'; font-style: normal; font-weight: 700;
    font-display: swap;
    src: url('../fonts/lato/Lato-Bold.ttf') format('truetype');
}
@font-face {
    font-family: 'Lato'; font-style: italic; font-weight: 700;
    font-display: swap;
    src: url('../fonts/lato/Lato-BoldItalic.ttf') format('truetype');
}
@font-face {
    font-family: 'Lato'; font-style: normal; font-weight: 900;
    font-display: swap;
    src: url('../fonts/lato/Lato-Black.ttf') format('truetype');
}
@font-face {
    font-family: 'Lato'; font-style: italic; font-weight: 900;
    font-display: swap;
    src: url('../fonts/lato/Lato-BlackItalic.ttf') format('truetype');
}
@font-face {
    font-family: 'Euclid Flex'; font-style: normal; font-weight: 700;
    font-display: swap;
    src: url('../fonts/euclid/EuclidFlex-Bold.otf') format('opentype');
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Lato', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
.serif {
    font-family: 'DM Serif Display', Georgia, serif;
    font-style: italic;
    font-weight: 400;
}
a { color: inherit; }

/* Container */
.container { max-width: 1320px; margin: 0 auto; padding: 0 60px; }
@media (max-width: 768px) { .container { padding: 0 20px; } }

/* Skip link accessibilité */
.skip-link.screen-reader-text {
    position: absolute; left: -9999px; top: auto;
    width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
    position: fixed; top: 8px; left: 8px;
    width: auto; height: auto; padding: 12px 18px;
    background: var(--ink); color: var(--white);
    z-index: 10000; text-decoration: none; font-weight: 700;
}

/* ============ HEADER GLOBAL ============ */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--grey-light);
}
.site-header__inner {
    max-width: 1320px; margin: 0 auto;
    padding: 16px 40px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 18px;
    position: relative; /* contexte pour .main-navigation--open en mobile */
}
.site-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.site-logo__img { height: 38px; width: auto; display: block; }
/* Header : logo « normal » empilé, plus haut mais bien plus compact en largeur */
.site-logo--header .site-logo__img { height: 50px; }

.main-navigation { display: flex; }
.main-navigation__cta-mobile { display: none !important; }   /* masqué partout par défaut */
.primary-menu {
    list-style: none; display: flex; align-items: center; flex-wrap: nowrap; gap: 30px;
    margin: 0; padding: 0;
}
.primary-menu li { list-style: none; }
.primary-menu a {
    color: var(--ink); text-decoration: none;
    font-size: 16px; font-weight: 700;
    letter-spacing: -0.1px;
    white-space: nowrap;             /* onglets toujours sur une seule ligne (retour Roxane) */
    transition: color 0.2s;
}
.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-parent > a {
    color: var(--turquoise);
}

.site-header__actions { display: flex; align-items: center; gap: 14px; }
.status-pill {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 13px; color: var(--ink);
    padding: 10px 18px;
    background: var(--grey-light); border-radius: 6px;
    font-weight: 700; letter-spacing: 0.1px;
}
.status-pill--open::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(93,192,122,0.25);
    animation: malley-pulse 2.5s infinite;
}
@keyframes malley-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(93,192,122,0.25); }
    50% { box-shadow: 0 0 0 9px rgba(93,192,122,0.08); }
}
.cta-reservation {
    position: relative;
    background: var(--ink); color: var(--white);
    text-decoration: none; padding: 13px 24px;
    font-weight: 700; font-size: 13px;
    display: inline-flex; align-items: center; gap: 8px;
    border: 2px solid var(--ink);
    /* Bulle BD — angles vifs cohérents charte Malley (juin 2026) */
    border-radius: 6px;
    transition: background 0.25s, border-color 0.25s, transform 0.25s;
    isolation: isolate;
}
/* Queue de la bulle BD — petit triangle en bas-gauche */
.cta-reservation__tail {
    position: absolute;
    left: 22px; bottom: -8px;
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 9px solid var(--ink);
    transition: border-top-color 0.25s, transform 0.25s;
    pointer-events: none;
}
.cta-reservation:hover .cta-reservation__tail {
    border-top-color: var(--turquoise);
}
/* Halo jaune pulsant — rappel direct du halo luciole */
.cta-reservation::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: inherit;
    background: radial-gradient(ellipse, rgba(253, 246, 183, 0.65) 0%, rgba(253, 246, 183, 0) 70%);
    filter: blur(6px);
    z-index: -1;
    pointer-events: none;
    animation: malley-bubble-glow 2.4s ease-in-out infinite;
}
.cta-reservation::before {
    content: ""; display: inline-block; width: 16px; height: 16px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23fdf6b7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><rect x='6' y='10' width='36' height='32' rx='3'/><path d='M6 18h36M16 6v8M32 6v8'/></svg>") no-repeat center;
    background-size: contain;
    flex-shrink: 0;
}
.cta-reservation:hover {
    background: var(--turquoise); border-color: var(--turquoise);
    transform: translateY(-2px) scale(1.03);
}
.cta-reservation:hover::after {
    animation-duration: 1.4s;
    background: radial-gradient(ellipse, rgba(116, 197, 196, 0.7) 0%, rgba(116, 197, 196, 0) 70%);
}
@keyframes malley-bubble-glow {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
    .cta-reservation,
    .cta-reservation::after { animation: none; }
}

/* Menu toggle (mobile) */
.menu-toggle {
    display: none;
    width: 44px; height: 44px;
    background: var(--grey-light);
    border: 0; cursor: pointer;
    border-radius: 12px;
    padding: 0;
    align-items: center; justify-content: center;
    transition: background 0.2s;
}
.menu-toggle:hover,
.menu-toggle:focus-visible {
    background: var(--turquoise-soft);
    outline: 2px solid var(--turquoise);
    outline-offset: 2px;
}
.menu-toggle__bars {
    display: block; width: 22px; height: 16px; position: relative;
}
.menu-toggle__bars span {
    position: absolute; left: 0; width: 100%; height: 3px;
    background: var(--ink); border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
.menu-toggle__bars span:nth-child(1) { top: 0; }
.menu-toggle__bars span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-toggle__bars span:nth-child(3) { bottom: 0; }

@media (max-width: 980px) {
    /* IMPORTANT : pas de backdrop-filter en mobile.
       Sinon ça crée un containing block pour les enfants position: fixed
       (notamment .main-navigation--open) qui finissent invisibles sur iOS Safari. */
    .site-header {
        background: var(--white);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .site-header__inner { padding: 12px 18px; gap: 12px; }
    .main-navigation { display: none; }
    /* Hamburger TRES visible, ordre 2 (juste après logo) */
    .menu-toggle {
        display: inline-flex !important;
        order: 2;
        margin-left: auto;                /* pousse à droite */
        background: var(--ink) !important; /* anthracite, contraste fort sur header blanc */
        width: 48px; height: 48px;        /* plus gros pour touch target */
        flex-shrink: 0;                    /* ne se compresse pas */
        position: relative;
        z-index: 100000;                   /* au-dessus de l'overlay (.main-navigation--open = 99999) → croix ✕ cliquable pour refermer */
    }
    .menu-toggle__bars { width: 24px; height: 18px; }
    .menu-toggle__bars span {
        background: var(--white) !important; /* bars blancs sur fond anthracite */
        height: 3px;
    }
    .menu-toggle:hover,
    .menu-toggle:focus-visible {
        background: var(--turquoise) !important;
        outline: 2px solid var(--ink);
    }
    /* CTA Réserver masqué en mobile — déplacé dans le menu déployé */
    .site-header__actions { display: none !important; }
    /* Logo : taille raisonnable + compressible si manque de place */
    .site-logo { flex-shrink: 1; min-width: 0; max-width: calc(100% - 60px); }
    .site-logo__img { height: 32px; max-width: 100%; object-fit: contain; object-position: left center; }

    /* CTA Réserver dans le menu mobile déployé (vrai lien cliquable) */
    .main-navigation--open .main-navigation__cta-mobile {
        display: block !important;
        background: var(--ink);
        color: var(--white);
        text-align: center;
        padding: 14px 20px;
        border-radius: 100px;
        font-weight: 700;
        font-size: 14px;
        text-decoration: none;
        margin: 18px 0 4px;
        transition: background 0.2s;
    }
    .main-navigation--open .main-navigation__cta-mobile:hover,
    .main-navigation--open .main-navigation__cta-mobile:focus {
        background: var(--turquoise);
    }

    /* Menu mobile déployé — overlay PLEIN ÉCRAN pour éviter tout
       problème de stacking context iOS Safari. */
    .main-navigation--open {
        display: block !important;
        position: fixed !important;
        top: 0; left: 0; right: 0; bottom: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh; /* dynamic viewport height iOS (barre adresse) */
        background: var(--white);
        z-index: 99999;
        padding: 80px 24px 32px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }
    /* Lock scroll du body quand menu ouvert (UX standard mobile) */
    body.has-mobile-nav-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    .main-navigation--open .primary-menu {
        flex-direction: column;
        gap: 0;
    }
    .main-navigation--open .primary-menu li {
        border-bottom: 1px solid var(--grey-light);
    }
    .main-navigation--open .primary-menu li:last-child {
        border-bottom: none;
    }
    .main-navigation--open .primary-menu a {
        display: block;
        padding: 14px 4px;
        font-size: 16px;
    }
    /* Animation hamburger -> croix */
    .menu-toggle[aria-expanded="true"] {
        background: var(--ink);
    }
    .menu-toggle[aria-expanded="true"] .menu-toggle__bars span {
        background: var(--white);
    }
    .menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(1) {
        transform: translateY(6.5px) rotate(45deg);
    }
    .menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(3) {
        transform: translateY(-6.5px) rotate(-45deg);
    }
}

/* ============ FOOTER GLOBAL ============ */
.site-footer {
    background: var(--ink); color: var(--white);
    padding: 70px 0 30px;
}
.site-footer__grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px;
    max-width: 1320px; margin: 0 auto 40px;
    padding: 0 60px;
}
.site-footer__col h4 {
    font-size: 13px; letter-spacing: 4px;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.6); font-weight: 700;
    text-transform: uppercase;
}
.site-footer__col a,
.site-footer__col p {
    color: var(--white); text-decoration: none;
    display: block; padding: 4px 0;
    font-size: 14px; opacity: 0.85;
}
.site-footer__col a:hover { color: var(--turquoise); opacity: 1; }
.site-footer__col .site-logo__img { height: 60px; }
.site-footer__col ul { list-style: none; margin: 0; padding: 0; }
.site-footer__legal {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 24px 60px 0;
    text-align: center; font-size: 12px; opacity: 0.65;
    max-width: 1320px; margin: 0 auto;
}
.site-footer__legal a {
    color: var(--turquoise); text-decoration: none; font-weight: 700;
}
@media (max-width: 980px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; padding: 0 24px; }
}
@media (max-width: 600px) {
    .site-footer__grid { grid-template-columns: 1fr; }
}
