/* ═══════════════════════════════════════════════════════════════════════
   VITRINE CHROME V2 — tokens, base resets, navbar, footer
   Chargé globalement via importmap vitrine → disponible sur toutes les pages
   qui étendent templates/v4/public/_base.html.twig.
   ═══════════════════════════════════════════════════════════════════════ */

/* Design tokens sur le wrapper .pt-v2-shell appliqué à
   <nav>, <footer>, <div> body wrapper, et <div> offcanvas.
   NOTE: toute la palette (+ radii + shadows) est déclarée ici même si certains
   tokens ne sont pas consommés par ce fichier. Les CSS page-specific (ex.
   homepage-v2.css) héritent via .pt-v2-shell. Ne pas retirer les tokens
   "apparemment inutilisés" sans grep global sur assets/styles/. */
.pt-v2-shell {
    --v2-ink: #1A2922;
    --v2-forest: #3D6B56;
    --v2-forest-hover: #2F5644;
    --v2-forest-deep: #23402F;
    --v2-sage: #5D8876;
    --v2-mist: #8FB5A4;
    --v2-terra: #C4622D;
    /* Fond des CTA primaires : terra assombrie pour tenir 4,5:1 avec le texte
       blanc (le #C4622D historique plafonne à 4,09). Les <em> de titres et
       accents grands corps gardent --v2-terra (seuil 3:1 des grands textes). */
    --v2-terra-cta: #BA5A26;
    --v2-terra-hover: #A84F20;
    --v2-terra-pale: #FAF0E8;
    --v2-terra-light: #F5C09A;
    --v2-gold: #A88B5C;
    --v2-star: #E8A33D;
    --v2-cream: #FAF8F4;
    --v2-fog: #F2F0EB;
    --v2-parchment: #EDE9E1;
    --v2-warm-white: #FFFEFB;
    --v2-bone: #F5F1E8;
    --v2-text: #3A4A42;
    --v2-muted: #5C6B63;
    --v2-text-on-dark: #E8E2D5;
    --v2-muted-on-dark: #9FAEA0;
    --v2-f-serif: 'Fraunces', Georgia, serif;
    --v2-f-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --v2-r-sm: 8px;
    --v2-r-md: 12px;
    --v2-r-lg: 16px;
    --v2-r-xl: 24px;
    --v2-shadow-sm: 0 1px 3px rgba(26, 41, 34, .06);
    --v2-shadow-md: 0 4px 16px rgba(26, 41, 34, .08);
    --v2-shadow-lg: 0 12px 40px rgba(26, 41, 34, .14);

    font-family: var(--v2-f-body);
    color: var(--v2-text);
    -webkit-font-smoothing: antialiased;
}

.pt-v2-shell *,
.pt-v2-shell *::before,
.pt-v2-shell *::after { box-sizing: border-box; }

:where(.pt-v2-shell h1, .pt-v2-shell h2, .pt-v2-shell h3, .pt-v2-shell h4) {
    font-family: var(--v2-f-serif);
    color: var(--v2-ink);
    letter-spacing: -.015em;
    line-height: 1.15;
    margin: 0;
    font-weight: 500;
}
.pt-v2-shell p { margin: 0; }
:where(.pt-v2-shell a) { color: var(--v2-forest); text-decoration: none; transition: color .18s; }
:where(.pt-v2-shell a:hover) { color: var(--v2-forest-hover); }
.pt-v2-shell img { max-width: 100%; display: block; }
/* Signature italique : terra pleine réservée aux titres (grand corps, seuil 3:1) ;
   dans le corps de texte l'em passe en terra-hover (4,52:1 sur les crèmes). */
:where(.pt-v2-shell em) { font-style: italic; color: var(--v2-terra-hover); font-weight: 500; }
:where(.pt-v2-shell h1 em, .pt-v2-shell h2 em, .pt-v2-shell h3 em) { color: var(--v2-terra); }

/* BOUTONS PARTAGÉS (hero, CTA final, offcanvas, autres pages) */
.pt-v2-btn-primary {
    background: var(--v2-terra-cta);
    color: #fff;
    padding: 1.05rem 1.95rem;
    border-radius: 999px;
    font-family: var(--v2-f-serif);
    font-weight: 500;
    font-size: 1.08rem;
    transition: all .18s;
    box-shadow: 0 6px 22px rgba(196, 98, 45, .4);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.pt-v2-btn-primary:hover {
    background: var(--v2-terra-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(196, 98, 45, .5);
}
.pt-v2-btn-white {
    background: #fff;
    color: var(--v2-ink);
    padding: 1.05rem 1.95rem;
    border-radius: 999px;
    font-family: var(--v2-f-serif);
    font-weight: 500;
    font-size: 1.08rem;
    transition: all .18s;
    box-shadow: 0 6px 18px rgba(26, 41, 34, .25);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.pt-v2-btn-white:hover {
    background: #fff;
    color: var(--v2-terra-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(26, 41, 34, .35);
}
.pt-v2-btn-outline-white {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    padding: 1.05rem 1.95rem;
    border-radius: 999px;
    font-family: var(--v2-f-serif);
    font-weight: 500;
    font-size: 1.08rem;
    border: 1.5px solid rgba(255, 255, 255, .3);
    transition: all .18s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.pt-v2-btn-outline-white:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, .18);
}
.pt-v2-btn-primary svg,
.pt-v2-btn-white svg,
.pt-v2-btn-outline-white svg { width: 18px; height: 18px; flex: none; }

/* NAVBAR */
.pt-v2-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 254, 251, .92);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--v2-parchment);
}
.pt-v2-nav-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    gap: 32px;
}
.pt-v2-nav-brand {
    font-family: var(--v2-f-serif);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--v2-ink);
    letter-spacing: -.02em;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}
