/* Dragons Ludiques — prototype */
:root {
  --jaune: #f7ce46;
  --jaune-clair: #fde9a0;
  --creme: #fff8e7;
  --encre: #1f1b16;
  --encre-douce: #4a4339;
  --gris: #776f63;
  --rouge: #e0552f;
  --vert: #2f8f6b;
  --bleu: #2f5d8f;
  --violet: #7a4f9a;
  --blanc: #ffffff;
  --bord: #e9dcb8;
  --ombre: 0 2px 0 var(--encre);
  --rayon: 18px;
  --titre: "Fredoka", system-ui, sans-serif;
  --texte: "Nunito Sans", system-ui, sans-serif;
  --largeur: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--texte);
  font-size: 17px;
  line-height: 1.6;
  color: var(--encre);
  background: var(--creme);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--titre); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.conteneur { width: min(var(--largeur), 100% - 32px); margin-inline: auto; }
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section--jaune { background: var(--jaune); }
.section--encre { background: var(--encre); color: var(--creme); }
.section--blanc { background: var(--blanc); }

.surtitre {
  display: inline-block;
  font-family: var(--titre);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rouge);
  margin-bottom: .6em;
}
.section--jaune .surtitre { color: var(--encre); opacity: .7; }
.chapo { font-size: 1.15rem; color: var(--encre-douce); max-width: 62ch; }
.section--encre .chapo { color: #d9cfbd; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.4em;
  font-family: var(--titre); font-weight: 600; font-size: 1.02rem;
  border: 2px solid var(--encre);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
  box-shadow: 0 4px 0 var(--encre);
  background: var(--blanc);
  color: var(--encre);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--encre); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--encre); }
.btn--rouge { background: var(--rouge); color: var(--blanc); }
.btn--jaune { background: var(--jaune); }
.btn--vert { background: #25d366; color: var(--encre); }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btns { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 231, .92);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--encre);
}
.entete__in { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; white-space: nowrap; text-decoration: none; font-family: var(--titre); font-weight: 700; font-size: 1.3rem; }
.logo img { width: 52px; height: 48px; object-fit: contain; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  text-decoration: none; font-weight: 700; font-size: .98rem;
  padding: .45em .8em; border-radius: 999px; white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--jaune); }
.nav .btn { margin-left: 10px; padding: .55em 1.1em; box-shadow: 0 3px 0 var(--encre); }
/* Bouton Scan (lecteur de QR code), tout à droite de l'en-tête */
.scan { display: inline-flex; align-items: center; gap: 6px; flex: none; text-decoration: none; color: var(--encre); font-family: var(--titre); font-weight: 600; font-size: .98rem;
  background: var(--jaune); border: 2px solid var(--encre); border-radius: 999px; padding: .45em .9em; box-shadow: 0 3px 0 var(--encre); margin-left: -12px;
  transition: transform .15s ease, box-shadow .15s ease; }
.scan:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--encre); }
.scan svg { width: 1.25em; height: 1.25em; }
@media (max-width: 1360px) and (min-width: 901px) { .scan span { display: none; } .scan { padding: .5em; margin-left: -14px; } }
@media (max-width: 900px) { .scan { height: 44px; padding: 0 .9em; margin-left: -14px; } }
@media (max-width: 480px) { .scan { width: 44px; padding: 0; justify-content: center; } .scan span { display: none; } }
@media (max-width: 400px) { .entete__in { gap: 14px; } .logo { font-size: 1.08rem; gap: 6px; } .logo img { width: 42px; height: 39px; } .scan { margin-left: -6px; } }
.burger { display: none; margin-left: auto; background: none; border: 2px solid var(--encre); border-radius: 12px; width: 44px; height: 44px; cursor: pointer; }
.burger span, .burger span::before, .burger span::after { display: block; width: 20px; height: 2px; background: var(--encre); margin: auto; position: relative; content: ""; }
.burger span::before { position: absolute; top: -6px; }
.burger span::after { position: absolute; top: 6px; }

@media (max-width: 1100px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--creme); border-bottom: 2px solid var(--encre);
    padding: 12px 16px 20px;
    transform: translateY(-120%); transition: transform .25s ease;
  }
  .nav.ouvert { transform: none; }
  .nav a { padding: .8em 1em; font-size: 1.1rem; }
  .nav .btn { margin: 10px 0 0; justify-content: center; }
}

