/* Jeux Insoumis : feuille de style commune (aucune dépendance externe).
   Charte des maquettes d'Alex : fond blanc, texte noir, une couleur vive par rubrique
   (Mots croisés rose, Ludothèque vert, Rendez-vous jaune, Contacts cyan), police Poppins.
   Les jetons (couleurs, polices) sont dans tokens.css, chargé AVANT ce fichier. */

/* ---------- Polices hébergées sur le site (licence OFL, aucun appel extérieur) ---------- */
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-MediumItalic.ttf") format("truetype"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-BoldItalic.ttf") format("truetype"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Kalam"; src: url("../fonts/Kalam-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Kalam"; src: url("../fonts/Kalam-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
/* Polices des livrets (aperçu sur canevas et choix de police) : à garder */
@font-face { font-family: "Patrick Hand"; src: url("../fonts/PatrickHand-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Anton"; src: url("../fonts/Anton-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Lato"; src: url("../fonts/Lato-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lato"; src: url("../fonts/Lato-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

/* ---------- Variables propres à cette feuille ----------
   Les anciens noms (--violet-pale, --rouge…) restent définis pour ne rien casser, mais prennent
   les valeurs de la nouvelle charte : gris neutres, rose foncé pour les accents de texte. */
:root {
  --violet-2: var(--encre);
  --violet-clair: #BDBDBD;   /* bordures légères */
  --violet-pale: #F3F3F3;    /* fonds légers */
  --rouge: #D6006F;          /* accent de texte (rose foncé, lisible sur blanc) */
  --rouge-fonce: #A3004F;
  --danger: #B00020;
  --creme: #FFFBD6;          /* jaune très pâle */
  --jaune-pale: #FFF8B0;     /* cartes des grilles (maquette « Dernières grilles ») */
  --gris: #5C5C5C;
  --ligne: #D6D6D6;
  --carte: #FFFFFF;
  --ok: #1E7F4F;
  --grise: #CFCFCF;
  --ombre: 0 2px 10px rgba(0, 0, 0, .06);
  --ombre-dure: 4px 4px 0 var(--encre);
  --titre: var(--police-titre);
  --texte: var(--police-texte);
  --main: var(--police-main);
  --ecolier: "Patrick Hand", "Kalam", cursive;
  /* déclinaisons de la couleur de rubrique (rose par défaut) */
  --rub-pale: #FFE3F2;       /* fond léger */
  --rub-encre: #C2006B;      /* version foncée, lisible en texte sur blanc */
  --motif: #F7A6D2;          /* motif du sous-titre */
}
body.rub-mots { --rub-pale: #FFE3F2; --rub-encre: #C2006B; --motif: #FF7FC4; }
body.rub-ludo { --rub-pale: #E6FFD6; --rub-encre: #267A00; --motif: #8EF25A; }
body.rub-rdv { --rub-pale: #FFFCC7; --rub-encre: #6F6800; --motif: #E8DC00; }
body.rub-contacts { --rub-pale: #D9FFFF; --rub-encre: #006E6E; --motif: #4FE6E6; }
body.rub-accueil, body.rub-autre { --motif: #C8C8C8; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--texte); font-size: 17px; line-height: 1.55; color: var(--encre); background: var(--fond); overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--encre); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--encre); text-decoration-thickness: 3px; text-decoration-color: var(--rub-encre); }
h1, h2, h3 { line-height: 1.2; font-family: var(--titre); }
h1 { font-weight: 700; font-size: clamp(28px, 4.2vw, 40px); margin: .3em 0 .45em; color: var(--encre); }
h2 { font-size: 23px; font-weight: 700; }
h3 { font-weight: 600; }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--encre); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; color: #fff; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 22px; padding-bottom: 96px; min-height: 50vh; }
.petit { font-size: 14px; color: var(--gris); }
.lead { font-size: 19px; }
.vide { padding: 30px; text-align: center; color: var(--gris); background: rgba(255, 255, 255, .85); border: 2px dashed var(--violet-clair); border-radius: var(--rayon); }
code { background: var(--violet-pale); padding: 1px 5px; border-radius: 4px; }
::selection { background: var(--jaune); color: var(--encre); }

/* ---------- Boutons ----------
   Contour noir, coins arrondis, texte noir en italique (maquettes : « Télécharger », « Proposer un rendez-vous »).
   .btn-rouge = bouton principal, à la couleur de la rubrique (le nom est gardé, d'autres pages s'en servent). */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 9px 18px; border-radius: 10px; border: 2px solid var(--encre); background: #fff; color: var(--encre); font: italic 600 16px/1.15 var(--texte); text-decoration: none; cursor: pointer; transition: transform .08s, box-shadow .08s, background .15s; }
.btn:hover { color: var(--encre); text-decoration: none; box-shadow: 3px 3px 0 var(--encre); transform: translate(-1px, -1px); }
.btn:active { transform: translate(1px, 1px); box-shadow: none; }
.btn-rouge { background: var(--rub); color: var(--encre); }
.btn-rouge:hover { background: var(--rub); color: var(--encre); }
.btn-contour { background: #fff; color: var(--encre); border-color: var(--encre); }
.btn-contour:hover { background: var(--rub-pale); color: var(--encre); border-color: var(--encre); }
.btn-blanc { background: #fff; color: var(--encre); border-color: #fff; }
.btn-blanc:hover { background: #fff; color: var(--encre); }
.btn-danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; box-shadow: 3px 3px 0 var(--encre); }
.btn-petit { min-height: 36px; padding: 5px 12px; font-size: 14px; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.lien-clair { color: #fff; font-size: 14px; }
.lien-clair:hover { color: #fff; text-decoration-color: #fff; }
.lien-bouton { background: none; border: 0; padding: 0; color: var(--gris); text-decoration: underline; cursor: pointer; font: inherit; }
.boutons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Étoile à pointes (macro etoile) ----------
   Couleur de la rubrique (rose sur l'accueil et les pages secondaires), texte noir gras penché. */
.etoile { --etoile-fond: var(--rub); display: inline-grid; place-items: center; min-width: 4.6em; min-height: 4.6em; padding: 1.5em 1.7em; background: var(--etoile-fond); color: var(--encre); text-align: center; text-decoration: none; line-height: 1.05;
  clip-path: polygon(50% 1.6%, 56.9% 19.9%, 70.3% 7.9%, 69% 26.2%, 87% 20.5%, 79% 36%, 98.5% 38.9%, 83% 50%, 98.6% 61.1%, 79.4% 64.1%, 88.8% 81%, 69% 73.9%, 70.8% 93.1%, 57.8% 84.1%, 50% 99.4%, 43% 80.6%, 29.7% 92.2%, 27.7% 77.9%, 13.2% 79.4%, 20.8% 64%, 6% 60%, 19.7% 50%, 5.4% 39.8%, 21.4% 36.2%, 11.5% 19.3%, 30.9% 26%, 29% 6.3%, 42.2% 16%); }
.etoile-texte { display: block; font: italic 700 1.15em/1.05 var(--titre); transform: rotate(-8deg); }
a.etoile:hover { color: var(--encre); filter: brightness(1.05); transform: rotate(-3deg) scale(1.04); }
a.etoile { transition: transform .15s; }
a.etoile:focus-visible .etoile-texte { text-decoration: underline 3px; text-underline-offset: 4px; }
.etoile.etoile-rose { --etoile-fond: var(--rose); }
.etoile.etoile-blanche { --etoile-fond: #fff; color: var(--rose); }
.etoile.etoile-blanche .etoile-texte { font-style: normal; transform: none; }

/* ---------- Bandeau électoral (haut de page) ---------- */
.bandeau-elec { background: linear-gradient(90deg, #590F98 0%, #656567 100%); color: #fff; position: relative; z-index: 2; }
.bandeau-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding-top: 6px; padding-bottom: 6px; min-height: 76px; }
.bandeau-txt { margin: 0; display: flex; align-items: center; gap: 12px; font-size: 14.5px; line-height: 1.3; font-weight: 500; }
.bandeau-txt small { display: block; font-size: 14.5px; font-weight: 500; }
.bandeau-jours { --etoile-fond: #fff; color: var(--rose); flex: none; min-width: 0; min-height: 0; width: 96px; height: 76px; padding: 0; margin: -4px 0 -4px -10px; }
.bandeau-jours .etoile-texte { font: 700 32px/1 var(--titre); transform: none; letter-spacing: -.5px; }
.bandeau-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bandeau-elec .btn { font-style: normal; font-weight: 500; border-radius: 10px; }
.bandeau-elec .btn:hover { box-shadow: 3px 3px 0 rgba(0, 0, 0, .45); }
.bandeau-elec :focus-visible, .mobilisation :focus-visible { outline-color: #fff; }

/* ---------- En-tête : titre manuscrit, sous-titre, petite ligne, 4 boutons ---------- */
.page { position: relative; }
.site-header { position: relative; z-index: 1; padding: 14px 0 6px; }
.header-haut { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px 20px; }
.header-titre { min-width: 0; }
.titre-site { display: inline-block; color: var(--encre); text-decoration: none; line-height: 1; }
.titre-site:hover { color: var(--encre); }
/* sans l'image (pas encore livrée ou bloquée), le texte alternatif s'affiche en écriture à la main */
.titre-site-img { display: block; width: auto; height: clamp(54px, 7.6vw, 90px); max-width: 100%; font: 700 clamp(38px, 5.6vw, 62px)/1 var(--police-main); color: var(--encre); }
.titre-site-repli { display: none; font: 700 clamp(40px, 6vw, 66px)/1.05 var(--police-main); letter-spacing: 1px; }
.titre-site.sans-image .titre-site-img { display: none; }
.titre-site.sans-image .titre-site-repli { display: inline-block; transform: rotate(-1.5deg); }
.sous-titre-site { margin: 6px 0 0; font: italic 500 clamp(14px, 1.5vw, 17px)/1.35 var(--texte); color: var(--encre); max-width: 46em; }

/* petite ligne discrète en haut à droite (Mon espace) */
.nav-discrete { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 18px; font-size: 14px; padding-top: 2px; }
.nav-discrete a { position: relative; color: var(--encre); text-decoration: none; padding: 4px 0; font-weight: 500; white-space: nowrap; }
.nav-discrete a + a::before { content: "·"; position: absolute; left: -12px; top: 3px; color: var(--gris); pointer-events: none; }
.nav-discrete a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--rub-encre); }
.nav-discrete a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; }
.nav-discrete .nav-compte { border: 1.5px solid var(--encre); border-radius: 999px; padding: 3px 12px; margin-left: 4px; background: #fff; }
.nav-discrete .nav-compte::before { left: -16px !important; }
/* pastille du compteur « à valider » : bien visible */
.compteur { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--rose); color: var(--encre); border: 2px solid var(--encre); font: 700 13px/1 var(--texte); margin-left: 4px; vertical-align: 1px; }
.nav-toggle { display: none; align-items: center; gap: 8px; background: #fff; border: 2px solid var(--encre); color: var(--encre); border-radius: 10px; padding: 6px 14px; font: italic 600 15px var(--texte); min-height: 42px; cursor: pointer; }
.nav-toggle::before { content: ""; width: 16px; height: 12px; background: linear-gradient(var(--encre) 0 2px, transparent 2px 5px, var(--encre) 5px 7px, transparent 7px 10px, var(--encre) 10px 12px); }

/* les 4 gros boutons de rubrique */
.nav-rubriques { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px clamp(14px, 4vw, 60px); margin-top: 16px; }
.bouton-rub { --c: var(--rose); display: flex; align-items: center; justify-content: center; min-height: 66px; padding: 8px 12px; background: var(--c); color: var(--encre); border: 2px solid var(--encre); border-radius: 10px; box-shadow: var(--ombre-dure); text-decoration: none; text-align: center; transition: transform .08s, box-shadow .08s; }
.bouton-rub-mots { --c: var(--rose); }
.bouton-rub-ludo { --c: var(--vert); }
.bouton-rub-rdv { --c: var(--jaune); }
.bouton-rub-contacts { --c: var(--cyan); }
.bouton-rub-titre { font: italic 500 clamp(19px, 2.3vw, 30px)/1.1 var(--titre); }
.bouton-rub:hover { color: var(--encre); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--encre); }
.bouton-rub:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--encre); }
/* rubrique courante : bouton « enfoncé », titre souligné (pas seulement une couleur) */
.bouton-rub[aria-current="page"] { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--encre); border-width: 3px; }
.bouton-rub[aria-current="page"] .bouton-rub-titre { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.bouton-rub:focus-visible { outline: 3px solid var(--encre); outline-offset: 4px; }

/* grande tuile de l'accueil (même macro, avec picto et sous-titre) */
.tuile-rub { flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 0; overflow: hidden; background: #fff; text-align: left; min-height: 0; }
.tuile-picto { display: block; width: 100%; aspect-ratio: 1.2; object-fit: contain; padding: 12%; background: var(--c); border-bottom: 2px solid var(--encre); }
.tuile-rub .bouton-rub-titre { padding: 8px 12px 0; font-size: clamp(20px, 2.2vw, 28px); }
.tuile-rub .bouton-rub-sous { padding: 2px 12px 10px; font-size: 15px; line-height: 1.25; }
.tuile-rub:not(:has(.tuile-picto))::before { content: ""; display: block; aspect-ratio: 1.2; background: var(--c); border-bottom: 2px solid var(--encre); }

/* ---------- Messages ---------- */
.flash { padding: 12px 16px; border-radius: 10px; margin: 0 0 14px; background: #F4F4F4; border: 2px solid var(--encre); border-left-width: 8px; }
.flash-ok { background: #E8FFDC; border-left-color: #3CC700; }
.flash-error { background: #FFE6F3; border-left-color: var(--rouge); }
.flash-info { background: #FFFBD1; border-left-color: #E0C800; }
.annonce { background: var(--creme); border: 2px solid var(--encre); padding: 12px 16px; border-radius: var(--rayon); font-weight: 700; margin-bottom: 18px; }
.erreur-js { color: var(--rouge-fonce); font-weight: 700; }
/* ---------- Accueil ---------- */
.hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: stretch; margin: 10px 0 30px; }
.kicker { color: var(--rouge); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 14px; margin: 0; }
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); color: var(--encre); }
.souligne { color: var(--encre); box-shadow: inset 0 -.28em 0 #F7C6CD; }
.hero-lead { font-size: 19px; max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.hero-note { font-size: 15px; color: var(--gris); max-width: 60ch; }
.compte-rebours { background: var(--encre); color: #fff; border-radius: 18px; padding: 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; box-shadow: var(--ombre); position: relative; overflow: hidden; }
.compte-rebours::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; background: repeating-linear-gradient(0deg, transparent 0 30px, rgba(255,255,255,.08) 30px 32px), repeating-linear-gradient(90deg, transparent 0 30px, rgba(255,255,255,.08) 30px 32px); transform: rotate(12deg); }
.cr-chiffre { font-family: var(--titre); font-size: 96px; line-height: .9; margin: 0; color: #fff; }
.cr-label { font-family: var(--titre); font-size: 26px; line-height: 1.1; margin: 0; }
.cr-detail { font-size: 14px; opacity: .9; margin: 0 0 8px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } .cr-chiffre { font-size: 72px; } }

.bloc { margin: 30px 0; }
.titre-bloc { font-family: var(--titre); font-weight: 700; font-size: 24px; color: var(--encre); margin: 0 0 12px; }
.titre-petit { font-size: 17px; margin: 10px 0 8px; color: var(--encre); }
.titre-ligne { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; }
.deux-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .deux-col { grid-template-columns: 1fr; } }
.encadre { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 18px 20px; box-shadow: var(--ombre); }
.etapes { padding-left: 1.3em; }
.etapes li { margin-bottom: 8px; }
.liste-simple { padding-left: 1.2em; }
.liste-simple li { margin-bottom: 6px; }
.mini-classement { list-style: none; counter-reset: n; padding: 0; margin: 0; }
.mini-classement li { counter-increment: n; display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--ligne); }
.mini-classement li::before { content: counter(n); font-family: var(--titre); color: var(--rouge); width: 1.8em; }
.mini-classement li a { flex: 1; font-weight: 700; }

/* ---------- Cartes de grilles ---------- */
.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.carte-grille { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); box-shadow: var(--ombre); transition: transform .12s, box-shadow .12s; }
.carte-grille:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(40,12,70,.14); }
.carte-lien { display: flex; gap: 14px; padding: 14px; color: inherit; text-decoration: none; height: 100%; }
.carte-lien:hover { color: inherit; }
.carte-vignette { flex: none; display: flex; align-items: flex-start; }
.carte-une .carte-lien { padding: 20px; gap: 22px; }
.carte-type { margin: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--rouge); }
.carte-titre { margin: 4px 0 6px; font-size: 20px; }
.carte-une .carte-titre { font-family: var(--titre); font-weight: 700; font-size: 32px; color: var(--encre); }
.carte-desc { margin: 0 0 8px; }
.carte-meta { margin: 0 0 8px; font-size: 14px; color: var(--gris); }
.carte-badges { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--violet-pale); color: var(--encre); font-size: 13px; font-weight: 700; }
.badge-ok { background: #E6F5EC; color: var(--ok); }
.badge-chaud { background: #FDECEE; color: var(--rouge-fonce); }
.badge-discret { background: transparent; color: var(--gris); font-weight: 400; padding-left: 0; }
.est-resolue { border-color: #9BD3B4; }
.thumb .tl { fill: #fff; stroke: var(--encre); stroke-width: .6; }
.thumb .tb { fill: var(--encre); }
.thumb .td { fill: var(--violet-clair); stroke: var(--encre); stroke-width: .6; }
.thumb .tv { fill: #E2DAEC; stroke: var(--encre); stroke-width: .6; }
.thumb .tg { fill: var(--grise); stroke: var(--encre); stroke-width: .6; }
@media (max-width: 560px) { .carte-une .carte-lien { flex-direction: column; } }

.onglets { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.onglets a, .onglets button { padding: 8px 14px; border-radius: 999px; background: var(--carte); border: 1px solid var(--ligne); color: var(--encre); text-decoration: none; font: 700 15px var(--texte); cursor: pointer; }
.onglets a[aria-current="page"], .onglets button[aria-selected="true"] { background: var(--encre); color: #fff; border-color: var(--encre); }
/* ---------- Pied de page : bandeau « passer à l'action » en dégradé, 3 cartes arrondies ---------- */
.mobilisation { background: linear-gradient(90deg, #5E01AA 0%, #656565 100%); padding: 26px 0; position: relative; }
.mobi-in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2.5vw, 30px); }
.mobi-carte { display: flex; flex-direction: column; gap: 4px; min-height: 140px; padding: 18px 22px; border-radius: 22px; background: rgba(254, 245, 46, .6); color: var(--encre); text-decoration: none; border: 2px solid transparent; transition: background .15s, transform .08s; }
.mobi-carte:hover { background: var(--jaune); color: var(--encre); transform: translateY(-2px); }
.mobi-carte:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.mobi-carte strong { font: italic 600 22px/1.15 var(--titre); color: var(--encre); }
.mobi-carte span { font-size: 15px; }
.mobi-kicker { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--encre); }

.site-footer { background: #fff; color: var(--encre); font-size: 14.5px; padding: 22px 0 28px; border-top: 2px solid var(--encre); }
.footer-in p { margin: 0 0 10px; max-width: 80em; }
.site-footer a { color: var(--encre); }
.footer-liens { display: flex; flex-wrap: wrap; gap: 6px 20px; font-weight: 500; }
/* ---------- Formulaires ---------- */
.formulaire-page { max-width: 560px; margin: 0 auto; }
.formulaire { display: flex; flex-direction: column; gap: 12px; }
.formulaire label, .ligne-champs label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 15px; }
.formulaire small, .ligne-champs small { font-weight: 400; color: var(--gris); }
input, select, textarea { font: 16px var(--texte); padding: 9px 11px; border: 1.5px solid var(--ligne); border-radius: 8px; background: #fff; color: var(--encre); min-height: 42px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--encre); outline: none; box-shadow: 0 0 0 3px rgba(108,53,168,.18); }
.ligne-champs { display: flex; flex-wrap: wrap; gap: 10px; }
.ligne-champs > label { flex: 1 1 140px; }
label.case, label.case-inline { flex-direction: row !important; align-items: flex-start; gap: 8px; font-weight: 400 !important; }
label.case-inline { display: inline-flex; align-items: center; }
label.case input, label.case-inline input { min-height: 0; width: 20px; height: 20px; margin-top: 2px; flex: none; }
.piege { position: absolute; left: -9999px; }
.avertissement { background: var(--creme); border: 2px solid var(--rouge); border-radius: var(--rayon); padding: 14px 18px; margin-bottom: 18px; }
.avertissement h2 { margin-top: 0; font-size: 19px; color: var(--rouge-fonce); }
.recherche { display: flex; gap: 8px; margin-bottom: 12px; }
.texte { max-width: 760px; }
.texte h2 { color: var(--encre); margin-top: 1.6em; }

/* ---------- Tableaux ---------- */
.tableau, .tableau-classement { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); }
.tableau th, .tableau td, .tableau-classement th, .tableau-classement td { padding: 10px 12px; border-bottom: 1px solid var(--ligne); text-align: left; vertical-align: middle; }
.tableau th, .tableau-classement th { background: var(--violet-pale); color: var(--encre); font-size: 14px; text-transform: uppercase; letter-spacing: .4px; }
.tableau-classement td:first-child { font-family: var(--titre); color: var(--rouge); width: 3em; font-size: 20px; }
.tableau-classement tr.moi { background: #FFF3D6; font-weight: 700; }
.podium-1 td:first-child::after { content: " 🥇"; }
.podium-2 td:first-child::after { content: " 🥈"; }
.podium-3 td:first-child::after { content: " 🥉"; }
.tableau .actions { display: flex; gap: 6px; flex-wrap: wrap; }
tr.banni { opacity: .6; }
.mois-nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
@media (max-width: 640px) { .tableau { display: block; overflow-x: auto; } }

/* ---------- Profil / stats / succès ---------- */
.profil-entete { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0 20px; }
.stat { background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 14px; text-align: center; box-shadow: var(--ombre); }
.stat strong { display: block; font-family: var(--titre); font-weight: 700; font-size: 38px; color: var(--encre); line-height: 1.1; }
.stat span { font-size: 14px; color: var(--gris); }
.grille-succes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.succes { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 14px; }
.succes h3 { margin: 0 0 2px; font-size: 17px; }
.succes p { margin: 0; font-size: 15px; }
.succes-icone { font-size: 32px; line-height: 1; flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--violet-pale); }
.succes.debloque { border-color: var(--violet-clair); }
.succes.debloque .succes-icone { background: #FFE9A8; }
.succes.verrouille { opacity: .62; }
.succes.verrouille .succes-icone { filter: grayscale(1); }
.barre-progression { width: 100%; height: 14px; accent-color: var(--rouge); margin-bottom: 20px; }
.partage-grid { display: grid; grid-template-columns: minmax(200px, 320px) 1fr; gap: 20px; align-items: start; }
.partage-apercu { border-radius: 10px; box-shadow: var(--ombre); }
@media (max-width: 640px) { .partage-grid { grid-template-columns: 1fr; } }
.partage-boutons { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.partage-boutons .btn { min-height: 40px; }
.telechargements { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Jeu ---------- */
.jeu-entete { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.jeu-titre { margin: 4px 0 6px; }
.jeu-meta { color: var(--gris); margin: 0; }
.jeu-desc { max-width: 70ch; }
.jeu-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.jeu { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: 22px; margin-top: 16px; align-items: start; }
.jeu.sans-defs { grid-template-columns: 1fr; }
.jeu-plateau { min-width: 0; }
.jeu-indice { position: sticky; top: 72px; z-index: 5; background: var(--encre); color: #fff; padding: 10px 14px; border-radius: 10px; font-weight: 700; min-height: 46px; margin-bottom: 10px; box-shadow: var(--ombre); }
.jeu-indice .lab { color: #FFC7CF; margin-right: 6px; }
.jeu-grille-zone { position: relative; overflow-x: auto; padding: 4px 2px 8px; }
.saisie-cachee { position: absolute; opacity: 0; left: 0; top: 0; width: 1px; height: 1px; padding: 0; border: 0; min-height: 0; font-size: 16px; }
.jeu-barre { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.jeu-statut { font-weight: 700; }
.jeu-statut.ok { color: var(--ok); }
.jeu-boutons { display: flex; gap: 6px; flex-wrap: wrap; }
.jeu-aide-clavier { font-size: 13px; color: var(--gris); }
.jeu-note { background: var(--creme); padding: 10px 14px; border-radius: 10px; font-size: 15px; }
.jeu-defs { background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 6px 16px 14px; max-height: 78vh; overflow: auto; position: sticky; top: 76px; }
.jeu-defs h2 { font-family: var(--titre); font-weight: 700; color: var(--rouge); font-size: 19px; margin: 14px 0 6px; }
.defs-liste { list-style: none; margin: 0; padding: 0; }
.defs-liste li { padding: 5px 6px; border-radius: 6px; font-size: 15.5px; }
.defs-liste .lab { font-weight: 700; color: var(--encre); margin-right: 4px; }
.def-mot { cursor: pointer; border-radius: 4px; padding: 0 2px; }
.def-mot:hover { background: var(--violet-pale); }
.def-mot.actif { background: #FFE9A8; }
.def-mot.fini { color: var(--gris); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
@media (max-width: 900px) { .jeu { grid-template-columns: 1fr; } .jeu-defs { position: static; max-height: none; } }

/* La grille (jeu et éditeur) */
.grille { --cell: 44px; display: grid; grid-template-columns: repeat(var(--w), var(--cell)); grid-auto-rows: var(--cell); width: max-content; margin: 0 auto; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.grille .case { position: relative; display: flex; align-items: center; justify-content: center; font: 700 calc(var(--cell) * .56)/1 var(--texte); text-transform: uppercase; color: var(--encre); }
.case-l { background: #fff; outline: 1.5px solid var(--encre); outline-offset: -0.75px; cursor: pointer; }
.case-n { background: var(--encre); outline: 1.5px solid var(--encre); outline-offset: -0.75px; }
.grille-libre .case-n, .grille-meles .case-n { background: transparent; outline: none; }
.grille-fleches .case-n { background: var(--violet-clair); outline: 1.5px solid var(--encre); }
.case-g { background: var(--grise); }
.case-l.dans-mot { background: #E9DDF8; }
.case-g.dans-mot { background: #CDB9E6; }
.case-l.active { background: #FFD966 !important; }
.case .num { position: absolute; top: 1px; left: 2px; font-size: calc(var(--cell) * .24); font-weight: 700; color: var(--encre); line-height: 1; }
.case .ordre { position: absolute; bottom: 1px; right: 2px; font-size: calc(var(--cell) * .22); color: var(--gris); line-height: 1; }
.case .lettre { pointer-events: none; }
.case .lettre.sol { color: var(--encre); }
.case-d { background: var(--violet-pale); outline: 1.5px solid var(--encre); outline-offset: -0.75px; display: flex; flex-direction: column; align-items: stretch; justify-content: stretch; cursor: pointer; overflow: visible; }
.case-d .def { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; font: 700 calc(var(--cell) * .15)/1.08 var(--texte); text-transform: uppercase; color: var(--encre); padding: 1px 2px; overflow: visible; position: relative; word-break: break-word; hyphens: auto; }
.case-d .def + .def { border-top: 1px solid var(--encre); }
.case-d .def.actif { background: #FFE9A8; }
.fleche { position: absolute; color: var(--rouge); font-size: calc(var(--cell) * .3); line-height: 1; font-family: var(--texte); font-weight: 700; z-index: 2; pointer-events: none; }
.fleche-r { right: calc(var(--cell) * -.2); top: 50%; transform: translateY(-50%); }
.fleche-d { bottom: calc(var(--cell) * -.22); left: 50%; transform: translateX(-50%); }
.fleche-rd { right: calc(var(--cell) * -.24); top: 50%; }
.fleche-dr { bottom: calc(var(--cell) * -.28); left: 50%; }
.grille-classique .case-l, .grille-classique .case-n { box-shadow: 0 0 0 .5px var(--encre); }
.entete-col, .entete-lig { display: flex; align-items: center; justify-content: center; font: 700 calc(var(--cell) * .3)/1 var(--texte); color: var(--encre); }
.grille.resolue .case-l { background: #E6F5EC; }
.grille.resolue .case-g { background: #BFE3CD; }

/* Mots mêlés */
.grille-meles .case-l { cursor: pointer; }
.grille-meles .case-l.trouvee { background: #FCE3E7; color: var(--rouge-fonce); }
.grille-meles .case-l.selection { background: #FFD966; }
.grille-meles .case-l.debut { background: #FFC233; }
.liste-mots { list-style: none; padding: 0; margin: 0; columns: 2 140px; }
.liste-mots li { padding: 3px 0; font-weight: 700; text-transform: uppercase; font-size: 15px; break-inside: avoid; }
.liste-mots li.trouve { color: var(--gris); text-decoration: line-through; font-weight: 400; }

/* Mot mystère */
.mystere { margin: 14px auto 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.mystere-label { font-family: var(--titre); color: var(--rouge); font-size: 18px; }
.mystere-cases { display: flex; flex-wrap: wrap; gap: 3px; }
.mystere-cases span { width: 34px; height: 34px; background: var(--grise); border: 1.5px solid var(--encre); display: grid; place-items: center; font-weight: 700; font-size: 20px; position: relative; }
.mystere-cases span small { position: absolute; bottom: 1px; right: 2px; font-size: 10px; color: var(--gris); font-weight: 400; }

/* ---------- Boîtes de dialogue / toasts ---------- */
.dialogue { border: 0; border-radius: 18px; padding: 0; max-width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.dialogue::backdrop { background: rgba(22,19,28,.55); }
.dialogue-in { padding: 24px; }
.dialogue h2 { font-family: var(--titre); font-weight: 700; color: var(--encre); font-size: 32px; margin: 0 0 8px; }
.dialogue-kicker { margin: 0; color: var(--rouge); font-weight: 700; text-transform: uppercase; }
.dialogue-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-bottom: 0; }
.succes-gagnes { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 100; max-width: calc(100vw - 32px); }
.toast { display: flex; gap: 12px; align-items: center; background: var(--encre); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: toast-in .35s ease-out; max-width: 380px; }
.toast .succes-icone { background: #FFE9A8; }
.toast strong { display: block; color: #FFE9A8; }
@keyframes toast-in { from { transform: translateY(20px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } * { transition: none !important; } }

/* ---------- Éditeur ---------- */
.ed-entete { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.ed-entete h1 { font-size: 30px; margin: 0; }
.editeur { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; margin-top: 12px; align-items: start; }
.ed-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 8px 10px; margin-bottom: 10px; }
.ed-outils label { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; }
.ed-outils input[type=number] { width: 64px; min-height: 36px; padding: 4px 6px; }
.ed-outils select { min-height: 36px; padding: 4px 6px; }
.ed-outils .sep { width: 1px; height: 26px; background: var(--ligne); }
.ed-outils .btn.on { background: var(--encre); color: #fff; }
.ed-zone { display: flex; gap: 14px; align-items: flex-start; }
.ed-grille-zone { overflow: auto; flex: 1; padding: 6px; background: #fff; border-radius: var(--rayon); border: 1px solid var(--ligne); min-height: 200px; }
.grille-edition:focus { outline: none; }
.grille-edition:focus .case.active { box-shadow: inset 0 0 0 3px var(--rouge); }
.grille-edition .case-n { cursor: pointer; }
.grille-edition.grille-libre .case-n, .grille-edition.grille-meles .case-n { background: repeating-linear-gradient(45deg, #fff 0 4px, #F4F0F8 4px 8px); outline: 1px dashed var(--ligne); }
.grille-edition .case-l .lettre:empty::after { content: "·"; color: var(--violet-clair); }
.ed-image { flex: 1; min-width: 260px; max-width: 50%; background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 8px; }
.ed-image-barre { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.ed-image-cadre { overflow: auto; max-height: 75vh; margin-top: 6px; }
.ed-image-cadre img { max-width: none; display: block; }
.ed-aide { font-size: 14px; color: var(--gris); }
.ed-def-panneau { margin-top: 10px; }
.ed-def-panneau .def-edit { display: grid; grid-template-columns: 1fr 160px auto; gap: 6px; margin-bottom: 8px; align-items: center; }
.ed-droite { position: sticky; top: 76px; max-height: calc(100vh - 90px); overflow: auto; background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 12px 14px; }
.onglets-ed { margin-bottom: 10px; }
.onglets-ed button { padding: 6px 12px; font-size: 14px; }
.ed-panneau label { font-size: 14px; }
.ed-options { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--violet-pale); border-radius: 10px; margin-bottom: 10px; }
.ed-options label { display: flex; flex-direction: column; gap: 3px; font-weight: 700; }
.ed-def-ligne { display: grid; grid-template-columns: 54px 1fr; gap: 6px; align-items: start; padding: 6px 0; border-bottom: 1px solid var(--ligne); }
.ed-def-ligne.actif { background: #FFF7DD; }
.ed-def-ligne .lab { font-weight: 700; color: var(--encre); font-size: 14px; padding-top: 4px; cursor: pointer; }
.ed-def-ligne .mot { font: 700 13px/1.2 ui-monospace, Consolas, monospace; color: var(--gris); letter-spacing: 1px; }
.ed-def-ligne textarea { min-height: 38px; padding: 6px 8px; font-size: 15px; width: 100%; }
.ed-def-titre { font-family: var(--titre); font-weight: 700; color: var(--rouge); margin: 14px 0 4px; font-size: 18px; }
.propositions { display: grid; gap: 12px; margin-top: 12px; }
.proposition { border: 1px solid var(--ligne); border-radius: 10px; padding: 10px; }
.proposition .grille { --cell: 15px; margin: 6px 0; }
.proposition .case { font-size: 10px; }
.proposition .case .num, .proposition .fleche { display: none; }
.proposition .case-d .def { font-size: 0; }
.diag { background: #FFF3D6; border-radius: 8px; padding: 8px 10px; font-size: 14px; margin-top: 6px; }
.diag strong { color: var(--rouge-fonce); }
.puces-mots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.puces-mots button { border: 1px solid var(--violet-clair); background: #fff; border-radius: 999px; padding: 2px 10px; font: 700 13px var(--texte); color: var(--encre); cursor: pointer; }
.puces-mots button:hover { background: var(--encre); color: #fff; }
.puces-mots button.theme { border-color: var(--rouge); color: var(--rouge-fonce); }
.ed-validation ul { margin: 6px 0; padding-left: 1.2em; font-size: 14px; }
.ed-validation .err { color: var(--rouge-fonce); }
.ed-validation .warn { color: #8A5A00; }
.mys-cases { display: flex; flex-wrap: wrap; gap: 6px; }
.mys-cases label { flex-direction: row !important; align-items: center; gap: 4px; font-weight: 400 !important; }
.mys-cases input { width: 58px; min-height: 32px; padding: 2px 6px; }
@media (max-width: 1050px) { .editeur { grid-template-columns: 1fr; } .ed-droite { position: static; max-height: none; } .ed-zone { flex-direction: column; } .ed-image { max-width: 100%; } }

.choix-creation { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.choix { display: flex; flex-direction: column; gap: 10px; }
.choix h2 { margin: 0; color: var(--encre); font-size: 20px; }
.choix p { margin: 0; flex: 1; font-size: 15px; }
.choix label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; }

/* ---------- Livrets ---------- */
.livret { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.livret-gauche { display: flex; flex-direction: column; gap: 16px; }
.livret-liste { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
ol.livret-liste { counter-reset: n; }
.livret-liste li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--ligne); border-radius: 8px; background: #fff; font-size: 15px; }
ol.livret-liste li::before { counter-increment: n; content: counter(n); font-family: var(--titre); color: var(--rouge); width: 1.4em; }
.livret-liste li .t { flex: 1; }
.livret-liste li .t small { display: block; color: var(--gris); }
.livret-liste button { border: 1px solid var(--ligne); background: #fff; border-radius: 6px; min-width: 32px; min-height: 32px; cursor: pointer; font-weight: 700; color: var(--encre); }
.livret-liste button:hover { background: var(--violet-pale); }
.livret-dispo { max-height: 360px; overflow: auto; margin-top: 8px; }
.feuilles { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.feuille { border: 1px solid var(--ligne); border-radius: 8px; padding: 8px; background: var(--fond); }
.feuille h3 { margin: 0 0 6px; font-size: 14px; color: var(--gris); text-transform: uppercase; }
.feuille-faces { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.face { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--encre); background: #fff; aspect-ratio: 1.414; }
.face .p { padding: 6px; font-size: 12px; display: flex; flex-direction: column; justify-content: space-between; }
.face .p + .p { border-left: 1.5px dashed var(--gris); }
.face .p strong { font-family: var(--titre); color: var(--rouge); font-size: 18px; font-weight: 400; }
.face-lab { font-size: 12px; color: var(--gris); text-align: center; }
@media (max-width: 900px) { .livret { grid-template-columns: 1fr; } }

.erreur-page { text-align: center; padding: 50px 0; }
.erreur-code { font-family: var(--titre); font-size: 120px; color: var(--violet-clair); margin: 0; line-height: 1; }

@media print {
  .bandeau-elec, .site-header, .mobilisation, .site-footer, .jeu-actions, .jeu-barre, .jeu-aide-clavier, .jeu-note { display: none !important; }
}


/* ---------- Choix du type de grille (nouvelle grille) ---------- */
.types-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.type-carte { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; background: #fff; border: 2px solid var(--ligne); border-radius: var(--rayon); padding: 16px 14px 14px; cursor: pointer; box-shadow: var(--ombre); transition: border-color .12s, transform .12s; }
.type-carte:hover { border-color: var(--violet-clair); transform: translateY(-2px); }
.type-carte input { position: absolute; top: 10px; left: 10px; width: 20px; height: 20px; min-height: 0; accent-color: var(--rouge); margin: 0; }
.type-carte:has(input:checked) { border-color: var(--rouge); background: #FFF7F8; box-shadow: 0 0 0 3px rgba(215,38,61,.15), var(--ombre); }
.type-carte:has(input:focus-visible) { outline: 3px solid var(--rouge); outline-offset: 2px; }
.type-carte strong { font-family: var(--titre); font-weight: 700; font-size: 21px; color: var(--encre); }
.type-carte small { font-size: 14px; color: var(--gris); line-height: 1.35; }
.type-visuel { height: 86px; display: flex; align-items: center; justify-content: center; }
.picto { overflow: visible; }
.picto .pl { fill: #fff; stroke: var(--encre); stroke-width: 1; }
.picto .pn { fill: var(--encre); stroke: var(--encre); stroke-width: 1; }
.picto .pg { fill: var(--grise); stroke: var(--encre); stroke-width: 1; }
.picto .pd { fill: var(--violet-clair); stroke: var(--encre); stroke-width: 1; }
.picto .pt { stroke: var(--encre); stroke-width: 1.2; }
.picto .pa { fill: var(--rouge); }
.picto .ph { fill: #F7B9C3; }

/* ---------- Liste de mots du créateur ---------- */
.mots-saisie { border: 1px solid var(--ligne); border-radius: 10px; padding: 8px 10px 4px; margin: 0; }
.mots-saisie legend { font-weight: 700; font-size: 14px; padding: 0 4px; }
.mots-saisie legend small { font-weight: 400; color: var(--gris); }
.mots-entete, .mot-ligne { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(120px, 1.6fr) 32px; gap: 6px; align-items: center; }
.mots-entete { font-size: 12px; font-weight: 700; color: var(--gris); text-transform: uppercase; letter-spacing: .4px; padding: 0 2px 2px; }
.mots-liste { display: flex; flex-direction: column; gap: 6px; }
.mot-ligne input { min-height: 36px; padding: 5px 8px; font-size: 15px; width: 100%; min-width: 0; }
.mot-ligne .in-mot { font-weight: 700; text-transform: uppercase; }
.mot-ligne .in-mot::placeholder { text-transform: none; font-weight: 400; }
.mot-ligne:last-child input { border-style: dashed; background: #FCFAFE; }
.btn-suppr { width: 32px; height: 32px; border: 1px solid var(--ligne); border-radius: 6px; background: #fff; color: var(--gris); cursor: pointer; font-weight: 700; }
.btn-suppr:hover { background: #FDECEE; color: var(--rouge-fonce); border-color: #F0B4BD; }
.mot-ligne:last-child .btn-suppr { visibility: hidden; }
.mots-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.mots-saisie.sans-def .mots-entete, .mots-saisie.sans-def .mot-ligne { grid-template-columns: 1fr 32px; }
.mots-saisie.sans-def .in-def, .mots-saisie.sans-def .col-def { display: none; }

/* ---------- Éditeur : explication, propositions à gauche ---------- */
.pastille { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--rouge); color: #fff; font: 700 13px/1 var(--texte); flex: none; vertical-align: middle; }
.pastille-blanche { background: #fff; color: var(--rouge); margin-right: 4px; }
.ed-intro { background: #fff; border: 2px dashed var(--violet-clair); border-radius: var(--rayon); padding: 28px 26px; min-height: 380px; }
.ed-intro h2 { font-family: var(--titre); font-weight: 700; color: var(--encre); font-size: 28px; margin: 0 0 16px; }
.ed-intro-etapes { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 14px; font-size: 17px; }
.ed-intro-etapes li { display: flex; gap: 12px; align-items: flex-start; }
.ed-intro-etapes .pastille { width: 30px; height: 30px; font-size: 16px; }
.ed-props-zone { background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 14px 16px; }
.ed-props-zone .propositions { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ed-props-zone .proposition .grille { --cell: 22px; margin: 10px auto; }
.ed-props-zone .proposition .case { font-size: 13px; }
.ed-prop-statut { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #FFF3D6; font-weight: 700; font-size: 15px; }
.ed-message { margin-bottom: 10px; }

/* ---------- Éditeur : notice « à la main » ---------- */
.ed-notice { margin-top: 12px; background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 10px 16px; }
.ed-notice summary { cursor: pointer; font-weight: 700; color: var(--encre); font-size: 16px; padding: 4px 0; }
.ed-notice-etapes { list-style: none; padding: 0; margin: 8px 0 4px; display: flex; flex-direction: column; gap: 9px; font-size: 16px; }
.ed-notice-etapes li { display: flex; gap: 10px; align-items: flex-start; }
.pastille-petite { width: 22px; height: 22px; font-size: 12px; background: var(--encre); margin-top: 1px; }
#ed-mys-champ { background: #FFF3D6; padding: 10px; border-radius: 10px; }

/* Propositions de mots mêlés : mots cachés visibles */
.grille .case-l.case-cache { background: #F7B9C3; color: var(--rouge-fonce); }
.grille .case-l.case-reste { background: var(--grise); }
.legende-meles { font-size: 13px; color: var(--gris); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.puce-cache, .puce-reste { display: inline-block; width: 14px; height: 14px; border: 1px solid var(--encre); }
.puce-cache { background: #F7B9C3; }
.puce-reste { background: var(--grise); margin-left: 8px; }

/* ---------- Bandeau « page contact » pour les nouveaux créateurs ---------- */
.bandeau-contact { background: #FFF3D6; border: 2px solid #E8B64C; border-radius: var(--rayon); padding: 14px 18px; margin-bottom: 16px; }
.bandeau-contact p { margin: 0 0 10px; }
.bandeau-contact form { display: inline; }

/* ---------- Agenda ---------- */
.liste-evt { display: flex; flex-direction: column; gap: 12px; }
.carte-evt { background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); box-shadow: var(--ombre); }
.carte-evt.passe { opacity: .6; }
.carte-evt-lien { display: flex; gap: 16px; align-items: center; padding: 14px 16px; color: inherit; text-decoration: none; }
.carte-evt-lien:hover { color: inherit; background: var(--violet-pale); border-radius: var(--rayon); }
.evt-date { flex: none; width: 66px; height: 70px; border-radius: 10px; background: var(--rouge); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.evt-jour { font-family: var(--titre); font-size: 32px; }
.evt-mois { font-size: 13px; font-weight: 700; text-transform: uppercase; margin-top: 2px; }
.evt-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.evt-corps h3 { margin: 0; font-size: 20px; color: var(--encre); }
.evt-quand, .evt-lieu { margin: 0; color: var(--gris); font-size: 15px; }
.evt-quand::first-letter { text-transform: uppercase; }
.evt-badges { margin: 4px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.evt-vignette { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; flex: none; }
@media (max-width: 600px) { .evt-vignette { display: none; } }

.cal-entete { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 10px; }
.cal-entete .titre-bloc { margin: 0; min-width: 200px; text-align: center; }
.calendrier { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); }
.calendrier th { background: var(--encre); color: #fff; padding: 8px 4px; font-size: 14px; text-transform: capitalize; }
.calendrier th .court { display: none; }
.calendrier td { border: 1px solid var(--ligne); vertical-align: top; height: 96px; padding: 4px; }
.calendrier td.hors-mois { background: #F7F5FA; color: #B0A9BA; }
.calendrier td.aujourdhui { background: #FFF7DD; }
.calendrier td.aujourdhui .cal-num { background: var(--rouge); color: #fff; border-radius: 50%; }
.cal-num { display: inline-grid; place-items: center; width: 26px; height: 26px; font-weight: 700; font-size: 14px; }
.cal-evt { display: block; margin-top: 3px; padding: 3px 6px; border-radius: 6px; background: var(--encre); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; overflow: hidden; }
.cal-evt:hover { background: var(--rouge); color: #fff; }
.cal-evt-txt { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) {
  .calendrier th .long { display: none; }
  .calendrier th .court { display: inline; }
  .calendrier td { height: 54px; padding: 2px; }
  .cal-evt { height: 8px; padding: 0; margin-top: 2px; }
  .cal-evt-txt { display: none; }
}

.evt-detail { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.evt-detail h1 { margin-top: 6px; }
.evt-quand-grand, .evt-lieu-grand { font-size: 19px; font-weight: 700; margin: 6px 0; }
.evt-quand-grand::first-letter { text-transform: uppercase; }
.evt-image, .jeu-image { width: 100%; border-radius: var(--rayon); box-shadow: var(--ombre); }
.je-viens { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0; padding: 14px; background: var(--violet-pale); border-radius: var(--rayon); }
.je-viens .btn { font-size: 18px; min-height: 50px; }
.je-viens p { width: 100%; margin: 0; }
.texte-riche { font-size: 17px; }
.texte-riche ul, .texte-riche ol { padding-left: 1.4em; }
.texte-riche li { margin-bottom: 4px; }
.surprise { background: #FFF3D6; padding: 12px 16px; border-radius: 10px; font-size: 17px; }
@media (max-width: 800px) { .evt-detail, .jeu-detail { grid-template-columns: 1fr; } }

.cartes-evt-accueil { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.evt-accueil { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 12px; box-shadow: var(--ombre); text-decoration: none; color: inherit; }
.evt-accueil:hover { border-color: var(--rouge); color: inherit; }
.evt-accueil strong { color: var(--encre); font-size: 17px; }

/* ---------- Formulaires événement / jeu ---------- */
.formulaire-large { max-width: 760px; }
.formulaire-large fieldset { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.formulaire-large legend { font-weight: 700; color: var(--encre); font-size: 18px; padding: 0 6px; }
.choix-jeux { display: flex; flex-direction: column; gap: 6px; padding-left: 4px; }
.choix-jeux.desactive { opacity: .4; }
.apercu-image { max-width: 260px; border-radius: 10px; }
label.case-grande { font-size: 18px; background: var(--violet-pale); padding: 12px; border-radius: 10px; }

/* ---------- Jeux ---------- */
.cartes-jeux { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cartes-jeux.grandes { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.carte-jeu { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 14px; box-shadow: var(--ombre); text-decoration: none; color: inherit; transition: transform .12s, border-color .12s; }
.carte-jeu:hover { transform: translateY(-2px); border-color: var(--rouge); color: inherit; }
.carte-jeu img { width: 100%; height: 160px; object-fit: cover; border-radius: 8px; }
.carte-jeu-defaut { height: 120px; display: grid; place-items: center; font-size: 56px; background: var(--violet-pale); border-radius: 8px; }
.carte-jeu strong { font-family: var(--titre); font-weight: 700; font-size: 22px; color: var(--encre); }
.carte-jeu em { color: var(--rouge); font-weight: 700; font-style: normal; margin-top: auto; }
.jeu-infos { font-size: 14px; color: var(--gris); }
.jeu-detail { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.jeu-infos-grand { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 700; font-size: 18px; }
.regles { background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 6px 20px; }
.ou-jouer { border-left: 5px solid var(--rouge); }

/* ---------- Contact ---------- */
.cartes-contact { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.carte-contact { background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 16px 18px; box-shadow: var(--ombre); }
.carte-contact h2 { margin: 0; color: var(--encre); font-size: 22px; }
.contact-role { margin: 4px 0 8px; color: var(--gris); }
.contact-liens { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 16px; word-break: break-word; }

/* =================================================================== Gestion (admin) */
.page-gestion .main { max-width: 1280px; }
.g-entete { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.g-entete h1 { margin: 2px 0 0; font-size: 34px; }
.g-onglets { display: flex; gap: 2px; border-bottom: 2px solid var(--ligne); margin: 10px 0 16px; overflow-x: auto; scrollbar-width: none; }
.g-onglets::-webkit-scrollbar { display: none; }
.g-onglets a { padding: 10px 16px; font-weight: 700; color: var(--gris); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.g-onglets a:hover { color: var(--encre); }
.g-onglets a[aria-current="page"] { color: var(--encre); border-bottom-color: var(--rouge); }
.g-periode { display: flex; gap: 4px; background: #fff; border: 1px solid var(--ligne); border-radius: 999px; padding: 3px; }
.g-periode a { padding: 6px 12px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 700; color: var(--gris); }
.g-periode a[aria-current="true"] { background: var(--encre); color: #fff; }
.g-alertes { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.g-alerte { display: block; background: #FFF3D6; border: 1px solid #E8B64C; border-left-width: 5px; border-radius: 8px; padding: 9px 14px; color: #6B4600; text-decoration: none; font-weight: 700; font-size: 15px; }
.g-alerte:hover { background: #FFEAB8; color: #6B4600; }
.g-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--ombre); }
.kpi-val { font-family: var(--titre); font-size: 34px; line-height: 1.05; color: var(--encre); }
.kpi-fort { border-top: 4px solid var(--encre); }
.kpi-fort .kpi-val { color: var(--encre); }
.kpi-lab { font-weight: 700; font-size: 15px; }
.kpi-sub { font-size: 13px; color: var(--gris); }
.g-grille-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.g-grille-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
@media (max-width: 1000px) { .g-grille-2, .g-grille-3 { grid-template-columns: 1fr; } }
.g-carte { background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 16px 18px; box-shadow: var(--ombre); min-width: 0; margin-bottom: 16px; }
.g-grille-2 .g-carte, .g-grille-3 .g-carte { margin-bottom: 0; }
.g-titre { font-size: 17px; margin: 0 0 10px; color: var(--encre); display: flex; align-items: center; gap: 8px; }
.g-badge-live { background: var(--ok); color: #fff; border-radius: 999px; font-size: 13px; padding: 1px 9px; }
.g-vide { color: var(--gris); font-style: italic; margin: 6px 0; }
.g-liste { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.g-liste li { display: flex; flex-direction: column; border-bottom: 1px solid var(--ligne); padding-bottom: 6px; }
.g-liste-compacte li { flex-direction: row; gap: 6px; align-items: baseline; padding-bottom: 4px; }
.g-table-scroll { overflow-x: auto; }
.tableau-compact th, .tableau-compact td { padding: 7px 10px; font-size: 14.5px; }
.tableau-compact { box-shadow: none; border: 1px solid var(--ligne); }
.tableau-compact tr:hover td { background: #FBF8FE; }
.tableau-compact tr.alerte td { background: #FDECEE; }
.g-filtres { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 12px 14px; margin-bottom: 12px; }
.g-filtres label { display: flex; flex-direction: column; gap: 3px; font-weight: 700; font-size: 14px; }
.g-filtres input, .g-filtres select { min-height: 38px; padding: 6px 10px; }
.g-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-bottom: 12px; }
.g-actions label { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.g-etiquettes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.g-checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.g-checks li.ko { color: #8A5A00; font-weight: 700; }
.g-rgpd { margin-top: 24px; border-top: 1px solid var(--ligne); padding-top: 10px; }
.g-taux { display: inline-flex; align-items: center; gap: 6px; }
.g-taux .hb-piste { width: 60px; }
.obligatoire { color: var(--rouge-fonce); }

/* Graphiques (SVG, une série, infobulle native au survol) */
.graph { margin: 0; }
.graph-svg { width: 100%; height: auto; display: block; overflow: visible; }
.graph-barre { fill: var(--encre); transition: fill .1s; }
.graph-col:hover .graph-barre { fill: var(--encre); }
.graph-hit { fill: transparent; }
.graph-col:hover .graph-hit { fill: rgba(108, 53, 168, .07); }
.graph-grille { stroke: var(--ligne); stroke-width: 1; stroke-dasharray: 3 3; }
.graph-base { stroke: #B9B2C4; stroke-width: 1; }
.graph-axe { fill: var(--gris); font: 11px var(--texte); }
.graph-table { margin-top: 6px; font-size: 14px; }
.graph-table summary { cursor: pointer; color: var(--encre); }
.graph-table table { margin-top: 6px; }
.hbarres { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.hbarres li { display: grid; grid-template-columns: minmax(90px, 1.2fr) 2fr auto; gap: 8px; align-items: center; font-size: 14.5px; }
.hb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-piste { display: block; height: 10px; background: var(--violet-pale); border-radius: 999px; overflow: hidden; }
.hb-barre { display: block; height: 100%; width: var(--pct, 0%); background: var(--encre); border-radius: 999px; }
.hb-val { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2.5em; text-align: right; }

/* =================================================================== Pages légales */
.texte-legal h2 { font-size: 22px; border-bottom: 2px solid var(--violet-pale); padding-bottom: 4px; }
.texte-legal p, .texte-legal li { font-size: 16.5px; }
.encart-legal { background: #fff; border: 1px solid var(--ligne); border-left: 4px solid var(--encre); border-radius: 8px; padding: 12px 16px; }
.tableau-legal td, .tableau-legal th { font-size: 15px; vertical-align: top; }
.tableau-legal { box-shadow: none; border: 1px solid var(--ligne); }
.sommaire { background: var(--violet-pale); padding: 10px 14px; border-radius: 10px; font-size: 15px; }

/* Gestion : liens suivis */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.g-actions-ligne{white-space:nowrap}
.g-actions-ligne form{display:inline-block;margin:0 0 0 .3rem}

/* ===================================================================== */
/* Partie géante (mode Stand)                                            */
/* ===================================================================== */
.stand-scores { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stand-scores li { display: grid; grid-template-columns: minmax(80px, 46%) 1fr auto; align-items: center; gap: 8px; font-weight: 700; }
.stand-scores .sc-nom { color: var(--equipe, var(--encre)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stand-scores .sc-piste { height: 12px; background: var(--violet-pale); border-radius: 99px; overflow: hidden; }
.stand-scores .sc-barre { display: block; height: 100%; width: var(--pct, 0%); min-width: 4px; background: var(--equipe, var(--encre)); border-radius: 99px; transition: width .6s; }
.stand-scores .sc-pts { font-variant-numeric: tabular-nums; }
.stand-scores li.moi .sc-nom::after { content: " (toi)"; color: var(--gris); font-weight: 400; }
.stand-scores.grand li { font-size: 19px; }
.stand-scores.grand .sc-piste { height: 16px; }
.sj-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.sj-zoom button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--violet-clair); background: #fff; color: var(--encre); font: 700 22px/1 var(--texte); cursor: pointer; box-shadow: var(--ombre); }
.sj-zoom button:hover { border-color: var(--encre); }
.vide-li { color: var(--gris); font-style: italic; list-style: none; }

/* --- joueurs (téléphone) */
.stand-page { background: var(--fond); }
.stand-joueur { padding-bottom: env(safe-area-inset-bottom, 0); }
.sj-entete { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top, 0px)); background: var(--encre); color: #fff; }
.sj-logo { font: 700 15px/1 var(--titre); color: #fff; background: var(--rouge); padding: 6px 7px; border-radius: 6px; text-decoration: none; }
.sj-titre { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sj-titre strong { font: 700 18px/1.15 var(--titre); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sj-progres { font-size: 12.5px; opacity: .9; }
.sj-equipe { border: 2px solid #fff; background: var(--equipe, var(--encre)); color: #fff; font: 700 14px/1.1 var(--texte); padding: 7px 10px; border-radius: 99px; cursor: pointer; max-width: 44%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sj-choix { max-width: 520px; margin: 0 auto; padding: 24px 16px; text-align: center; }
.sj-choix h1 { font-size: 30px; }
.sj-equipes { display: grid; gap: 12px; margin-top: 18px; }
.sj-btn-equipe { min-height: 60px; border: 0; border-radius: 16px; background: var(--equipe, var(--encre)); color: #fff; font: 700 21px/1.1 var(--texte); cursor: pointer; box-shadow: var(--ombre); }
.sj-btn-equipe:active { transform: translateY(1px); }
.sj-jeu { max-width: 900px; margin: 0 auto; padding: 8px 10px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.sj-jeu > * { min-width: 0; }
body.stand-joueur { overflow-x: hidden; }
.sj-annonce { background: var(--creme); border: 2px solid var(--rouge); border-radius: 12px; padding: 10px 12px; font-weight: 700; text-align: center; }
.sj-carte, .sp-carte { position: relative; height: min(58vh, 560px); border-radius: 14px; overflow: hidden; border: 1px solid var(--ligne); box-shadow: var(--ombre); background: var(--violet-pale); }
.sj-carte canvas, .sp-carte canvas, .se-carte canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.sj-carte canvas:active, .se-carte canvas:active { cursor: grabbing; }
.sj-question { background: var(--carte); border: 1px solid var(--ligne); border-radius: 14px; padding: 12px 14px; }
.sj-aide { margin: 0; color: var(--gris); }
.sj-def { margin: 0 0 8px; font-size: 18px; }
.sj-num { display: inline-block; font-weight: 700; color: var(--rouge); margin-right: 4px; }
.sj-saisie { display: flex; gap: 8px; }
.sj-saisie input { flex: 1; min-width: 0; font: 700 22px/1.2 var(--texte); letter-spacing: .12em; text-transform: uppercase; padding: 10px 12px; border: 2px solid var(--violet-clair); border-radius: 12px; }
.sj-saisie input:focus { border-color: var(--encre); outline: none; }
.sj-message { margin: 8px 0 0; font-weight: 700; min-height: 1.2em; }
.sj-message.ok { color: var(--ok); }
.sj-message.non { color: var(--rouge-fonce); }
.sj-defs, .sj-scores { background: var(--carte); border: 1px solid var(--ligne); border-radius: 14px; padding: 12px 14px; }
.sj-defs h2, .sj-scores h2 { font-size: 20px; margin: 0 0 8px; }
.sj-defs-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px; }
.sj-timer { font-weight: 700; color: var(--rouge); font-variant-numeric: tabular-nums; }
.sj-liste { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow-y: auto; }
.sj-liste li { display: flex; gap: 8px; align-items: baseline; padding: 9px 6px; border-bottom: 1px solid var(--ligne); cursor: pointer; border-radius: 8px; }
.sj-liste li:hover, .sj-liste li.actif { background: var(--violet-pale); }
.sj-liste li.trouve { opacity: .75; }
.sj-liste li.trouve .sj-num { color: var(--equipe, var(--gris)); }
.sj-li-clue { flex: 1; }
.sj-li-mot { font-weight: 700; color: #fff; background: var(--equipe, var(--gris)); padding: 1px 7px; border-radius: 6px; letter-spacing: .05em; }
.sj-pied { text-align: center; padding: 10px 16px 18px; }

/* --- écran du stand : tablette ou grand téléphone posé sur la table (horizontal ou vertical) */
.stand-ecran { height: 100vh; height: 100dvh; overflow: hidden; }
.se { height: 100vh; height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 30vw);
  grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "carte haut" "carte bas"; }
.se-haut { grid-area: haut; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-items: center;
  padding: 14px 16px 10px; background: var(--carte); border-left: 1px solid var(--ligne); }
.se-qr { border: 0; padding: 6px; background: #fff; border-radius: 10px; cursor: zoom-in; box-shadow: var(--ombre); line-height: 0; }
.se-qr img { display: block; width: 112px; height: 112px; }
.se-haut-txt { min-width: 0; }
.se-site { margin: 0; color: var(--rouge); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.se-haut h1 { font-size: clamp(20px, 2vw, 32px); margin: 2px 0 4px; }
.se-rejoindre-titre { font: 700 22px/1.05 var(--titre); color: var(--rouge); margin: 0 0 2px; }
.se-rejoindre-txt { margin: 0; font-size: 14px; }
.se-url { margin: 0; font-size: 13px; color: var(--gris); overflow-wrap: anywhere; }
.se-chrono { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 12px; background: var(--encre); color: #fff; }
.se-chrono strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.se-carte { grid-area: carte; position: relative; min-width: 0; min-height: 0; background: var(--violet-pale); }
.se-bas { grid-area: bas; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 6px 16px 14px;
  background: var(--carte); border-left: 1px solid var(--ligne); }
.se-bas h2 { font-size: 17px; margin: 0 0 6px; }
.se-recents { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.se-recents li { display: flex; gap: 8px; align-items: baseline; padding: 6px 10px; border-radius: 10px; background: var(--violet-pale); border-left: 6px solid var(--equipe, var(--encre)); }
.se-recents li strong { letter-spacing: .05em; }
.se-recents li span { color: var(--equipe, var(--encre)); font-weight: 700; flex: 1; }
.se-recents li em { font-style: normal; font-weight: 700; color: var(--ok); }
.se-commandes { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 10px; border-top: 1px solid var(--ligne); }
.se-annonce { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); max-width: 86%; background: var(--carte); border: 3px solid var(--rouge); border-radius: 16px; padding: 10px 20px; font: 700 clamp(18px, 2.4vw, 34px)/1.15 var(--titre); color: var(--encre); text-align: center; box-shadow: 0 8px 30px rgba(40, 12, 70, .25); }
.se-annonce.pop { animation: se-pop .45s ease-out; }
@keyframes se-pop { from { transform: translateX(-50%) scale(.7); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.se-fin { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px; background: rgba(75, 29, 122, .93); color: #fff; }
.se-fin-sur { margin: 0; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--creme); }
.se-fin-titre { margin: 0; font: 700 clamp(30px, 6vw, 76px)/1.05 var(--titre); }
.se-fin-camp { margin: 10px 0 0; font-size: clamp(16px, 2vw, 24px); max-width: 40em; }
.se-zoom { bottom: 14px; right: 14px; }
.se-qr-grand { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; background: rgba(255, 255, 255, .98); cursor: zoom-out; }
.se-qr-grand img { width: min(82vw, 68vh); height: auto; }
.se-qr-grand p { margin: 0; font-size: 18px; }

/* tablette ou téléphone à la verticale : bandeau en haut, grille au milieu, scores en bas */
@media (orientation: portrait), (max-width: 760px) {
  .se { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "haut" "carte" "bas"; }
  .se-haut { border-left: 0; border-bottom: 1px solid var(--ligne); padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top, 0px)); }
  .se-qr img { width: 88px; height: 88px; }
  .se-rejoindre-txt { display: none; }
  .se-chrono { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; padding: 6px 10px; }
  .se-chrono strong { font-size: 16px; }
  .se-bas { border-left: 0; border-top: 1px solid var(--ligne); max-height: 34vh; gap: 6px; padding: 8px 12px; padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)); }
  .se-recents-bloc, .se-equipes h2 { display: none; }
  .se .stand-scores { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 14px; }
  .se .stand-scores li { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 6px; font-size: 16px; }
  .se .stand-scores .sc-pts { order: 2; }
  .se .stand-scores .sc-piste { order: 3; grid-column: 1 / -1; height: 10px; }
  .se-commandes { margin-top: 2px; padding-top: 6px; }
}
/* grand téléphone à l'horizontale : colonne de droite resserrée */
@media (orientation: landscape) and (max-height: 520px) {
  .se { grid-template-columns: minmax(0, 1fr) minmax(220px, 36vw); }
  .se-haut { padding: 8px 10px 6px; gap: 6px 10px; }
  .se-qr img { width: 72px; height: 72px; }
  .se-site, .se-rejoindre-txt, .se-recents-bloc, .se-equipes h2 { display: none; }
  .se-haut h1 { font-size: 17px; }
  .se-rejoindre-titre { font-size: 17px; }
  .se-chrono { padding: 5px 8px; }
  .se-chrono strong { font-size: 15px; }
  .se-bas { padding: 4px 10px 8px; gap: 6px; }
  .stand-scores.grand li { font-size: 14px; }
  .stand-scores.grand .sc-piste { height: 10px; }
}
@media (prefers-reduced-motion: reduce) { .se-annonce.pop { animation: none; } .stand-scores .sc-barre { transition: none; } }

/* --- préparation (organisateurs) */
.sp-infos { color: var(--gris); }
.sp-equipe { display: inline-block; margin: 0 3px; padding: 1px 8px; border-radius: 99px; background: var(--equipe, var(--encre)); color: #fff; font-weight: 700; font-size: 14px; }
.sp-etape { margin: 18px 0; }
.sp-grilles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; max-height: 280px; overflow-y: auto; padding: 4px; border: 1px solid var(--ligne); border-radius: 10px; margin-bottom: 10px; }
.sp-propositions { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 12px; }
.sp-prop { border: 1px solid var(--ligne); border-radius: 12px; padding: 12px; background: var(--fond); min-width: 0; }
.sp-prop h3 { margin: 0 0 2px; font-size: 18px; }
.sp-mini { width: 100%; height: 260px; display: block; border-radius: 8px; touch-action: none; cursor: grab; }
.sp-filtre { width: 100%; max-width: 420px; margin: 4px 0 10px; padding: 9px 12px; border: 1px solid var(--violet-clair); border-radius: 10px; font: inherit; }
.sp-mots-scroll { max-height: 520px; overflow-y: auto; }
#sp-mots input { width: 100%; min-width: 220px; padding: 6px 8px; border: 1px solid var(--ligne); border-radius: 8px; font: inherit; }
#sp-mots input.ok { border-color: var(--ok); }
.lien-mot { background: none; border: 0; padding: 0; font: 700 15px/1.2 var(--texte); letter-spacing: .05em; color: var(--encre); cursor: pointer; text-decoration: underline; }
.sp-suppr { margin-top: 26px; }
.evt-stand { margin: 14px 0; padding: 14px 16px; border-radius: 14px; background: var(--encre); color: #fff; }
.evt-stand p { margin: 0 0 8px; }

/* =========================================================================
   Nouveautés : propositions, jeux à imprimer, types d'événements, livrets
   ========================================================================= */


/* ---------- petits éléments ---------- */
.badge-refus { background: #FFF1D6; color: #8A5300; }
.badge-imprimer { background: #E3F2FD; color: #0B4F8A; }
.mot-createur { margin: 6px 0 0; padding: 8px 12px; background: #FFF8E1; border-left: 4px solid #E0A800; border-radius: 6px; font-family: var(--ecolier); font-size: 18px; color: var(--encre); }
.col-secondaire { color: var(--gris); }
@media (max-width: 520px) { .col-secondaire { display: none; } }
.btn-atelier { background: var(--atelier); color: #fff; }
.btn-atelier:hover { background: #075B57; color: #fff; }
.btn-grand { min-height: 54px; padding: 14px 26px; font-size: 18px; }
.liste-bareme { padding-left: 1.2em; }
.liste-bareme li { margin-bottom: 6px; }
.liste-bareme strong { color: var(--rouge); font-size: 18px; }
.bareme { margin: 0 0 16px; }
.bareme summary { cursor: pointer; font-weight: 700; color: var(--encre); }

/* ---------- types d'événements (couleurs partout) ---------- */
.pastille-kind { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 4px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--jeux-pale); color: var(--jeux); }
.pastille-kind.kind-atelier { background: var(--atelier-pale); color: var(--atelier); }
.pastille-grande { font-size: 15px; padding: 4px 14px; }
.carte-evt.kind-jeux { border-left: 6px solid var(--jeux); }
.carte-evt.kind-atelier { border-left: 6px solid var(--atelier); }
.cal-evt.kind-atelier { background: var(--atelier); }
.cal-evt.kind-atelier:hover { background: #075B57; }
.evt-accueil.kind-jeux { border-left: 6px solid var(--jeux); }
.evt-accueil.kind-atelier { border-left: 6px solid var(--atelier); }
.evt-accueil.kind-atelier .evt-date { background: var(--atelier); }
.evt-accueil .evt-corps { display: flex; flex-direction: column; gap: 2px; }
.points-mini { color: var(--rouge-fonce) !important; font-weight: 700; }
.evt-detail.kind-atelier h1 { color: var(--atelier); }
.legende-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; align-items: center; }
.legende-kinds.petite { margin: -4px 0 10px; }
.filtre-kind { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--ligne); background: #fff; color: var(--encre); text-decoration: none; font-weight: 700; font-size: 15px; }
.filtre-kind:hover { color: var(--encre); border-color: var(--violet-clair); }
.filtre-kind.actif { border-color: var(--encre); background: var(--creme); }
.puce-kind { width: 12px; height: 12px; border-radius: 50%; background: var(--jeux); }
.filtre-kind.kind-atelier .puce-kind { background: var(--atelier); }
.choix-kind { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.carte-kind { display: flex !important; flex-direction: row !important; gap: 10px !important; align-items: flex-start; padding: 12px 14px; border: 2px solid var(--ligne); border-radius: var(--rayon); cursor: pointer; font-weight: 400 !important; }
.carte-kind input { min-height: 0; width: 20px; height: 20px; margin-top: 3px; }
.carte-kind span { display: flex; flex-direction: column; gap: 2px; }
.carte-kind.kind-jeux:has(input:checked) { border-color: var(--jeux); background: var(--jeux-pale); }
.carte-kind.kind-atelier:has(input:checked) { border-color: var(--atelier); background: var(--atelier-pale); }
.points-evt { margin: 8px 0 4px; font-size: 16px; }
.atelier-cta { margin: 14px 0; border-left: 6px solid var(--atelier); }
.autres-rdv { border-left: 6px solid var(--rouge); }

/* ---------- accueil : quatre façons de participer ---------- */
.facons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 960px) { .facons { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .facons { grid-template-columns: 1fr; } }
.facon { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 16px 16px; background: #fff; border: 2px solid var(--encre); color: var(--encre); text-decoration: none; }
.facon:hover { color: var(--encre); transform: rotate(-.6deg) translateY(-2px); }
.facon strong { font-family: var(--main); font-size: 30px; line-height: 1; color: var(--encre); }
.facon-icone { font-size: 30px; line-height: 1; }
.facon-creer strong { color: var(--atelier); }
.facon-offrir strong { color: var(--rouge); }
.bandeau-creer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--atelier); color: #fff; padding: 22px 24px; }
.bandeau-creer .titre-bloc { color: #fff; }
.bandeau-creer p { margin: 6px 0; max-width: 70ch; }
.bandeau-creer a:not(.btn) { color: #fff; }

/* ---------- proposer : notice ---------- */
.notice-proposer { max-width: 860px; }
.notice-etapes { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 14px; }
.notice-etapes li { display: flex; gap: 14px; align-items: flex-start; }
.notice-etapes p { margin: 4px 0 0; }
.notice-etapes strong { font-size: 19px; }
.notice-num { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--rouge); color: #fff; font: 700 26px/1 var(--main); }
.notice-regles ul { margin: 0; padding-left: 1.2em; }
.choix-proposer { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 20px 0 10px; }
.carte-proposer { display: flex; flex-direction: column; gap: 4px; padding: 20px; background: #fff; border: 2px solid var(--encre); color: var(--encre); text-decoration: none; }
.carte-proposer:hover { color: var(--encre); background: var(--creme); }
.carte-proposer strong { font-family: var(--main); font-size: 28px; color: var(--encre); line-height: 1.1; }
.carte-proposer-icone { font-size: 40px; }

/* ---------- à valider ---------- */
.liste-revue { display: grid; gap: 14px; }
.carte-revue { display: flex; gap: 16px; padding: 16px; background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); box-shadow: var(--ombre); }
.carte-revue h3 { margin: 0 0 4px; }
.carte-revue label { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.carte-revue-mini { flex: none; }
.carte-revue-jeu { font-size: 54px; width: 84px; text-align: center; }
.carte-revue-corps { flex: 1; min-width: 0; }
.carte-revue-faite { opacity: .7; background: #F4FBF7; }
.encadre-revue { border: 2px solid #E0A800; background: #FFFCF0; }
.encadre-proposition { border: 2px solid var(--atelier); background: #F5FBFA; }
.liste-props { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.liste-props li { padding: 8px 0; border-bottom: 1px solid var(--ligne); }
@media (max-width: 560px) { .carte-revue { flex-direction: column; } }

/* ---------- jeux à imprimer ---------- */
.a-imprimer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0; border: 2px solid #0B4F8A; background: #F2F8FE; }
.a-imprimer-titre { margin: 0; }
.materiel { margin: 14px 0; }
.materiel .texte-riche p { margin: 0; }

/* ---------- livrets : liste ---------- */
.cartes-livrets { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.carte-livret { background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 0 0 12px; }
.carte-livret .boutons { padding: 0 16px; }
.carte-livret-lien { display: flex; flex-direction: column; gap: 4px; padding: 16px; color: inherit; text-decoration: none; }
.carte-livret-lien strong { font-size: 19px; color: var(--encre); }
.carte-livret-icone { font-size: 34px; }
.carte-livret.mode-cadeau { border-top: 6px solid var(--rouge); }
.carte-livret.mode-theme { border-top: 6px solid var(--atelier); }
.carte-livret.mode-import { border-top: 6px solid #0B4F8A; }
.carte-livret.mode-simple { border-top: 6px solid var(--encre); }

/* ---------- livrets : assistant ---------- */
.assistant-etape { margin: 22px 0; }
.pastille { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--rouge); color: #fff; font: 700 17px/1 var(--texte); margin-right: 6px; vertical-align: middle; }
.choix-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.carte-mode { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; background: #fff; border: 2px solid var(--ligne); border-radius: var(--rayon); cursor: pointer; }
.carte-mode input { position: absolute; top: 14px; right: 14px; width: 20px; height: 20px; min-height: 0; }
.carte-mode strong { font-size: 19px; color: var(--encre); }
.carte-mode-icone { font-size: 38px; line-height: 1; }
.carte-mode.choisi, .carte-mode:has(input:checked) { border-color: var(--rouge); background: #FFF7F8; box-shadow: 3px 4px 0 rgba(215,38,61,.25); }
.choix-occasions { display: flex; flex-wrap: wrap; gap: 10px; }
.carte-occasion { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 2px solid var(--ligne); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 700; }
.carte-occasion input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.carte-occasion:has(input:focus-visible) { outline: 3px solid var(--rouge); outline-offset: 2px; }
.carte-occasion-icone { font-size: 24px; }
.carte-occasion.choisi, .carte-occasion:has(input:checked) { border-color: var(--rouge); background: #FFF7F8; }
.choix-occasions.compactes .carte-occasion { padding: 6px 12px; }
.choix-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.carte-option { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px !important; padding: 10px 12px; background: #fff; border: 2px solid var(--ligne); border-radius: 10px; cursor: pointer; font-weight: 400 !important; font-size: 15px; }
.carte-option input { width: 20px; height: 20px; min-height: 0; flex: none; }
.carte-option-icone { font-size: 22px; width: 28px; text-align: center; }
.carte-option:has(input:checked) { border-color: var(--atelier); background: var(--atelier-pale); }
.choix-options.compactes .carte-option { padding: 6px 10px; font-size: 14px; }

/* ---------- livrets : atelier ---------- */
.atelier-etapes { display: flex; gap: 6px; overflow-x: auto; padding: 6px 2px 10px; margin-bottom: 8px; scrollbar-width: thin; }
.etape-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 2px solid var(--ligne); border-radius: 999px; background: #fff; color: var(--encre); font: 700 14px var(--texte); cursor: pointer; }
.etape-btn:hover { border-color: var(--violet-clair); }
.etape-btn.active { border-color: var(--encre); background: var(--encre); color: #fff; }
.etape-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--violet-pale); color: var(--encre); font-size: 12px; }
.etape-btn.active .etape-num { background: #fff; }
.atelier-corps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: 22px; align-items: start; }
@media (max-width: 900px) { .atelier-corps { grid-template-columns: 1fr; } .atelier-apercu { position: static !important; max-width: 420px; margin: 0 auto; } }
.lv-panneau { background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 18px 20px; box-shadow: var(--ombre); }
.lv-panneau .titre-petit { margin-top: 16px; }
.lv-nav { justify-content: space-between; margin-top: 14px; }
.atelier-apercu { position: sticky; top: 80px; }
.apercu-onglets { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.apercu-onglets button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--ligne); background: #fff; color: var(--encre); font: 700 13px var(--texte); cursor: pointer; }
.apercu-onglets button[aria-selected="true"] { background: var(--encre); color: #fff; border-color: var(--encre); }
.apercu-feuille { background: #E8E3EE; padding: 12px; border-radius: 10px; }
.apercu-feuille canvas { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.lv-mes-choix { margin-top: 16px; }
.lv-mes-choix summary { cursor: pointer; font-weight: 700; color: var(--atelier); }
.lv-occasions { margin-bottom: 6px; }
.lv-choisies .page-importee { align-items: center; }
.page-mini { flex: none; width: 46px; height: 64px; display: grid; place-items: center; border: 1px solid var(--ligne); background: #F7F4FA; font-size: 11px; text-align: center; white-space: pre-line; color: var(--gris); overflow: hidden; }
.page-mini img { width: 100%; height: 100%; object-fit: cover; }
.lv-choisies .t input { width: 100%; min-height: 34px; padding: 4px 8px; font-size: 15px; }
.lv-choisies .t .btn { margin-top: 4px; }
.depot { border: 3px dashed var(--violet-clair); border-radius: var(--rayon); padding: 22px; text-align: center; background: #FAF7FD; cursor: pointer; }
.depot p { margin: 4px 0; }
.depot.survol, .depot:hover { border-color: var(--encre); background: var(--violet-pale); }
.champ-couleur { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 10px; font-weight: 700; margin: 6px 12px 6px 0; }
.champ-couleur input[type="color"] { width: 54px; height: 40px; padding: 2px; cursor: pointer; }
.palettes { display: flex; flex-wrap: wrap; gap: 8px; }
.palette { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 2px solid var(--ligne); border-radius: 999px; background: #fff; cursor: pointer; font: 700 14px var(--texte); }
.palette:hover { border-color: var(--encre); }
.palette-c { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.choix-radio { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.choix-radio label, .choix-places label { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px !important; padding: 8px 12px; border: 2px solid var(--ligne); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 700; font-size: 15px; }
.choix-radio input, .choix-places input { width: 18px; height: 18px; min-height: 0; }
.choix-radio label.choisi, .choix-places label.choisi, .choix-polices label.choisi { border-color: var(--rouge); background: #FFF7F8; }
.choix-places { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.mini-page { position: relative; width: 26px; height: 36px; border: 1.5px solid var(--encre); background: #fff; flex: none; }
.mini-page::after { content: ""; position: absolute; background: var(--rouge); }
.p-hg::after { left: 2px; top: 2px; width: 9px; height: 9px; }
.p-hd::after { right: 2px; top: 2px; width: 9px; height: 9px; }
.p-bg::after { left: 2px; bottom: 2px; width: 9px; height: 9px; }
.p-bd::after { right: 2px; bottom: 2px; width: 9px; height: 9px; }
.p-bandeau::after { left: 2px; right: 2px; top: 2px; height: 8px; }
.p-fond::after { inset: 2px; opacity: .25; }
.choix-vignettes { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.vignette { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border: 2px solid var(--ligne); border-radius: 10px; background: #fff; cursor: pointer; font: 700 13px var(--texte); color: var(--encre); }
.vignette canvas { width: 96px; height: 64px; border-radius: 4px; border: 1px solid var(--ligne); }
.vignette.choisi { border-color: var(--rouge); background: #FFF7F8; }
.choix-polices { display: grid; gap: 8px; }
.choix-polices label { display: flex !important; flex-direction: row !important; flex-wrap: wrap; align-items: center; gap: 4px 12px !important; padding: 12px 14px; border: 2px solid var(--ligne); border-radius: 10px; cursor: pointer; }
.choix-polices input { width: 18px; height: 18px; min-height: 0; }
.choix-polices span { font-size: 28px; line-height: 1.1; color: var(--encre); }
.choix-polices small { width: 100%; padding-left: 30px; }
.police-anton span { font-family: var(--titre); }
.police-main span { font-family: "Kalam", cursive; font-weight: 700; }
.police-ronde span { font-family: "Patrick Hand", cursive; }
.slot-image { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin: 8px 0 12px; padding: 12px; border: 2px dashed var(--ligne); border-radius: 10px; background: #FCFAFE; }
.slot-apercu { width: 110px; height: 110px; display: grid; place-items: center; background: #fff; border: 1px solid var(--ligne); border-radius: 8px; overflow: hidden; }
.slot-apercu img { max-width: 100%; max-height: 100%; object-fit: contain; }
.slot-vide, .slot-pdf { font-size: 13px; color: var(--gris); text-align: center; padding: 6px; }
.slot-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.slot-galerie { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.slot-mini { width: 52px; height: 52px; padding: 2px; border: 2px solid var(--ligne); border-radius: 6px; background: #fff; cursor: pointer; overflow: hidden; display: grid; place-items: center; }
.slot-mini img { max-width: 100%; max-height: 100%; }
.slot-mini.choisi { border-color: var(--rouge); }
.slot-mini .slot-pdf { font-size: 10px; padding: 0; }
.marges label { flex: 1 1 200px; }
.marges input[type="range"] { padding: 0; min-height: 30px; }
input[type="range"] { accent-color: var(--rouge); }

/* ---------- outil de dessin ---------- */
.dessin { border: 0; border-radius: 16px; padding: 0; width: min(720px, calc(100vw - 16px)); max-height: calc(100vh - 16px); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.dessin::backdrop { background: rgba(22,19,28,.6); }
.dessin-in { padding: 14px 16px; }
.dessin-outils { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.dessin-outils label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.dessin-couleurs { display: flex; flex-wrap: wrap; gap: 4px; }
.dessin-couleur { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(0,0,0,.2); cursor: pointer; padding: 0; }
.dessin-couleur.choisi { outline: 3px solid var(--rouge); outline-offset: 2px; }
.dessin-toile { background: repeating-conic-gradient(#EEE 0 25%, #fff 0 50%) 0 0 / 20px 20px; border: 2px solid var(--encre); border-radius: 8px; }
.dessin-toile canvas { display: block; width: 100%; max-height: 58vh; aspect-ratio: 1; object-fit: contain; touch-action: none; cursor: crosshair; }
#dessin-gomme[aria-pressed="true"] { background: var(--encre); color: #fff; }

/* =========================================================================
   Composants « Jeux Insoumis » (maquettes d'Alex)
   ========================================================================= */

/* ---------- Sections repliables (macro section_repliable, <details>) ----------
   Titre en italique, gros trait noir dessous, triangle noir à droite qui pivote à l'ouverture. */
.repliable { margin: 6px 0 4px; }
.repliable-titre { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 10px 2px 6px; border-bottom: 4px solid var(--encre); cursor: pointer; list-style: none; color: var(--encre); }
.repliable-titre::-webkit-details-marker { display: none; }
.repliable-titre::marker { content: ""; }
.repliable-texte { font: italic 500 clamp(22px, 2.6vw, 32px)/1.15 var(--titre); }
.repliable-fleche { flex: none; width: 26px; height: 20px; margin-bottom: 6px; background: var(--encre); color: transparent; font-size: 0; overflow: hidden; clip-path: polygon(0 0, 100% 0, 50% 100%); transition: transform .2s; }
.repliable[open] > .repliable-titre .repliable-fleche { transform: rotate(180deg); }
.repliable-titre:hover .repliable-texte { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--rub-encre); text-underline-offset: 5px; }
.repliable-titre:focus-visible { outline: 3px solid var(--encre); outline-offset: 4px; border-radius: 4px; }
.repliable-corps { padding: 18px 0 14px; }

/* ---------- Titres de bloc, encadrés ---------- */
.titre-bloc { font: italic 600 26px/1.2 var(--titre); color: var(--encre); margin: 0 0 12px; }
.titre-petit { font: 700 18px/1.3 var(--titre); color: var(--encre); }
.kicker { color: var(--rub-encre); font-weight: 700; text-transform: uppercase; letter-spacing: .8px; font-size: 13px; margin: 0; }
.encadre { background: rgba(255, 255, 255, .92); border: 2px solid var(--encre); border-radius: 16px; padding: 18px 20px; box-shadow: none; }

/* ---------- Cartes des grilles (maquette : fond jaune pâle, vignette rose bordée de noir) ---------- */
.carte-grille { background: var(--jaune-pale); border: 0; border-radius: 20px; box-shadow: none; }
.carte-grille:hover { transform: translateY(-2px); box-shadow: var(--ombre-dure); }
.carte-lien { padding: 18px; gap: 16px; border-radius: 20px; }
.carte-vignette { padding: 6px; background: #FF9FD0; border: 2px solid var(--encre); border-radius: 8px; align-self: flex-start; }
.carte-vignette svg { display: block; }
.carte-une { background: #fff; }
.carte-une .carte-vignette { padding: 10px; }
.carte-type { color: var(--encre); font-size: 14.5px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.carte-titre { font: 700 19px/1.25 var(--titre); }
.carte-une .carte-titre { font-size: clamp(22px, 2.6vw, 28px); color: var(--encre); }
.carte-meta { color: var(--encre); font-size: 13.5px; font-weight: 500; }
.est-resolue { box-shadow: inset 0 0 0 2px #3CC700; }
.thumb .tl { fill: #fff; stroke: #7A5FB0; stroke-width: .6; }
.thumb .tb { fill: #3D2A6B; }
.thumb .td { fill: #D9CCF0; stroke: #7A5FB0; stroke-width: .6; }
.thumb .tv { fill: #EEE8F8; stroke: #7A5FB0; stroke-width: .6; }
.thumb .tg { fill: var(--grise); stroke: #7A5FB0; stroke-width: .6; }

/* badges : petites étiquettes arrondies en italique */
.badge { display: inline-block; padding: 2px 10px; border-radius: 6px; background: #FF9FD0; color: var(--encre); font: italic 600 12.5px/1.5 var(--texte); }
.badge-ok { background: #C9FFB0; color: var(--encre); }
.badge-chaud { background: var(--jaune); color: var(--encre); }
.badge-discret { background: transparent; color: var(--encre); font-style: normal; font-weight: 400; padding-left: 0; }
.badge-refus { background: #FFE1C2; color: var(--encre); }
.badge-imprimer { background: #CFFFFF; color: var(--encre); }

/* onglets (classement, éditeur…) */
.onglets a, .onglets button { border: 2px solid var(--encre); border-radius: 10px; background: #fff; color: var(--encre); font: italic 600 15px var(--texte); }
.onglets a:hover, .onglets button:hover { background: var(--rub-pale); color: var(--encre); }
.onglets a[aria-current="page"], .onglets button[aria-selected="true"] { background: var(--rub); color: var(--encre); border-color: var(--encre); }

/* ---------- Formulaires ---------- */
input, select, textarea { border: 2px solid #8C8C8C; border-radius: 8px; }
input:focus, select:focus, textarea:focus { border-color: var(--encre); box-shadow: 0 0 0 3px var(--rub); }
input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: var(--encre); }
.formulaire-large fieldset { border: 2px solid var(--encre); border-radius: 14px; padding: 14px 16px; }
.formulaire-large legend { color: var(--encre); font-style: italic; }

/* ---------- Tableaux ---------- */
.tableau, .tableau-classement { border: 2px solid var(--encre); border-radius: 14px; box-shadow: none; }
.tableau th, .tableau-classement th { background: var(--rub-pale); color: var(--encre); font-weight: 700; }
.tableau-classement td:first-child { color: var(--encre); font-weight: 700; }
.tableau-classement tr.moi { background: var(--creme); }
.tableau-compact { border: 1px solid var(--ligne); border-radius: 10px; }
.tableau-compact tr:hover td { background: #F7F7F7; }
.tableau-compact tr.alerte td { background: #FFE6F3; }

/* ---------- Cartes diverses : contour noir, coins arrondis, sans ombre floue ---------- */
.carte-evt, .evt-accueil, .carte-jeu, .stat, .succes, .lv-panneau, .carte-livret, .carte-revue, .carte-contact,
.kpi, .g-carte, .g-filtres, .carte-proposer, .facon, .carte-mode, .ed-droite, .ed-outils, .ed-props-zone, .ed-notice,
.ed-grille-zone, .ed-image, .jeu-defs, .regles, .sj-question, .sj-defs, .sj-scores {
  border: 2px solid var(--encre); border-radius: 14px; box-shadow: none;
}
.carte-jeu:hover, .carte-livret:hover, .evt-accueil:hover, .carte-proposer:hover, .facon:hover { box-shadow: var(--ombre-dure); transform: translate(-1px, -2px); color: var(--encre); }
.carte-jeu strong, .carte-livret-lien strong, .carte-mode strong, .choix h2, .carte-contact h2, .evt-corps h3 { color: var(--encre); }
.carte-jeu em { color: var(--rub-encre); }
.carte-jeu img, .carte-jeu-defaut { border: 2px solid var(--encre); border-radius: 10px; }
.carte-jeu-defaut { background: var(--rub-pale); }
.jeu-image, .evt-image, .evt-vignette, .apercu-image, .partage-apercu { border: 2px solid var(--encre); border-radius: 12px; box-shadow: none; }
.stat strong { color: var(--encre); }
.succes.debloque { border-color: var(--encre); background: var(--creme); }
.succes-icone { background: var(--violet-pale); }
.succes.debloque .succes-icone { background: var(--jaune); }
.kpi-fort { border-top-width: 6px; border-top-color: var(--rose); }
.g-onglets a[aria-current="page"] { color: var(--encre); border-bottom-color: var(--rose); }
.g-onglets a:hover { color: var(--encre); }
.g-periode { border: 2px solid var(--encre); }
.g-periode a { color: var(--encre); }
.g-periode a[aria-current="true"] { background: var(--encre); color: #fff; }
.g-alerte { border-color: #E0C800; color: var(--encre); background: var(--creme); }
.g-alerte:hover { color: var(--encre); background: var(--jaune); }
.graph-barre, .hb-barre { fill: var(--rose); background: var(--rose); }
.graph-col:hover .graph-barre { fill: var(--rouge); }
.graph-col:hover .graph-hit { fill: rgba(255, 19, 147, .08); }
.hb-piste { background: #F1F1F1; }

/* jeu (grille à remplir) : en-tête non collant, l'indice et les définitions collent en haut de l'écran */
.jeu-indice { top: 8px; background: var(--encre); color: #fff; border-radius: 12px; box-shadow: none; }
.jeu-indice .lab { color: #FF9FD0; }
.jeu-defs { top: 10px; }
.jeu-defs h2, .mystere-label { color: var(--rub-encre); }
.jeu-note { background: var(--creme); }
.case-l.dans-mot { background: #FFE0F0; }
.case-g.dans-mot { background: #FFC2E1; }
.case-l.active { background: var(--jaune) !important; }
.case .lettre.sol { color: var(--rouge); }
.case-d { background: #F4F0FA; }
.def-mot.actif, .case-d .def.actif { background: var(--jaune); }
.grille.resolue .case-l { background: #E8FFDC; }
.grille.resolue .case-g { background: #C9FFB0; }
.grille-meles .case-l.trouvee { background: #FFC2E1; color: var(--encre); }
.grille-meles .case-l.selection { background: var(--jaune); }
.grille-meles .case-l.debut { background: #FFE14D; }

/* éditeur */
.ed-droite { top: 10px; max-height: calc(100vh - 20px); }
/* sur téléphone, la grille défile dans sa zone au lieu d'élargir la page */
.editeur > *, .ed-zone, .ed-grille-zone { min-width: 0; max-width: 100%; }
@media (max-width: 1050px) { .editeur { grid-template-columns: minmax(0, 1fr); } }
.ed-outils .btn.on { background: var(--encre); color: #fff; }
.ed-intro { border: 2px dashed var(--encre); border-radius: 16px; }
.ed-intro h2, .ed-def-titre { font-family: var(--titre); font-weight: 700; color: var(--encre); }
.ed-options { background: #F6F6F6; }
.ed-def-ligne.actif { background: var(--creme); }
.puces-mots button { border: 1.5px solid var(--encre); color: var(--encre); }
.puces-mots button:hover { background: var(--rose); color: var(--encre); }
.puces-mots button.theme { border-color: var(--rouge); color: var(--rouge-fonce); }
.atelier-apercu { top: 10px; }

/* pastilles numérotées */
.pastille, .notice-num { background: var(--rose); color: var(--encre); border: 2px solid var(--encre); }
.pastille-blanche { background: #fff; color: var(--encre); }
.pastille-petite { background: var(--encre); color: #fff; border: 0; }

/* rendez-vous : couleurs par type (jeux = rose, atelier = cyan), texte noir */
:root { --jeux: #111111; --jeux-pale: #FFE3F2; --atelier: #005F5F; --atelier-pale: #CCFFFF; }
.evt-date { background: var(--jaune); color: var(--encre); border: 2px solid var(--encre); }
.evt-accueil.kind-atelier .evt-date { background: var(--cyan); }
.carte-evt.kind-jeux, .evt-accueil.kind-jeux { border-left: 8px solid var(--rose); }
.carte-evt.kind-atelier, .evt-accueil.kind-atelier { border-left: 8px solid var(--cyan); }
.carte-evt-lien:hover { background: var(--rub-pale); }
.btn-atelier { background: var(--cyan); color: var(--encre); }
.btn-atelier:hover { background: var(--cyan); color: var(--encre); }
.puce-kind { background: var(--rose); border: 1px solid var(--encre); }
.filtre-kind.kind-atelier .puce-kind { background: var(--cyan); }
.filtre-kind { border-color: var(--encre); border-radius: 10px; }
.filtre-kind.actif { background: var(--rub); }
.atelier-cta { border-left: 8px solid var(--cyan); }
.autres-rdv { border-left: 8px solid var(--rose); }
.je-viens { background: var(--rub-pale); border: 2px solid var(--encre); }
.surprise { background: var(--creme); }
.evt-stand { background: var(--encre); }
/* calendrier : cadre jaune épais, grille noire (maquette Rendez-vous) */
.calendrier { border: 0; outline: 8px solid var(--jaune); outline-offset: -1px; border-radius: 0; box-shadow: none; margin: 8px 0; }
.calendrier th { background: #fff; color: var(--encre); border-bottom: 2px solid var(--encre); }
.calendrier td { border: 1px solid var(--encre); }
.calendrier td.hors-mois { background: #F6F6F6; color: #8A8A8A; }
.calendrier td.aujourdhui { background: var(--creme); }
.calendrier td.aujourdhui .cal-num { background: var(--encre); color: #fff; }
.cal-evt { background: var(--jaune); color: var(--encre); border: 1px solid var(--encre); border-radius: 6px; }
.cal-evt:hover { background: var(--rose); color: var(--encre); }
.cal-evt.kind-atelier { background: var(--cyan); }
.cal-evt.kind-atelier:hover { background: var(--rose); }

/* livrets, propositions, choix */
.type-carte, .carte-mode, .carte-option, .carte-occasion, .choix-radio label, .choix-places label, .choix-polices label,
.vignette, .palette, .carte-kind, .etape-btn, .apercu-onglets button { border-color: var(--encre); }
.type-carte:hover { border-color: var(--encre); }
.type-carte strong { color: var(--encre); }
.type-carte:has(input:checked), .carte-mode.choisi, .carte-mode:has(input:checked), .carte-occasion.choisi, .carte-occasion:has(input:checked),
.choix-radio label.choisi, .choix-places label.choisi, .choix-polices label.choisi, .vignette.choisi, .carte-option:has(input:checked),
.carte-kind.kind-jeux:has(input:checked), .carte-kind.kind-atelier:has(input:checked) { border-color: var(--encre); background: var(--rub-pale); box-shadow: var(--ombre-dure); }
.type-carte:has(input:focus-visible), .carte-occasion:has(input:focus-visible) { outline: 3px solid var(--encre); }
.etape-btn.active, .apercu-onglets button[aria-selected="true"] { background: var(--encre); color: #fff; border-color: var(--encre); }
.etape-num { background: #EFEFEF; color: var(--encre); }
.choix-polices span { color: var(--encre); }
.police-anton span { font-family: "Anton", Impact, sans-serif; font-weight: 400; }
.carte-livret.mode-cadeau { border-top: 8px solid var(--rose); }
.carte-livret.mode-theme { border-top: 8px solid var(--vert); }
.carte-livret.mode-import { border-top: 8px solid var(--cyan); }
.carte-livret.mode-simple { border-top: 8px solid var(--jaune); }
.depot { border-color: var(--encre); background: #FAFAFA; }
.depot.survol, .depot:hover { border-color: var(--encre); background: var(--rub-pale); }
.apercu-feuille { background: #EDEDED; }
.mini-page::after { background: var(--rose); }
.encadre-revue { border-color: #E0C800; background: #FFFDEB; }
.encadre-proposition { border-color: var(--encre); background: #F2FFFF; }
.carte-revue-faite { background: #F2FFEC; }
.a-imprimer { border: 2px solid var(--encre); background: #F2FFFF; }
.mot-createur { background: var(--creme); border-left-color: #E0C800; }
.bandeau-contact { background: var(--creme); border: 2px solid var(--encre); }
.avertissement { background: var(--creme); border: 2px solid var(--encre); }
.avertissement h2 { color: var(--rouge-fonce); }
.souligne { color: inherit; box-shadow: inset 0 -.3em 0 var(--rub); }
.surligne { background: linear-gradient(transparent 55%, var(--jaune) 55%); }
.rature { text-decoration: line-through; color: var(--gris); }
.annotation { font-family: var(--main); color: var(--rub-encre); }
.compte-rebours { background: linear-gradient(135deg, #590F98, #656567); border-radius: 18px; }
.cr-label, .cr-chiffre { font-family: var(--titre); font-weight: 700; }
.bandeau-creer { background: var(--cyan); color: var(--encre); border: 2px solid var(--encre); border-radius: 16px; }
.bandeau-creer .titre-bloc, .bandeau-creer a:not(.btn) { color: var(--encre); }
.facon strong, .carte-proposer strong { font: italic 600 24px/1.15 var(--titre); color: var(--encre); }
.facon-creer strong, .facon-offrir strong { color: var(--encre); }
.toast { background: var(--encre); border-radius: 14px; }
.toast strong { color: var(--jaune); }
.toast .succes-icone { background: var(--jaune); }
.dialogue { border: 2px solid var(--encre); }
.dialogue h2 { font-family: var(--titre); font-weight: 700; color: var(--encre); }
.dialogue::backdrop { background: rgba(17, 17, 17, .55); }
.erreur-code { font-family: var(--titre); font-weight: 700; color: var(--rose); }
.texte h2, .texte-legal h2 { color: var(--encre); }
.texte-legal h2 { border-bottom: 3px solid var(--encre); }
.encart-legal { border: 2px solid var(--encre); border-left-width: 8px; }
.sommaire { background: #F4F4F4; }
.ou-jouer { border-left: 8px solid var(--rub); }

/* mode stand (pages à part, sans en-tête du site) */
.sj-entete { background: linear-gradient(90deg, #590F98, #656567); }
.sj-logo { background: var(--rose); color: var(--encre); font: 700 15px/1 var(--police-main); }
.sj-btn-equipe { border: 2px solid var(--encre); }
.sj-annonce { background: var(--creme); border-color: var(--encre); }
.se-site, .se-rejoindre-titre, .sj-num, .sj-timer { color: var(--rouge); }
.se-chrono { background: var(--encre); }
.se-annonce { border-color: var(--rose); color: var(--encre); }
.se-fin { background: rgba(89, 15, 152, .94); }

/* ---------- Couche décorative : dessins de fond et motif du sous-titre ----------
   Toujours derrière le contenu, jamais cliquable ; les petits personnages et le motif restent
   dans les marges (écrans larges seulement) ; les grandes silhouettes sont pâlies. */
.decor { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; user-select: none; -webkit-user-select: none; }
.page > .site-header, .page > .main { position: relative; z-index: 1; }
.decor > * { position: absolute; display: block; pointer-events: none; }
.decor-fond { background: no-repeat center top / contain; -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent); }
.decor-accueil .decor-fond { background-image: url("../img/ji/fond-accueil.png"); left: 50%; top: 150px; width: min(1100px, 96%); height: 640px; transform: translateX(-50%); opacity: .9; }
.decor-mots .decor-fond { background-image: url("../img/ji/fond-mots.png"); right: max(-60px, calc(50% - 690px)); top: 110px; width: min(560px, 48%); height: 880px; background-position: right top; opacity: .55; }
.decor-ludo .decor-fond { background-image: url("../img/ji/fond-ludo.png"); right: max(-60px, calc(50% - 690px)); top: 110px; width: min(600px, 50%); height: 1300px; background-position: right top; opacity: .5; }
.decor-rdv .decor-fond { background-image: url("../img/ji/fond-rdv.png"); left: max(-40px, calc(50% - 640px)); top: 120px; width: min(620px, 50%); height: 720px; background-position: left top; opacity: .7; }

/* petits personnages noirs : dans les marges gauche et droite */
.decor-perso { --l: clamp(70px, calc(50% - 606px), 150px); width: var(--l); height: 130px; background: no-repeat center / contain; display: none; }
.deco-1 { background-image: url("../img/ji/deco-1.png"); }
.deco-2 { background-image: url("../img/ji/deco-2.png"); }
.deco-3 { background-image: url("../img/ji/deco-3.png"); }
.deco-4 { background-image: url("../img/ji/deco-4.png"); }
.deco-5 { background-image: url("../img/ji/deco-5.png"); }
.deco-6 { background-image: url("../img/ji/deco-6.png"); }
/* positions en pourcentage de la hauteur de page (minimum en px) : sur une page courte, les derniers
   personnages tombent hors de la couche et ne s'affichent pas, plutôt que d'être coupés */
.decor .pos-1 { left: 6px; top: 260px; }
.decor .pos-2 { right: 6px; top: 330px; }
.decor .pos-3 { left: 6px; top: max(800px, 55%); }
.decor .pos-4 { right: 6px; top: max(1000px, 66%); }
.decor .pos-5 { left: 6px; top: max(1300px, 80%); }
.decor .pos-6 { right: 6px; top: max(1600px, 90%); }

/* le sous-titre en motif : écrit à la main, penché, purement décoratif */
.motif { font: 700 17px/1.25 var(--police-main); color: var(--motif); white-space: normal; text-align: center; }
.motif-1, .motif-2 { display: none; width: clamp(70px, calc(50% - 606px), 150px); font-size: 15px; }
.motif-1 { left: 6px; top: min(470px, calc(100% - 270px)); transform: rotate(-8deg); }
.motif-2 { right: 6px; top: min(max(560px, 40%), calc(100% - 270px)); transform: rotate(6deg); }
.motif-3 { left: 50%; bottom: 22px; width: min(820px, 92%); transform: translateX(-50%) rotate(-2deg); font-size: 20px; }

@media (min-width: 1340px) {
  .decor-perso, .motif-1, .motif-2 { display: block; }
}
/* la gestion est plus large que les autres pages : pas de dessins dans ses marges */
.page-gestion .decor-perso, .page-gestion .motif-1, .page-gestion .motif-2 { display: none; }

/* ---------- En-tête et pied sur tablette et téléphone ---------- */
@media (max-width: 900px) {
  .nav-rubriques { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
  .bouton-rub { min-height: 54px; }
  .mobi-in { grid-template-columns: 1fr; }
  .mobi-carte { min-height: 0; }
}
@media (max-width: 760px) {
  .header-haut { grid-template-columns: minmax(0, 1fr) auto; }
  .nav-toggle { display: inline-flex; margin-top: 4px; }
  .nav-discrete { display: none; grid-column: 1 / -1; flex-direction: column; align-items: stretch; gap: 0; padding: 6px 12px; margin-top: 6px; border: 2px solid var(--encre); border-radius: 12px; background: #fff; font-size: 16px; }
  .nav-discrete.ouvert { display: flex; }
  .nav-discrete a { padding: 10px 4px; border-bottom: 1px solid var(--ligne); }
  .nav-discrete a:last-child { border-bottom: 0; }
  .nav-discrete a + a::before { display: none; }
  .nav-discrete .nav-compte { border: 0; border-radius: 0; margin: 0; padding: 10px 4px; font-weight: 700; }
  .sous-titre-site { font-size: 14px; }
  .bouton-rub-titre { font-size: 19px; }
  .bouton-rub { box-shadow: 3px 3px 0 var(--encre); }
  .repliable-texte { font-size: 22px; }
  .repliable-fleche { width: 20px; height: 15px; margin-bottom: 5px; }
  .decor-fond { opacity: .3 !important; }
  .decor-accueil .decor-fond { opacity: .5 !important; height: 520px; }
  .motif-3 { font-size: 17px; bottom: 18px; }
  .main { padding-bottom: 104px; }
}
@media (max-width: 600px) {
  .bandeau-in { padding-top: 4px; padding-bottom: 8px; }
  .bandeau-txt { font-size: 13px; gap: 8px; }
  .bandeau-txt small { font-size: 12.5px; }
  .bandeau-jours { width: 74px; height: 60px; margin-left: -8px; }
  .bandeau-jours .etoile-texte { font-size: 25px; }
  .bandeau-actions { width: 100%; }
  .bandeau-actions .btn { flex: 1 1 auto; }
  .titre-site-img { height: 50px; }
  .titre-site-repli { font-size: clamp(30px, 9vw, 40px); white-space: nowrap; }
  h1 { font-size: 28px; }
}
@media (max-width: 380px) {
  .nav-rubriques { gap: 10px; }
  .bouton-rub-titre { font-size: 17px; }
}

/* ---------- Mouvements réduits ---------- */
@media (prefers-reduced-motion: reduce) {
  .toast, .se-annonce.pop { animation: none; }
  *, *::before, *::after { transition: none !important; }
  .btn:hover, .bouton-rub:hover, .carte-grille:hover, .carte-jeu:hover, .carte-livret:hover, .evt-accueil:hover,
  .carte-proposer:hover, .facon:hover, .mobi-carte:hover, a.etoile:hover { transform: none; }
}

/* ---------- Impression ---------- */
@media print {
  body { background: #fff; }
  .decor, .bandeau-elec, .site-header, .mobilisation, .site-footer, .nav-toggle { display: none !important; }
  .main { padding-bottom: 0; }
  .encadre, .carte-grille { box-shadow: none; }
}

/* formulaires sur téléphone : un champ fichier ne doit pas élargir la page */
fieldset { min-width: 0; }
input[type="file"] { max-width: 100%; }

/* doit rester en dernier : un élément masqué l'est toujours, même si sa classe impose un affichage */
[hidden] { display: none !important; }
