/* Flash by MonConcert — style repris de monconcert.fr : noir, orange, Poppins.
   Effets volontairement légers : dégradés fixes, ni flou ni animation de fond. */
:root {
  color-scheme: dark;
  --fond: #141414;
  --carte: #202020;
  --bord: #3b3b3b;
  --encre: #ffffff;
  --doux: #c4c4c4;
  --accent: #f0900f;
  --sur-accent: #141414;
  --alerte: #d93a2b;
  --police: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --police-titre: var(--police);
  --rayon: 18px;
}
/* Un thème n'est qu'une liste de couleurs et de polices. */
.theme-mariage {
  color-scheme: light;
  --fond: #f6f1e8;
  --carte: #ffffff;
  --bord: #e2d9c8;
  --encre: #1f1b16;
  --doux: #5f574b;
  --accent: #8f6d2a;
  --sur-accent: #ffffff;
  --police-titre: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--fond);
  background-image: radial-gradient(120% 60% at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%);
  background-repeat: no-repeat;
  color: var(--encre);
  font: 400 17px/1.5 var(--police);
}
.ecran {
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 22px max(20px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.tete { display: flex; align-items: center; justify-content: space-between; }
.marque { display: flex; align-items: center; gap: 10px; font-size: 19px; letter-spacing: 0.02em; }
.marque img { height: 28px; width: auto; }
.marque b { font-weight: 700; }
.flash {
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.bloc { display: flex; flex-direction: column; gap: 12px; margin-top: 8vh; }
.surtitre {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font: 700 clamp(30px, 9vw, 42px)/1.12 var(--police-titre);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
p { margin: 0; color: var(--doux); }
.fort { color: var(--encre); font-size: 20px; font-weight: 600; margin-top: 10px; }
.bouton {
  display: block;
  margin-top: 18px;
  padding: 16px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--sur-accent);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.bouton:focus-visible, a:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }
.pied { margin-top: auto; text-align: center; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.pied a { color: var(--doux); margin: 0 9px; padding: 8px 0; display: inline-block; }

/* ---------- Écran invité ---------- */
/* Champs « fichier » : invisibles mais toujours présents (on y accède par leurs boutons). */
.cache { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
#invite { display: flex; flex-direction: column; gap: 18px; }
.bloc.serre { margin-top: 0; gap: 6px; }
h2 { margin: 6px 0 0; font-size: 18px; font-weight: 600; }
.petit { font-size: 13px; }
.petit a { color: var(--accent); font-weight: 600; }
.carte {
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--encre);
}
.carte label { font-weight: 500; }
.carte .bouton { margin-top: 0; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.carte input:not([type="checkbox"]) {
  width: 100%;
  min-height: 52px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid var(--bord);
  background: var(--fond);
  color: var(--encre);
  font: inherit;
  font-size: 18px;
}
.carte input:focus-visible, button:focus-visible, .declencheur:focus-within .rond, .second:focus-within { outline: 3px solid var(--encre); outline-offset: 3px; }
.ligne { display: flex; gap: 8px; }
.ligne input { flex: 1; min-width: 0; }
.ligne .bouton { padding: 0 22px; }
.case { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--doux); }
.case input { width: 22px; height: 22px; accent-color: var(--accent); }
.bouton:disabled { opacity: 0.6; }

.declencheur { display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: 19px; font-weight: 600; cursor: pointer; margin: 6px 0; }
.rond {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--sur-accent);
  box-shadow: 0 0 0 6px var(--fond), 0 0 0 8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.declencheur:active .rond { transform: scale(0.96); }
.bouton.second { margin-top: 0; background: var(--carte); color: var(--encre); border: 1px solid var(--bord); cursor: pointer; }

.grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vignette { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; background: var(--carte) center / cover no-repeat; overflow: hidden; }
.vignette.enjeu { outline: 3px solid var(--accent); outline-offset: -3px; }
.croix {
  position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(20, 20, 20, 0.72); color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
}
.joue {
  position: absolute; left: 6px; right: 6px; bottom: 6px; min-height: 36px; border-radius: 999px;
  border: 0; background: rgba(20, 20, 20, 0.78); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.joue[aria-pressed="true"] { background: var(--accent); color: var(--sur-accent); }
.pastille { position: absolute; left: 6px; bottom: 6px; padding: 3px 9px; border-radius: 999px; background: rgba(20, 20, 20, 0.78); color: #fff; font-size: 12px; }
.confirme { position: absolute; inset: 0; background: rgba(20, 20, 20, 0.86); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 600; }
.confirme div { display: flex; gap: 6px; }
.confirme button { min-width: 44px; min-height: 40px; border-radius: 999px; border: 1px solid #fff; background: transparent; color: #fff; font: inherit; font-size: 14px; cursor: pointer; }
.confirme button[data-a="suppr-oui"] { background: var(--alerte); border-color: var(--alerte); }

.alerte { padding: 18px; border-radius: var(--rayon); border: 1px solid var(--alerte); color: var(--encre); font-weight: 500; }
.attente { border-color: var(--accent); }
.tirage { border-color: var(--accent); gap: 6px; }

#annonce {
  position: fixed; left: 12px; right: 12px; top: max(12px, env(safe-area-inset-top)); z-index: 10;
  max-width: 456px; margin: 0 auto; padding: 16px 18px; border-radius: 16px;
  background: var(--alerte); color: #fff; border: 2px solid #fff;
  font-size: 17px; font-weight: 600; line-height: 1.35; text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(-20px); pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
#annonce.bonne { background: var(--accent); color: var(--sur-accent); border-color: transparent; }
#annonce.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { #annonce { transition: none; } .declencheur:active .rond { transform: none; } }
h1.long { font-size: clamp(22px, 6.4vw, 30px); }

/* ---------- Galerie ---------- */
.ecran.large { max-width: 900px; }
.grille.galerie { grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (min-width: 700px) { .grille.galerie { grid-template-columns: repeat(5, 1fr); } }
.grille.galerie .vignette { aspect-ratio: 1; border-radius: 10px; display: block; }
.grille.galerie img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grande { width: 100%; height: auto; max-height: 76vh; object-fit: contain; border-radius: var(--rayon); background: #000; }
.retour { color: var(--accent); font-weight: 600; text-decoration: none; padding: 8px 0; display: inline-block; }
.retrait summary { color: var(--doux); font-size: 14px; text-decoration: underline; cursor: pointer; padding: 10px 0; }
.retrait .carte { margin-top: 8px; }

/* ---------- Pages légales ---------- */
.legal { display: flex; flex-direction: column; gap: 12px; }
.legal h1 { font-size: clamp(26px, 7vw, 34px); margin-bottom: 6px; }
.legal h2 { margin-top: 14px; color: var(--encre); }
.legal ul { margin: 0; padding-left: 1.2em; color: var(--doux); display: flex; flex-direction: column; gap: 6px; }
.legal a { color: var(--accent); }
.legal b { color: var(--encre); }