/* ---------- Héros ---------- */
.heros { background: var(--jaune); border-bottom: 2px solid var(--encre); overflow: hidden; position: relative; }
.heros__in { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; padding: clamp(40px, 7vw, 88px) 0; }
.heros h1 span { color: var(--rouge); }
.heros p.chapo { color: var(--encre); font-size: 1.25rem; }
.heros__img { position: relative; }
.heros__img img { width: 100%; max-width: 520px; margin-inline: auto; filter: drop-shadow(0 10px 0 rgba(31, 27, 22, .15)); animation: flotte 6s ease-in-out infinite; }
@keyframes flotte { 50% { transform: translateY(-10px) rotate(-1.5deg); } }
.pions { position: absolute; inset: 0; pointer-events: none; }
.pion { position: absolute; width: 26px; height: 34px; }
@media (max-width: 800px) {
  .heros__in { grid-template-columns: 1fr; text-align: left; }
  .heros__img { order: -1; }
  .heros__img img { max-width: 300px; }
}
@media (prefers-reduced-motion: reduce) { .heros__img img { animation: none; } html { scroll-behavior: auto; } }

/* Bandeau prochaines soirées */
.prochaines { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.puce-date {
  display: flex; align-items: center; gap: 10px;
  background: var(--blanc); border: 2px solid var(--encre); border-radius: 14px;
  padding: 8px 14px; font-weight: 700; font-size: .95rem;
}
.puce-date b { font-family: var(--titre); }
.puce-date small { display: block; font-weight: 600; color: var(--gris); font-size: .8rem; }
.pastille { width: 12px; height: 12px; border-radius: 50%; flex: none; border: 2px solid var(--encre); }

/* ---------- Chiffres ---------- */
.chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.chiffre { background: var(--blanc); border: 2px solid var(--encre); border-radius: var(--rayon); padding: 24px; box-shadow: 0 5px 0 var(--encre); }
.chiffre b { font-family: var(--titre); font-size: 2.6rem; display: block; line-height: 1; color: var(--rouge); }
.chiffre span { font-weight: 700; color: var(--encre-douce); }
@media (max-width: 640px) { .chiffres { grid-template-columns: 1fr; } }

.deux-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 800px) { .deux-col { grid-template-columns: 1fr; } }
.photo { border: 2px solid var(--encre); border-radius: var(--rayon); overflow: hidden; box-shadow: 8px 8px 0 var(--encre); background: var(--jaune-clair); }
.photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