.pt-v2-nav-brand span { color: var(--v2-terra); font-style: italic; }
.pt-v2-nav-brand img { height: 36px; width: auto; display: block; }
.pt-v2-nav-links { display: none; gap: 26px; margin-left: auto; }
.pt-v2-nav-links a { color: var(--v2-text); font-weight: 500; font-size: .95rem; padding: .55rem .1rem; }
.pt-v2-nav-links a:hover { color: var(--v2-forest); }
/* État actif : la page courante est marquée dans la navbar (aria-current="page"). */
.pt-v2-nav-links a[aria-current="page"] {
    color: var(--v2-forest);
    text-decoration: underline;
    text-underline-offset: 8px;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--v2-forest);
}
.pt-v2-nav-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.pt-v2-nav-login { display: none; color: var(--v2-ink); font-weight: 500; font-size: .95rem; padding: .55rem .1rem; }
.pt-v2-nav-cta {
    background: var(--v2-forest);
    color: #fff;
    border-radius: 999px;
    padding: .6rem 1.3rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: .92rem;
    transition: all .18s;
}
.pt-v2-nav-cta:hover {
    background: var(--v2-forest-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(61, 107, 86, .25);
}
.pt-v2-nav-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: transparent;
    color: var(--v2-ink);
    border: 1px solid var(--v2-parchment);
    cursor: pointer;
}
.pt-v2-nav-burger svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }

@media (min-width: 1000px) {
    .pt-v2-shell .pt-v2-nav-links { display: flex; }
    .pt-v2-shell .pt-v2-nav-login { display: inline-block; }
    .pt-v2-shell .pt-v2-nav-right { margin-left: 0; }
    .pt-v2-shell .pt-v2-nav-burger { display: none; }
}

/* MOBILE OFFCANVAS MENU — styles spécifiques pour les items du menu.
   Bootstrap gère la mécanique (position:fixed, transform, backdrop). */
.pt-v2-mobile-menu-item {
    font-size: 1.05rem;
    color: var(--v2-ink);
    padding: .85rem 0;
    border-bottom: 1px solid var(--v2-parchment);
    text-decoration: none;
}
.pt-v2-mobile-menu-item:hover { color: var(--v2-forest); }
.pt-v2-mobile-menu-login {
    text-align: center;
    padding: .7rem 1.3rem;
    border: 1px solid var(--v2-parchment);
    border-radius: 999px;
    color: var(--v2-ink);
    font-weight: 500;
    text-decoration: none;
}
.pt-v2-mobile-menu-login:hover { color: var(--v2-forest); border-color: var(--v2-forest); }

/* FOOTER (V2 dark institutional) */
.pt-v2-footer {
    background: var(--v2-ink);
    color: var(--v2-text-on-dark);
    padding: 64px 28px 32px;
}
.pt-v2-footer-inner { max-width: 1240px; margin: 0 auto; }
.pt-v2-footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}
@media (max-width: 900px) {
    .pt-v2-shell .pt-v2-footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 540px) {
    .pt-v2-shell .pt-v2-footer-grid { grid-template-columns: 1fr; }
}
.pt-v2-footer-brand {
    font-family: var(--v2-f-serif);
    font-size: 1.5rem;
    color: #fff;
    font-weight: 500;
    margin-bottom: 14px;
    display: inline-block;
}
.pt-v2-footer-brand span { color: var(--v2-terra-light); font-style: italic; }
.pt-v2-footer-desc {
    font-size: .92rem;
    color: var(--v2-muted-on-dark);
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 280px;
}
.pt-v2-footer-social { display: flex; gap: 10px; }
.pt-v2-footer-social a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    display: grid;
    place-items: center;
    transition: background .18s, color .18s;
}
.pt-v2-footer-social a:hover { background: rgba(255, 255, 255, .16); color: var(--v2-terra-light); }
.pt-v2-footer-social svg { width: 16px; height: 16px; fill: currentColor; }
.pt-v2-footer-heading {
    font-family: var(--v2-f-body);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 18px;
}
.pt-v2-footer-heading a { color: #fff; display: inline-block; padding: .8rem 0; margin: -.8rem 0; }
.pt-v2-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pt-v2-footer-list a { color: var(--v2-muted-on-dark); font-size: .92rem; transition: color .18s; display: inline-block; padding: .6rem 0; }
.pt-v2-footer-list a:hover { color: #fff; }
.pt-v2-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    flex-wrap: wrap;
    gap: 18px;
}
.pt-v2-footer-bottom p,
.pt-v2-footer-bottom a {
    color: var(--v2-muted-on-dark);
    font-size: .84rem;
    margin: 0;
}
.pt-v2-footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.pt-v2-footer-bottom a { display: inline-block; padding: .7rem 0; margin: -.35rem 0; }
.pt-v2-footer-legal a:hover { color: #fff; }

/* Focus clavier visible sur tout le chrome vitrine (anneau terra du DS) */
.pt-v2-shell a:focus-visible,
.pt-v2-shell button:focus-visible,
.pt-v2-shell input:focus-visible,
.pt-v2-shell summary:focus-visible {
    outline: 3px solid var(--v2-terra);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Accessibilité : chrome partagé (navbar, footer, boutons) sans mouvement
   quand prefers-reduced-motion est actif. */
@media (prefers-reduced-motion: reduce) {
    .pt-v2-shell *, .pt-v2-shell *::before, .pt-v2-shell *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Offcanvas mobile : le X de fermeture en cible tactile 44 px */
.pt-v2-shell .btn-close {
    width: 44px;
    height: 44px;
    background-size: 18px;
    padding: 0;
}
