/* ============================================================
   En-tête du site (bandeau rouge + barre + menu téléphone)
   Refonte du 2026-09-26 — piste B validée par Bruno.
   Téléphone : cibles tactiles >= 44 px, encoches iPhone (safe-area),
   hauteur réelle de l'écran (dvh), défilement bloqué sous le menu.
   ============================================================ */

/* --- Bandeau rouge --- */
.cr-bandeau {
    background: var(--red-primary); color: #fff;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 0 max(50px, env(safe-area-inset-right)) 0 max(50px, env(safe-area-inset-left));
    padding-top: env(safe-area-inset-top);
    font-size: 0.95rem; min-height: 50px;
}
.cr-bandeau a { color: #fff; text-decoration: none; }
.cr-bandeau-info { display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 50px; }
.cr-bandeau-ligne1 { display: flex; align-items: center; gap: 12px; flex: none; }
.cr-pastille { flex: none; background: rgba(255,255,255,0.2); padding: 4px 10px; font-size: 0.7rem; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }
.cr-bandeau-date { font-weight: 700; white-space: nowrap; }
.cr-bandeau-date::after { content: " ·"; font-weight: 400; }
.cr-bandeau-texte { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-family: var(--font-serif); font-size: 1.05rem; }
.cr-fleche { display: inline-block; font-family: var(--font-sans); transition: transform 0.3s; }
.cr-bandeau-info:hover .cr-fleche { transform: translateX(4px); }
.cr-bandeau-membres { flex: none; display: inline-flex; align-items: center; gap: 7px; font-weight: 700; min-height: 50px; }
.cr-bandeau-membres svg { width: 15px; height: 15px; }
.cr-bandeau-membres:hover { text-decoration: underline; }

/* --- Barre de menu (remplace les anciens réglages de « header ») --- */
header.cr-header {
    position: sticky; top: 0; z-index: 1000;
    display: flex; align-items: center; gap: 30px;
    padding: 18px max(50px, env(safe-area-inset-right)) 18px max(50px, env(safe-area-inset-left));
    background: rgba(255,255,255,0.97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    flex-direction: row;
}
.cr-logo { display: flex; align-items: center; gap: 13px; text-decoration: none; color: var(--black-text); margin-right: auto; }
.cr-anneau { width: 26px; height: 26px; border: 5px solid var(--red-primary); border-radius: 50%; flex: none; }
.cr-logo b { display: block; font-family: var(--font-serif); font-size: 1.45rem; line-height: 1.1; letter-spacing: -0.3px; }
.cr-logo small { display: block; font-size: 0.62rem; letter-spacing: 2px; text-transform: uppercase; color: var(--grey-text); font-weight: 700; margin-top: 2px; }

.cr-nav ul { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; flex-wrap: nowrap; }
.cr-nav a { font-size: 0.82rem; letter-spacing: 1.5px; font-weight: 700; padding: 8px 0; white-space: nowrap; }
.cr-adherer {
    background: var(--black-text); color: #fff; text-decoration: none; white-space: nowrap;
    font: 700 0.8rem var(--font-sans); letter-spacing: 2px; text-transform: uppercase;
    padding: 13px 24px; transition: background 0.3s;
}
.cr-adherer:hover, .cr-adherer.actif { background: var(--red-primary); }

.cr-burger, .cr-fermer {
    display: none; width: 44px; height: 44px; padding: 8px; border: 0; background: none;
    color: var(--black-text); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.cr-burger svg, .cr-fermer svg { width: 28px; height: 28px; display: block; }

/* --- Menu téléphone (plein écran) --- */
.cr-tiroir {
    position: fixed; inset: 0; z-index: 10001;
    height: 100vh; height: 100dvh; /* dvh : hauteur réelle avec la barre d'adresse mobile */
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    display: flex; flex-direction: column;
    background: var(--black-text); color: #fff;
    padding: calc(14px + env(safe-area-inset-top)) calc(22px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) calc(22px + env(safe-area-inset-left));
    animation: crEntree 0.25s ease-out;
}
.cr-tiroir[hidden] { display: none; }
@keyframes crEntree { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.cr-tiroir-haut { display: flex; align-items: center; justify-content: space-between; }
.cr-tiroir .cr-logo { color: #fff; }
.cr-tiroir .cr-fermer { display: block; color: #fff; }
.cr-tiroir-liens { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 6px; }
.cr-tiroir-liens a { display: block; padding: 8px 0; color: #fff; text-decoration: none; font-family: var(--font-serif); font-size: 2rem; line-height: 1.2; }
.cr-tiroir-liens a:active, .cr-tiroir-liens a:hover { color: var(--red-primary); }
.cr-tiroir-next { display: block; margin-top: 28px; padding-top: 16px; border-top: 1px solid #333; color: #aaa; text-decoration: none; font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; }
.cr-tiroir-next b { display: block; margin-top: 4px; color: #fff; font-size: 1rem; letter-spacing: 0; text-transform: none; line-height: 1.4; }
.cr-tiroir-bas { margin-top: auto; padding-top: 28px; display: grid; gap: 10px; }
.cr-tiroir-bas a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; text-decoration: none; font: 700 0.85rem var(--font-sans); letter-spacing: 2px; text-transform: uppercase; }
.cr-tiroir-membres { border: 1.5px solid #fff; color: #fff; }
.cr-tiroir-membres svg { width: 16px; height: 16px; }
.cr-tiroir-adherer { background: var(--red-primary); color: #fff; }

/* Défilement bloqué sous le menu ouvert (iPhone compris) */
html.cr-verrou, html.cr-verrou body { overflow: hidden; }
html.cr-verrou body { position: fixed; left: 0; right: 0; width: 100%; }

/* --- Tablette et téléphone --- */
@media (max-width: 900px) {
    .cr-bandeau { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
    /* Téléphone : bandeau sur deux lignes, plus grand */
    .cr-bandeau-info { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; padding: 12px 0; min-height: 72px; width: 100%; }
    .cr-bandeau-ligne1 { gap: 10px; font-size: 0.72rem; letter-spacing: 1.5px; text-transform: uppercase; }
    .cr-pastille { padding: 3px 8px; font-size: 0.66rem; }
    .cr-bandeau-date::after { content: ""; }
    .cr-bandeau-texte { font-size: 1.12rem; font-weight: 700; line-height: 1.25; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .cr-bandeau-membres { display: none; }
    header.cr-header { padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); gap: 12px; }
    .cr-nav, .cr-adherer { display: none; }
    .cr-burger { display: block; margin-right: -8px; }
    .cr-logo b { font-size: 1.25rem; }
}
@media (max-width: 420px) {
    .cr-logo small { font-size: 0.56rem; letter-spacing: 1.5px; }
}
@media (prefers-reduced-motion: reduce) {
    .cr-tiroir { animation: none; }
    .cr-fleche { transition: none; }
}
.cr-nav a.actif::after { width: 100%; }

/* Animation d'accueil déjà vue pendant la visite : jamais affichée */
html.cr-sans-intro #intro-overlay { display: none !important; }