/* ---------- Cartes soirées ---------- */
.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 40px; }
.carte {
  background: var(--blanc); border: 2px solid var(--encre); border-radius: var(--rayon);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 6px 0 var(--encre);
  transition: transform .2s ease;
}
.carte:hover { transform: translateY(-4px) rotate(-.4deg); }
.carte__img { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 2px solid var(--encre); background: var(--jaune-clair); }
.carte__img img { width: 100%; height: 100%; object-fit: cover; }
.carte__corps { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.carte__corps p { color: var(--encre-douce); font-size: .98rem; }
.etiquette {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--titre); font-weight: 600; font-size: .85rem;
  padding: .25em .8em; border-radius: 999px; border: 2px solid var(--encre);
  margin-bottom: 12px;
}
.etiquette--familles { background: #bfe7d4; }
.etiquette--experts { background: #c9d9f0; }
.etiquette--jdr { background: #e2d0f0; }
.etiquette--festival { background: #ffd0bf; }
.etiquette--figurines { background: #fde9a0; }
.carte__meta { margin-top: auto; padding-top: 14px; border-top: 2px dashed var(--bord); display: grid; gap: 4px; font-size: .92rem; font-weight: 700; }
.carte__meta div { display: flex; gap: 8px; align-items: center; }
.carte__meta svg { width: 18px; height: 18px; flex: none; }
.jeux-cites { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.jeux-cites span { font-size: .8rem; font-weight: 700; background: var(--creme); border: 1px solid var(--bord); border-radius: 8px; padding: 2px 8px; }

/* ---------- Bloc ludothèque (accueil) ---------- */
.ludo-pile { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ludo-pile .boite {
  border: 2px solid var(--encre); border-radius: 12px; padding: 14px; min-height: 110px;
  display: flex; flex-direction: column; justify-content: flex-end;
  font-family: var(--titre); font-weight: 600; font-size: 1.05rem; line-height: 1.15;
  box-shadow: 0 4px 0 var(--encre);
}
.ludo-pile .boite small { font-family: var(--texte); font-weight: 700; font-size: .75rem; opacity: .75; }
.ludo-pile .boite:nth-child(3n+1) { transform: rotate(-1.5deg); }
.ludo-pile .boite:nth-child(3n+2) { transform: rotate(1deg); }

/* ---------- Infos pratiques ---------- */
.infos { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; margin-top: 40px; }
@media (max-width: 860px) { .infos { grid-template-columns: 1fr; } }
.infos__liste { display: grid; gap: 16px; }
.info {
  display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start;
  background: var(--blanc); border: 2px solid var(--encre); border-radius: var(--rayon); padding: 18px 20px;
}
.info__ico { width: 48px; height: 48px; border-radius: 14px; background: var(--jaune); border: 2px solid var(--encre); display: grid; place-items: center; }
.info__ico svg { width: 24px; height: 24px; }
.info h3 { font-size: 1.1rem; margin-bottom: .2em; }
.info p { margin: 0; color: var(--encre-douce); font-size: .97rem; }
.carte-geo { border: 2px solid var(--encre); border-radius: var(--rayon); overflow: hidden; min-height: 360px; box-shadow: 8px 8px 0 var(--encre); background: var(--jaune-clair); }
.carte-geo iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }

/* ---------- Équipe ---------- */
.equipe { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 40px; }
.membre { background: var(--creme); color: var(--encre); border: 2px solid var(--creme); border-radius: var(--rayon); padding: 26px; position: relative; }
.avatar {
  width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--encre);
  display: grid; place-items: center; font-family: var(--titre); font-weight: 700; font-size: 1.7rem;
  margin-bottom: 14px;
}
.membre h3 { margin-bottom: 0; }
.membre .role { font-weight: 800; color: var(--rouge); font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; display: block; margin-bottom: 10px; }
.membre p { font-size: .96rem; color: var(--encre-douce); margin: 0; }

/* ---------- Avis ---------- */
.avis { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 40px; }
.citation { background: var(--blanc); border: 2px solid var(--encre); border-radius: var(--rayon); padding: 28px; position: relative; box-shadow: 0 6px 0 var(--encre); margin: 0; }
.citation::before { content: "“"; font-family: Georgia, serif; font-size: 5rem; line-height: 1; color: var(--jaune); position: absolute; top: 4px; left: 18px; -webkit-text-stroke: 2px var(--encre); }
.citation p { margin: 36px 0 18px; font-size: 1.05rem; }
.citation footer b { font-family: var(--titre); font-size: 1.1rem; display: block; }
.citation footer span { color: var(--gris); font-size: .92rem; }

/* ---------- Appel à l'action ---------- */
.cta { background: var(--rouge); color: var(--blanc); border: 2px solid var(--encre); border-radius: 28px; padding: clamp(32px, 6vw, 64px); display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; box-shadow: 10px 10px 0 var(--encre); }
.cta h2 { color: var(--blanc); }
.cta p { color: #ffe6dc; font-size: 1.1rem; }
.cta .btns { justify-content: flex-end; }
@media (max-width: 800px) { .cta { grid-template-columns: 1fr; } .cta .btns { justify-content: flex-start; } }

/* ---------- Pied ---------- */
.pied { background: var(--encre); color: #d9cfbd; padding: 56px 0 28px; font-size: .95rem; }
.pied__in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.pied h4 { color: var(--creme); font-size: 1.1rem; }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pied a { text-decoration: none; }
.pied a:hover { color: var(--jaune); }
.pied .logo { color: var(--creme); margin-bottom: 12px; }
.pied__bas { border-top: 1px solid #3a342c; margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .85rem; color: #9b9184; }
@media (max-width: 760px) { .pied__in { grid-template-columns: 1fr; } }

/* ---------- Ludothèque ---------- */
.page-titre { background: var(--jaune); border-bottom: 2px solid var(--encre); padding: clamp(40px, 6vw, 72px) 0 clamp(32px, 5vw, 56px); }
.page-titre .chapo { color: var(--encre); }
.filtres { position: sticky; top: 72px; z-index: 20; background: var(--creme); border-bottom: 2px solid var(--encre); padding: 14px 0; }
.filtres__in { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.recherche { flex: 1 1 260px; position: relative; }
.recherche input { width: 100%; font: inherit; padding: .7em 1em .7em 2.6em; border: 2px solid var(--encre); border-radius: 999px; background: var(--blanc); }
.recherche svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; }
.filtres select { font: inherit; font-weight: 700; padding: .65em 2.2em .65em 1em; border: 2px solid var(--encre); border-radius: 999px; background: var(--blanc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f1b16' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 14px; appearance: none; cursor: pointer; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { font: inherit; font-weight: 700; font-size: .92rem; padding: .45em 1em; border: 2px solid var(--encre); border-radius: 999px; background: var(--blanc); cursor: pointer; }
.puce[aria-pressed="true"] { background: var(--encre); color: var(--jaune); }
.compteur { font-weight: 700; color: var(--gris); margin: 24px 0 8px; }
.grille-jeux { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.jeu { background: var(--blanc); border: 2px solid var(--encre); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 4px 0 var(--encre); }
.jeu__boite { height: 120px; border-bottom: 2px solid var(--encre); display: flex; align-items: flex-end; padding: 14px; position: relative; overflow: hidden; }
.jeu__boite h3 { margin: 0; font-size: 1.25rem; position: relative; z-index: 1; }
.jeu__boite::after { content: ""; position: absolute; right: -24px; top: -24px; width: 110px; height: 110px; border-radius: 50%; border: 2px solid rgba(31, 27, 22, .18); }
.jeu__corps { padding: 14px; display: grid; gap: 8px; font-size: .9rem; flex: 1; }
.jeu__corps .ligne { display: flex; flex-wrap: wrap; gap: 6px; }
.jeu__corps .ligne span { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; background: var(--creme); border: 1px solid var(--bord); border-radius: 8px; padding: 2px 8px; }
.jeu__corps svg { width: 14px; height: 14px; }
.jeu__dispo { margin-top: auto; font-weight: 800; font-size: .85rem; display: flex; align-items: center; gap: 6px; }
.jeu__dispo i { width: 10px; height: 10px; border-radius: 50%; background: var(--vert); display: inline-block; }
.jeu__dispo.pris i { background: var(--rouge); }
.vide { text-align: center; padding: 60px 0; color: var(--gris); font-weight: 700; }

/* ---------- Festival ---------- */
.heros-fdj { --rose: #f0b9ae; --orange: #f2622e; background: var(--rose); color: var(--encre); border-bottom: 2px solid var(--encre); position: relative; overflow: hidden; }
.heros-fdj .heros__in { grid-template-columns: 1.2fr .8fr; }
.heros-fdj .surtitre { color: var(--encre); opacity: .75; }
.heros-fdj h1 span { color: var(--orange); }
.heros-fdj .chapo { color: var(--encre); }
.affiche { border: 2px solid var(--encre); border-radius: var(--rayon); overflow: hidden; transform: rotate(2deg); box-shadow: -10px 10px 0 var(--encre); max-width: 340px; margin-inline: auto; }
.date-bloc { display: inline-flex; gap: 18px; align-items: center; background: #fbf3ea; color: var(--encre); border-radius: 18px; padding: 14px 20px; border: 2px solid var(--encre); box-shadow: 0 4px 0 var(--encre); margin: 8px 0 24px; flex-wrap: wrap; }
.heros-fdj .btn--jaune { background: var(--orange); color: var(--blanc); }
.date-bloc b { font-family: var(--titre); font-size: 1.4rem; display: block; line-height: 1.1; }
.date-bloc small { font-weight: 700; }
.programme { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 40px; }
.activite { background: var(--blanc); border: 2px solid var(--encre); border-radius: var(--rayon); padding: 26px; display: flex; flex-direction: column; box-shadow: 0 6px 0 var(--encre); }
.activite__ico { width: 56px; height: 56px; border-radius: 16px; border: 2px solid var(--encre); display: grid; place-items: center; margin-bottom: 16px; }
.activite__ico svg { width: 28px; height: 28px; }
.activite p { color: var(--encre-douce); font-size: .98rem; }
.activite .btn { margin-top: auto; align-self: flex-start; font-size: .95rem; padding: .6em 1.1em; }
.activite .age { font-weight: 800; font-size: .85rem; color: var(--gris); margin-bottom: 10px; }
.note-proto { background: #fff3c4; border: 2px dashed var(--encre); border-radius: 14px; padding: 12px 16px; font-size: .92rem; font-weight: 600; margin-top: 24px; }
.section--encre .note-proto { color: var(--encre); }

/* Téléphone : la page ne se décale pas sur le côté et ne zoome pas */
html, body { overflow-x: clip; }
html { touch-action: pan-y; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.deux-col > * { min-width: 0; }
.ludo-pile { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ludo-pile .boite { overflow-wrap: anywhere; hyphens: auto; }
