/* VERSION 2 — compléments pour le site complet (accueil, à propos, événements, contact).
   Chargé APRÈS style.css sur toutes les pages. */

/* ---------- Logo dessiné ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.brand-note { width: auto; height: 40px; flex: none; display: block; }
.brand-txt { font: 700 1rem/1 var(--title); letter-spacing: .01em; white-space: nowrap; }
.brand--big .brand-note { width: auto; height: 52px; }
.brand--big .brand-txt { font-size: 1.35rem; }
@media (max-width: 900px) { .sh-logo { padding: 0 14px; } }

/* ---------- Fond « lumières de scène » (remplace les photos générées par Wix) ---------- */
.stage-bg { position: relative; background-color: var(--ink); overflow: hidden; isolation: isolate; }
.stage-bg::after {
  content: ""; position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 55% at 18% 8%, rgba(240,138,36,.55), transparent 70%),
    radial-gradient(35% 50% at 82% 0%, rgba(211,58,0,.6), transparent 70%),
    radial-gradient(30% 40% at 55% 10%, rgba(255,214,150,.25), transparent 70%),
    radial-gradient(60% 45% at 50% 110%, rgba(211,58,0,.35), transparent 70%),
    conic-gradient(from 200deg at 20% -10%, transparent 0 8deg, rgba(255,190,120,.10) 8deg 14deg, transparent 14deg 360deg),
    conic-gradient(from 150deg at 80% -10%, transparent 0 6deg, rgba(255,120,60,.12) 6deg 12deg, transparent 12deg 360deg);
  animation: projecteurs 14s ease-in-out infinite alternate;
}
.hero.stage-bg::before { background: linear-gradient(180deg, rgba(17,17,19,.05) 0%, rgba(17,17,19,.75) 85%); }
@keyframes projecteurs { from { transform: translateX(-3%) rotate(-1deg); } to { transform: translateX(3%) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { .stage-bg::after { animation: none; } }

/* Blocs avec photo (data-photo) : la photo remplace les lumières dessinées */
.has-photo { background-size: cover; background-position: center; background-repeat: no-repeat; }
.has-photo.stage-bg::after { display: none; }
.hero.has-photo { background-position: center 35%; }

/* Photo en haut des cartes « formules » */
.formule { overflow: hidden; }
.formule-img { display: block; width: calc(100% + 44px); max-width: none; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin: -28px -22px 20px; }
.formule.vedette .formule-img { width: calc(100% + 44px); }

/* Égaliseur animé */
.eq { display: inline-flex; align-items: flex-end; gap: 4px; height: 28px; }
.eq i { width: 5px; background: var(--rust); animation: eq 1.1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
.eq i:nth-child(4) { animation-delay: -.15s; } .eq i:nth-child(5) { animation-delay: -.45s; }
@keyframes eq { 0%, 100% { height: 20%; } 50% { height: 100%; } }
@media (prefers-reduced-motion: reduce) { .eq i { animation: none; height: 60%; } }

/* ---------- Grand bandeau d'accueil ---------- */
.hero--home { min-height: min(78vh, 680px); margin: 14px 16px 0; }
.hero--home h1 { font-size: clamp(3rem, 11vw, 6.4rem); }
.hero--page { min-height: 300px; }
.hero--page h1 { font-size: clamp(2.4rem, 8vw, 4.2rem); }

/* ---------- Sections ---------- */
.section { max-width: 1140px; margin: 0 auto; padding: 72px 16px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.section-head h2, .h2 { margin: 12px 0 0; font: 800 clamp(2rem, 6vw, 3.4rem)/1 var(--title); text-transform: uppercase; letter-spacing: -.01em; }
.lead-txt { font-size: 1.08rem; line-height: 1.65; max-width: 620px; }
.muted { color: var(--muted); }

/* Notre histoire */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.story-visual { aspect-ratio: 4 / 3; display: flex; align-items: flex-end; padding: 24px; color: #fff; }
.story-visual b { font: 800 clamp(2rem, 6vw, 3.4rem)/1 var(--title); text-transform: uppercase; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 24px; }
.stat { background: var(--panel); padding: 14px; }
.stat b { display: block; font: 700 2rem/1 var(--title); color: var(--rust); }
.stat span { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Cartes (jukebox, engagements) */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { background: var(--panel); padding: 26px 22px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); transition: transform .15s, background .15s; }
a.card:hover { transform: translateY(-3px); background: #e4e4e6; }
.card h3 { margin: 0; font: 700 1.6rem/1.05 var(--title); text-transform: uppercase; }
.card p { margin: 0; color: #3d3d41; }
.card .go { margin-top: auto; font: 500 .72rem var(--text); letter-spacing: .12em; text-transform: uppercase; color: var(--rust); }
.card-num { font: 800 2.4rem/1 var(--title); color: var(--rust); }

.jukebox { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 14px; color: #fff; }
.jukebox b { font: 800 clamp(1.6rem, 5vw, 2.4rem)/1 var(--title); text-transform: uppercase; display: flex; align-items: center; gap: 14px; }
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: #ff3b2f; box-shadow: 0 0 0 0 rgba(255,59,47,.6); animation: pouls 1.6s infinite; }
@keyframes pouls { 70% { box-shadow: 0 0 0 12px rgba(255,59,47,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,47,0); } }

/* Formules */
.formules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.formule { background: #fff; border: 1px solid var(--line); padding: 28px 22px; display: flex; flex-direction: column; text-align: center; gap: 6px; }
.formule.vedette { border: 2px solid var(--rust); }
.formule h3 { margin: 0; font: 600 1.35rem var(--title); text-transform: uppercase; }
.formule .prix { font: 800 2.4rem/1.1 var(--title); color: var(--rust); margin-top: 10px; }
.formule .detail { font-size: .78rem; color: var(--muted); }
.formule p { margin: 14px 0; color: #3d3d41; }
.formule .inclus { font-size: .8rem; color: var(--muted); margin-bottom: 18px; }
.formule .btn { margin-top: auto; }
.center { text-align: center; }

/* Agenda */
.events { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.event { display: grid; grid-template-columns: 86px 1fr auto; gap: 18px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.event-date { text-align: center; background: var(--ink); color: #fff; padding: 10px 6px; }
.event-date b { display: block; font: 800 2rem/1 var(--title); }
.event-date span { display: block; font: 600 .78rem var(--title); text-transform: uppercase; letter-spacing: .08em; }
.event-date small { display: block; font-size: .65rem; color: #b9b9bf; text-transform: uppercase; }
.event h3 { margin: 0; font: 700 1.25rem/1.2 var(--title); text-transform: uppercase; }
.event p { margin: 4px 0 0; font-size: .88rem; color: var(--muted); }
.event .desc { color: #3d3d41; }
.event.prive .event-date { background: var(--panel); color: var(--ink); }
.event.prive .event-date small { color: var(--muted); }
.event.passe { opacity: .7; }
.event.ce-soir .event-date { background: var(--rust); }
.badge { display: inline-block; margin-left: 8px; padding: 2px 8px; font: 600 .65rem var(--text); letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; background: var(--rust); color: #fff; }
.badge--gris { background: var(--panel); color: var(--muted); }

/* CTA noir */
.cta { margin: 72px 16px 0; padding: 64px 20px; text-align: center; color: #fff; }
.cta h2 { margin: 14px auto 0; max-width: 900px; font: 800 clamp(1.8rem, 5vw, 3.2rem)/1.05 var(--title); text-transform: uppercase; }
.cta p { margin: 16px auto 26px; max-width: 620px; color: #d9d9de; }

/* À propos : membres */
.membres { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.membre { background: var(--panel); padding: 18px 14px; text-align: center; }
.avatar { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font: 700 1.6rem var(--title); color: #fff; background: linear-gradient(135deg, #f08a24, var(--rust)); }
.membre b { display: block; font: 700 1.15rem var(--title); text-transform: uppercase; }
.membre span { font-size: .82rem; color: var(--muted); }

/* ---------- Formulaires ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 12px; font: 400 1rem var(--text); color: var(--ink); background: #fff; border: 1px solid var(--ink); border-radius: 0; }
.field textarea { min-height: 130px; resize: vertical; }
.field select:focus, .field textarea:focus { outline: 2px solid var(--rust); outline-offset: 1px; }
.field .req { color: var(--rust); }
.piege { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; margin: 10px 0 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--rust); flex: none; }
.form-msg { min-height: 1.2em; margin: 10px 0 0; font-size: .88rem; font-weight: 500; }
.form-msg.ok { color: #1c7a43; }
.form-msg.err { color: var(--rust); }
.contact-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.contact-info { padding: 26px 22px; color: #fff; }
.contact-info h2 { margin: 12px 0 14px; font: 700 1.6rem/1.1 var(--title); text-transform: uppercase; }
.contact-info p { margin: 0 0 14px; color: #d9d9de; }
.contact-info a { color: #fff; }
.contact-info dt { font: 500 .7rem var(--text); letter-spacing: .12em; text-transform: uppercase; color: #a9a9b0; margin-top: 14px; }
.contact-info dd { margin: 4px 0 0; }
.merci { padding: 40px 20px; text-align: center; }
.merci h2 { font: 800 2.2rem/1 var(--title); text-transform: uppercase; margin: 12px 0; }

/* Pied de page : newsletter */
.sf-grid { grid-template-columns: 1.3fr repeat(3, 1fr) 1.5fr; }
.sf-news p { margin: 0 0 10px; font-size: .82rem; }
.sf-news input[type="email"] { width: 100%; min-height: 44px; padding: 8px 10px; font: 400 .95rem var(--text); border: 1px solid var(--ink); border-radius: 0; background: #fff; }
.sf-news .check { font-size: .78rem; }
.sf-copy a { color: inherit; }
@media (max-width: 1000px) { .sf-grid { grid-template-columns: 1fr 1fr 1fr; } .sf-brand, .sf-news { grid-column: 1 / -1; } }

/* Mentions légales */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font: 700 1.5rem var(--title); text-transform: uppercase; margin: 36px 0 10px; }
.prose p, .prose li { color: #3d3d41; line-height: 1.65; }

/* Dédicaces (page de vote + écran de scène) */
.dedi { margin-top: 40px; padding: 24px 20px; color: #fff; }
.dedi h2 { margin: 12px 0 6px; font: 800 1.9rem/1 var(--title); text-transform: uppercase; }
.dedi p { color: #d9d9de; margin: 0 0 16px; }
.dedi .field span { color: #a9a9b0; }
.dedi .count-car { font-size: .75rem; color: #a9a9b0; text-align: right; margin-top: -8px; }
.ticker { margin-top: 22px; border-top: 1px solid #2b2b30; padding-top: 16px; }
.ticker h2 { font: 700 1.2rem var(--title); text-transform: uppercase; margin: 0 0 10px; color: #fff; }
.ticker blockquote { margin: 0 0 12px; padding: 12px 14px; background: #1d1d21; border-left: 3px solid var(--rust); font-size: 1.05rem; }
.ticker cite { display: block; margin-top: 4px; font-style: normal; font-size: .8rem; color: #a9a9b0; }

/* Écran de scène : colonne QR + dédicaces */
.side { position: sticky; top: calc(var(--header-h) + 24px); }
.side .qr-card { position: static; }
body.projection .side { top: 24px; }
@media (max-width: 860px) { .side { position: static; } }

/* Admin : sections v2 */
.adm-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.adm-item:last-child { border-bottom: 0; }
.adm-item h3 { margin: 0; font: 700 1rem var(--title); text-transform: uppercase; }
.adm-item p { margin: 4px 0 0; font-size: .85rem; color: #3d3d41; overflow-wrap: anywhere; }
.adm-item .row-actions { margin-top: 8px; }
.adm-item.done { opacity: .55; }
.tabs-mini { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .story, .contact-grid { grid-template-columns: 1fr; }
  .cards, .formules { grid-template-columns: 1fr; }
  .membres { grid-template-columns: repeat(2, 1fr); }
  .section { padding-top: 56px; }
}
@media (max-width: 560px) {
  .hero--home { margin: 0; min-height: 560px; }
  .form-grid { grid-template-columns: 1fr; }
  .event { grid-template-columns: 70px 1fr; }
  .event .btn { grid-column: 1 / -1; }
  .event-date b { font-size: 1.6rem; }
  .cta { margin: 56px 0 0; }
  .stats { gap: 6px; } .stat { padding: 10px; } .stat b { font-size: 1.6rem; }
  .membres { grid-template-columns: 1fr 1fr; }
}

/* ---------- Écran d'intro (accueil) : écran noir, la note apparaît puis glisse
   à gauche pour révéler le nom du groupe. Voir assets/intro.js. ---------- */
#intro { display: none; }
html.intro { overflow: hidden; }
html.intro #intro {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; background: var(--ink); cursor: pointer;
  animation: intro-sortie .8s ease-in 5.2s forwards;
}
.intro-logo { display: flex; align-items: center; }
.intro-note {
  width: auto; height: clamp(84px, 22vw, 140px); flex: none;
  opacity: 0; transform: scale(.6) rotate(-12deg);
  filter: drop-shadow(0 0 0 rgba(240,138,36,0));
  animation: intro-note 1.1s cubic-bezier(.2,.9,.3,1.3) .4s forwards, intro-halo 1.6s ease-in-out 1.3s;
}
/* Le nom part d'une largeur nulle : la note est seule au centre, puis la largeur
   s'ouvre et la note se décale naturellement vers la gauche. */
.intro-nom { display: block; font: 700 clamp(2.2rem, 9vw, 4.6rem)/1.1 var(--title); max-width: 0; overflow: hidden; white-space: nowrap; animation: intro-ouvre 1.4s cubic-bezier(.7,0,.2,1) 2.1s forwards; }
.intro-nom span {
  display: inline-block; padding-left: .35em; color: #fafafb;
  letter-spacing: .01em;
  opacity: 0; transform: translateX(-30%);
  animation: intro-texte 1.2s ease-out 2.3s forwards;
}
.intro-sub {
  font: 600 clamp(.7rem, 2.4vw, .95rem) var(--title); letter-spacing: .3em; text-transform: uppercase; color: var(--rust);
  opacity: 0; animation: intro-fondu .8s ease-out 3.5s forwards;
}
@keyframes intro-note { to { opacity: 1; transform: none; } }
@keyframes intro-halo { 50% { filter: drop-shadow(0 0 18px rgba(240,138,36,.75)); } }
@keyframes intro-ouvre { to { max-width: 9em; } }
@keyframes intro-texte { to { opacity: 1; transform: none; } }
@keyframes intro-fondu { to { opacity: 1; } }
@keyframes intro-sortie { to { opacity: 0; visibility: hidden; } }
html.intro-fin #intro { animation: intro-sortie .35s ease-in forwards; }
/* L'intro reste figée sur l'écran noir (logo invisible) tant que intro.js n'a pas
   ajouté la classe .go : logo chargé, polices prêtes et page réellement à l'écran. */
html.intro:not(.go) #intro, html.intro:not(.go) #intro * { animation-play-state: paused !important; }
.intro-note { background: none; }

/* Admin : section Répertoire */
.rep-barre { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.rep-recherche { flex: 1; min-width: 180px; min-height: 44px; padding: 8px 12px; font: 400 .95rem var(--text); border: 1px solid var(--ink); border-radius: 0; }
.rep-form { margin: 0 0 16px; padding: 16px; background: var(--paper); border: 1px solid var(--line); }
.rep-form h3 { margin: 0 0 12px; font: 700 1.1rem var(--title); text-transform: uppercase; }
.rep-ambiances { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.rep-ambiances label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); background: #fff; font-size: .85rem; cursor: pointer; }
.field .rep-ambiances input { width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--rust); -webkit-appearance: auto; appearance: auto; }
.rep-liste { max-height: 520px; overflow-y: auto; border-top: 1px solid var(--line); }
.rep-ligne { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.rep-ligne .info { flex: 1; min-width: 0; }
.rep-ligne b { display: block; font: 600 .98rem var(--title); overflow-wrap: anywhere; }
.rep-ligne span { font-size: .78rem; color: var(--muted); }
.rep-ligne .nouveau { background: #fff4d6; }
.rep-retirees { margin-top: 14px; }
.rep-retirees summary { cursor: pointer; font-size: .85rem; color: var(--muted); padding: 6px 0; }
.rep-flash { animation: rep-flash 1.6s ease-out; }
@keyframes rep-flash { from { background: #fff1b8; } to { background: transparent; } }

/* Admin : assistant IA */
.ia-remplir { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 12px; }
.ia-remplir .hint { margin: 0; }
.ia-suggere { outline: 2px solid #e0a400 !important; background: #fffbea !important; }
.ia-panneau { margin: 0 0 16px; padding: 16px; background: var(--paper); border: 1px solid var(--line); }
.ia-tete { display: flex; justify-content: space-between; align-items: center; }
.ia-tete h3 { margin: 0; font: 700 1.1rem var(--title); text-transform: uppercase; }
.ia-panneau .sheet-fermer { display: block; width: 40px; height: 40px; border: 0; background: none; font: 400 1.7rem/1 var(--text); cursor: pointer; }
.ia-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .82rem; }
.ia-table th, .ia-table td { text-align: left; vertical-align: top; padding: 7px 6px; border-bottom: 1px solid var(--line); }
.ia-table th { font: 600 .7rem var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ia-table b { font: 600 .9rem var(--title); }
.ia-table .avant { color: var(--muted); text-decoration: line-through; }
.ia-table .apres { color: #1c7a43; font-weight: 600; }
.ia-conf { display: inline-block; padding: 1px 7px; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.ia-conf.haute { background: #d9f2e3; color: #1c6b3f; }
.ia-conf.moyenne { background: #fff1cc; color: #7a5600; }
.ia-conf.basse { background: #f8d7d3; color: #9b2c1f; }
.ia-table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--rust); }
.ia-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }

/* ---- Écran géant : le QR code prend beaucoup plus de place (lisible de loin) ---- */
body.stage .stage-grid { max-width: none; grid-template-columns: 1fr clamp(320px, 38vw, 1700px); gap: clamp(24px, 3vw, 120px); }
body.stage .qr-card { padding: clamp(18px, 2.4vw, 40px); }
body.stage .qr-card h2 { font-size: clamp(1.5rem, 2.8vw, 3rem); }
body.stage .qr-card #qr img, body.stage .qr-card #qr canvas { max-width: min(100%, 56vh); width: 100%; image-rendering: pixelated; }
body.stage .qr-card p { font-size: clamp(.85rem, 1.3vw, 1.5rem); }
@media (max-width: 860px) {
  body.stage .stage-grid { grid-template-columns: 1fr; }
  body.stage .qr-card { max-width: min(100%, 560px); }
  body.stage .qr-card #qr img, body.stage .qr-card #qr canvas { max-width: 100%; }
}

/* Un élément marqué « hidden » doit vraiment disparaître (sinon .btn { display:flex } l'affiche quand même) */
[hidden] { display: none !important; }

/* Message flottant : largeur selon le texte (sinon il se coince dans la moitié de l'écran et se coupe en 5 lignes) */
.toast { width: max-content; max-width: min(90vw, 420px); }
