/* Casteria, le site : les couleurs, les polices et les matières du launcher et des écrans du serveur
   (parchemin, cadre en bois à coins dorés, ruban rouge, boutons pixel). Aucune texture du jeu de base. */

@font-face { font-family: "Fredoka"; src: url("../assets/polices/fredoka.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Lilita One"; src: url("../assets/polices/lilita_one.ttf") format("truetype"); font-display: swap; }

:root {
  --parchemin: #FFF8E7; --parchemin-2: #F7EDD3; --parchemin-3: #EAD9B2;
  --bois: #6B4423; --bois-clair: #8C5A2E; --bois-fonce: #3F2612; --nuit: #1B1028; --nuit-2: #2A1740;
  --or: #D7A421; --or-fonce: #A57713; --or-clair: #FFD75E;
  --ruban: #B5352B; --encre: #3A2614; --encre-douce: #7A5B3E;
  --violet: #8E4CB8; --violet-clair: #D29CFF; --vert: #3E8E2F; --vert-clair: #6CC04A; --bleu: #3F7FB6; --mer: #2E8FB8;
  --large: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: "Fredoka", system-ui, sans-serif; font-weight: 500; font-size: 18px; line-height: 1.55;
  color: var(--encre); background: var(--nuit); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
.pixel { image-rendering: pixelated; }
a { color: inherit; }
h1, h2, h3 { font-family: "Lilita One", "Fredoka", sans-serif; font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: .5px; }
.dedans { width: min(var(--large), 100% - 40px); margin: 0 auto; }
.or { color: var(--or-clair); }
.cache { position: absolute; left: -9999px; }

/* ---------- la barre du haut ---------- */
.barre {
  position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 18px; padding: 10px 22px;
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}
.barre.posee { background: rgba(27, 16, 40, .92); backdrop-filter: blur(8px); box-shadow: 0 3px 0 var(--or-fonce), 0 10px 30px rgba(0, 0, 0, .45); padding: 6px 22px; }
.barre .marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-family: "Lilita One", sans-serif; font-size: 24px; }
.barre .marque img { width: 46px; height: 46px; transition: transform .3s ease; }
.barre .marque:hover img { transform: rotate(-6deg) scale(1.08); }
/* l'accueil : le grand logo de l'en-tête est seul en haut de page ; le petit n'arrive dans la barre que quand le grand est sorti de l'écran */
.barre.accueil .marque img { width: 0; opacity: 0; margin-right: -10px; transition: width .35s ease, opacity .35s ease, margin .35s ease, transform .3s ease; }
.barre.accueil.avec-logo .marque img { width: 46px; opacity: 1; margin-right: 0; }
.barre nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.barre nav a { text-decoration: none; color: #F3E7FF; padding: 8px 12px; font-weight: 600; font-size: 16px; border-bottom: 3px solid transparent; transition: border-color .2s ease, color .2s ease; }
.barre nav a:hover, .barre nav a[aria-current="page"] { color: var(--or-clair); border-bottom-color: var(--or); }
.barre nav a.boutique { color: var(--violet-clair); display: inline-flex; align-items: center; gap: 6px; }
.barre nav a.boutique img { width: 20px; height: 20px; }
.barre nav a.bouton { color: var(--encre); margin-left: 8px; }
.barre nav a.bouton, .barre nav a.bouton:hover { color: var(--encre); border-bottom: 15px solid transparent; }
.barre nav a.bouton.petit, .barre nav a.bouton.petit:hover { border-bottom-width: 12px; }
.menu { display: none; margin-left: auto; background: none; border: 0; color: #fff; font-size: 30px; cursor: pointer; line-height: 1; }
.progres { position: fixed; inset: 0 auto auto 0; height: 4px; width: 0; z-index: 60; background: linear-gradient(90deg, var(--or-fonce), var(--or-clair), var(--violet-clair)); }

/* ---------- les boutons pixel (24 x 24, bord de 5) ---------- */
.bouton {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none;
  border: 15px solid transparent; border-image-slice: 5 fill; border-image-width: 15px; border-image-repeat: stretch;
  image-rendering: pixelated; font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 18px; color: var(--encre);
  cursor: pointer; padding: 2px 14px; transition: filter .15s ease, transform .12s ease; white-space: nowrap;
}
.bouton:hover { filter: brightness(1.1) saturate(1.08); transform: translateY(-2px); }
.bouton:active { transform: translateY(1px); filter: brightness(.95); }
.bouton-or { border-image-source: url("../assets/matieres/bouton_or.png"); }
.bouton-vert { border-image-source: url("../assets/matieres/bouton_vert.png"); color: #fff; text-shadow: 0 2px 0 #1F5A17; }
.bouton-bois { border-image-source: url("../assets/matieres/bouton_bois.png"); }
.bouton-rouge { border-image-source: url("../assets/matieres/bouton_rouge.png"); color: #fff; text-shadow: 0 2px 0 #6E1A14; }
.bouton.grand { font-size: 23px; border-width: 20px; border-image-width: 20px; padding: 6px 22px; }
.bouton.petit { font-size: 15px; border-width: 12px; border-image-width: 12px; padding: 0 8px; }
.bouton .fleche { font-size: 1.2em; line-height: 1; }
.bouton .picto { width: 1.25em; height: 1.25em; flex: 0 0 auto; }

/* ---------- l'en-tête : le héros ---------- */
.heros { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; color: #fff; padding: 84px 0 70px; isolation: isolate; }
.heros .fond { position: absolute; inset: -6%; z-index: -3; }
.heros .fond video, .heros .fond img { width: 100%; height: 100%; object-fit: cover; filter: blur(14px) saturate(1.25) brightness(.62); transform: scale(1.08); }
.heros::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(120% 80% at 70% 40%, rgba(142, 76, 184, .28), transparent 60%), linear-gradient(180deg, rgba(27, 16, 40, .55) 0%, rgba(27, 16, 40, .25) 40%, var(--nuit) 100%); }
.heros .grille { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; }
.heros .entete { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.heros .logo { flex: 0 0 auto; width: min(132px, 34vw); filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .55)); animation: flotte 5.5s ease-in-out infinite; }
@keyframes flotte { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-14px) rotate(1.2deg); } }
.heros h1 { font-size: clamp(32px, 3.8vw, 54px); text-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 12px 30px rgba(0, 0, 0, .5); }
.heros h1 span { display: block; }
.heros .accroche { font-size: clamp(18px, 1.7vw, 23px); max-width: 34em; margin: 14px 0 22px; color: #F6ECFF; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.heros .gestes { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.heros .gestes .grand { font-size: 21px; padding: 4px 14px; }
.heros .autres { margin: 12px 0 0; font-size: 15px; color: #E7D8F7; max-width: 40em; }
.heros .autres a { color: var(--or-clair); font-weight: 600; }
.devise { margin: 0; font-family: "Lilita One", sans-serif; font-size: 17px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--or-clair); text-shadow: 0 2px 0 rgba(0, 0, 0, .45); line-height: 1.5; }
.devise i, .rayons i { font-style: normal; font-size: .62em; margin: 0 .5em; vertical-align: .22em; color: var(--violet-clair); }

/* les trois téléphones du héros */
.eventail { position: relative; height: min(640px, 74vh); perspective: 1400px; }
.telephone {
  position: relative; aspect-ratio: 9 / 16; border-radius: 26px; overflow: hidden; background: #0d0814;
  border: 6px solid #241433; box-shadow: 0 0 0 3px var(--or-fonce), 0 0 0 5px #120a1c, 0 26px 50px rgba(0, 0, 0, .6);
}
.telephone video, .telephone img { width: 100%; height: 100%; object-fit: cover; }
.telephone .etiquette { position: absolute; inset: auto 0 0 0; padding: 34px 14px 12px; font-size: 15px; font-weight: 600; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .78)); pointer-events: none; }
.eventail .telephone { position: absolute; top: 50%; left: 50%; width: min(250px, 30vw); will-change: transform; transition: transform .25s ease-out; }
.eventail .t1 { transform: translate(-118%, -50%) rotate(-9deg) scale(.86); z-index: 1; filter: brightness(.82); }
.eventail .t2 { transform: translate(-50%, -52%) rotate(0deg); z-index: 3; }
.eventail .t3 { transform: translate(18%, -50%) rotate(9deg) scale(.86); z-index: 2; filter: brightness(.82); }
.descends { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); color: #fff; text-decoration: none; font-size: 14px; opacity: .85; text-align: center; animation: saute 1.8s ease-in-out infinite; }
.descends b { display: block; font-size: 26px; line-height: .8; }
@keyframes saute { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* les braises qui montent dans le héros */
.braises { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.braises i { position: absolute; bottom: -20px; width: 6px; height: 6px; background: var(--or-clair); opacity: 0; box-shadow: 0 0 10px var(--or-clair); animation: monte linear infinite; }
.braises i:nth-child(3n) { background: var(--violet-clair); box-shadow: 0 0 10px var(--violet-clair); }
@keyframes monte { 0% { transform: translateY(0) rotate(0); opacity: 0; } 12% { opacity: .9; } 100% { transform: translateY(-105vh) rotate(180deg); opacity: 0; } }

/* ---------- les chiffres ---------- */
.chiffres { background: linear-gradient(180deg, var(--bois-fonce), #2b190b); border-top: 4px solid var(--or-fonce); border-bottom: 4px solid var(--or-fonce); color: #fff; }
.chiffres ul { list-style: none; margin: 0 auto; padding: 22px 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; text-align: center; }
.chiffres b { display: block; font-family: "Lilita One", sans-serif; font-size: clamp(34px, 4.4vw, 56px); color: var(--or-clair); line-height: 1; text-shadow: 0 3px 0 rgba(0, 0, 0, .4); }
.chiffres span { font-size: 15px; color: #F1DEC0; }

/* ---------- les sections ---------- */
section { position: relative; padding: 92px 0; }
.clair { background: var(--parchemin) url("../assets/matieres/parchemin.png") 0 0 / 96px 96px repeat; image-rendering: pixelated; }
.clair > * { image-rendering: auto; }
.sombre { background: linear-gradient(180deg, var(--nuit) 0%, var(--nuit-2) 100%); color: #F4EAFF; }
.mer { background: linear-gradient(180deg, #123A52 0%, #0E2C40 100%); color: #EAF8FF; }
.tete { text-align: center; max-width: 820px; margin: 0 auto 50px; }
.tete h2 { font-size: clamp(30px, 4vw, 50px); }
.tete p { font-size: 20px; margin: 14px 0 0; opacity: .92; }
.ruban {
  display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 30px 5px; margin-bottom: 18px;
  border: solid transparent; border-width: 0 34px; border-image: url("../assets/matieres/ruban.png") 0 14 fill / 0 34px stretch;
  image-rendering: pixelated; font-family: "Lilita One", sans-serif; font-size: 20px; letter-spacing: 1px; color: #FFF4D6; text-shadow: 0 2px 0 #6E1A14;
}

/* les cartes de parchemin */
.cartes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.carte {
  border: 12px solid transparent; border-image: url("../assets/matieres/carte.png") 6 fill / 12px round; image-rendering: pixelated;
  background: var(--parchemin-2) url("../assets/matieres/parchemin.png") 0 0 / 96px 96px repeat;
  padding: 18px 20px 22px; color: var(--encre); transition: transform .25s ease, filter .25s ease;
}
.carte > * { image-rendering: auto; }
.carte:hover { transform: translateY(-6px); filter: drop-shadow(0 14px 16px rgba(58, 38, 20, .28)); }
.carte h3 { font-size: 27px; margin: 10px 0 8px; color: var(--bois-fonce); }
.carte p { margin: 0; color: #4b3520; }
.carte .icone { width: 64px; height: 64px; image-rendering: pixelated; filter: drop-shadow(0 4px 0 rgba(58, 38, 20, .25)); }
.carte .signe { font-size: 46px; line-height: 64px; height: 64px; }
code { font-family: "Fredoka", sans-serif; font-weight: 700; color: var(--ruban); white-space: nowrap; }

/* les rangs « inédit » : un téléphone et son texte, en alternance */
.rang { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 56px; align-items: center; margin: 0 auto 84px; max-width: 980px; }
.rang:last-child { margin-bottom: 0; }
.rang.inverse { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); }
.rang.inverse .telephone { order: 2; }
.rang .telephone { width: 100%; transform: rotate(-2.5deg); transition: transform .5s ease; }
.rang.inverse .telephone { transform: rotate(2.5deg); }
.rang .telephone:hover { transform: rotate(0) scale(1.03); }
.rang h3 { font-size: clamp(27px, 3.2vw, 40px); color: var(--or-clair); margin-bottom: 12px; }
.rang p { margin: 0 0 12px; font-size: 19px; }
.rang ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.rang li { padding-left: 30px; position: relative; }
.rang li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 12px; height: 12px; background: var(--or-clair); transform: rotate(45deg); box-shadow: 0 0 0 3px rgba(255, 215, 94, .22); }
.num { font-family: "Lilita One", sans-serif; font-size: 16px; letter-spacing: 2px; color: var(--violet-clair); text-transform: uppercase; display: block; margin-bottom: 6px; }
.mer .num { color: #8FE3FF; }

/* la rangée de vidéos, de gauche à droite */
.defile { position: relative; }
.piste { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px max(20px, calc((100vw - var(--large)) / 2)) 30px; scrollbar-width: thin; scrollbar-color: var(--or-fonce) transparent; }
.piste .telephone { flex: 0 0 min(270px, 68vw); scroll-snap-align: center; cursor: pointer; transition: transform .3s ease, box-shadow .3s ease; }
.piste .telephone:hover { transform: translateY(-8px); }
.piste .telephone .jouer { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(13, 8, 20, .28); transition: opacity .25s ease; }
.piste .telephone .jouer::after { content: ""; width: 0; height: 0; border-left: 30px solid #fff; border-top: 19px solid transparent; border-bottom: 19px solid transparent; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .6)); margin-left: 8px; }
.piste .telephone.joue .jouer { opacity: 0; }
.defile .va { position: absolute; top: 50%; z-index: 4; transform: translateY(-50%); width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--or-fonce); background: var(--bois-fonce); color: var(--or-clair); font-size: 26px; cursor: pointer; box-shadow: 0 8px 18px rgba(0, 0, 0, .5); }
.defile .va:hover { background: var(--bois); }
.defile .va.g { left: 14px; } .defile .va.d { right: 14px; }

/* les étapes */
.etapes { counter-reset: e; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; }
.etapes.longue { grid-template-columns: repeat(2, 1fr); }
.etapes.trois { grid-template-columns: repeat(3, 1fr); text-align: left; }
.etapes li { counter-increment: e; position: relative; }
.etapes .carte { height: 100%; padding-top: 30px; }
.etapes li::before { content: counter(e); position: absolute; left: 18px; top: -18px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; font-family: "Lilita One", sans-serif; font-size: 24px; color: #FFF4D6; background: var(--ruban); border: 3px solid var(--or); border-radius: 50%; box-shadow: 0 4px 0 #6E1A14; }
.etapes h3 { font-size: 22px; }
.gain { display: inline-block; margin-top: 10px; font-weight: 700; color: var(--vert); }

/* le cadre en bois (la boutique, le téléchargement) */
.cadre-bois { border: 24px solid transparent; border-image: url("../assets/matieres/cadre.png") 8 fill / 24px / 0 round; image-rendering: pixelated; }
.cadre-bois > * { image-rendering: auto; background: var(--parchemin-2) url("../assets/matieres/parchemin.png") 0 0 / 96px 96px repeat; }
.vitrine { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px; align-items: center; padding: 22px 26px; color: var(--encre); }
.vitrine h2 { font-size: clamp(28px, 3.4vw, 42px); color: var(--bois-fonce); }
.vitrine .credit { width: 120px; height: 120px; image-rendering: pixelated; animation: flotte 4.5s ease-in-out infinite; filter: drop-shadow(0 8px 0 rgba(58, 38, 20, .22)); }
.rayons { margin: 16px 0 22px; font-weight: 700; color: var(--bois-fonce); line-height: 1.7; }
.rayons i { color: var(--or-fonce); }
/* l'aide dépliable, un volet par système (fermés d'office) */
.aide { max-width: 900px; margin: 46px auto 26px; text-align: left; }
.aide > h3 { font-size: clamp(24px, 2.8vw, 32px); color: var(--bois-fonce); text-align: center; }
.aide > .note { text-align: center; margin: 6px 0 20px; }
.volet { border: 12px solid transparent; border-image: url("../assets/matieres/carte.png") 6 fill / 12px round; image-rendering: pixelated; margin-bottom: 12px; background: var(--parchemin-2) url("../assets/matieres/parchemin.png") 0 0 / 96px 96px repeat; color: var(--encre); }
.volet > * { image-rendering: auto; }
.volet summary { display: flex; align-items: center; gap: 12px; padding: 8px 12px; cursor: pointer; list-style: none; font-family: "Lilita One", sans-serif; font-size: 23px; color: var(--bois-fonce); }
.volet summary::-webkit-details-marker { display: none; }
.volet summary .picto { width: 28px; height: 28px; flex: 0 0 auto; color: var(--ruban); }
.volet summary::after { content: ""; margin-left: auto; width: 12px; height: 12px; border-right: 4px solid var(--bois); border-bottom: 4px solid var(--bois); transform: rotate(45deg); transition: transform .25s ease; }
.volet[open] summary::after { transform: rotate(-135deg); }
.volet summary:hover { color: var(--ruban); }
.reponses { padding: 4px 14px 14px; border-top: 2px dashed var(--bois-clair); margin-top: 4px; }
.reponses h4 { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 18px; margin: 18px 0 4px; color: var(--bois-fonce); }
.reponses p, .reponses ol, .reponses ul { margin: 4px 0; }
.reponses ol, .reponses ul { padding-left: 24px; }
.reponses a { color: var(--ruban); font-weight: 700; }
.reponses pre { margin: 6px 0; padding: 8px 12px; background: var(--bois-fonce); color: var(--or-clair); font-family: Consolas, "Courier New", monospace; font-size: 15px; overflow-x: auto; }

.tebex.ouverte { min-height: 0; }
.tebex-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; margin: 22px 0 0; }
.tebex-cadre { background: var(--parchemin); padding: 0 14px 14px; }
.tebex-cadre iframe { display: block; width: 100%; border: 0; background: #fff; }
.tebex { min-height: 360px; display: grid; place-items: center; text-align: center; padding: 40px 30px; }

.telecharge { text-align: center; }
.launcher { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; text-align: left; margin: 0 0 56px; }
.launcher .cadre-bois { border-width: 18px; border-image-width: 18px; }
.launcher img { width: 100%; height: auto; }
.launcher h3 { font-size: clamp(26px, 3vw, 36px); color: var(--bois-fonce); margin-bottom: 14px; }
.atouts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.atouts li { padding-left: 34px; position: relative; }
.atouts li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 14px; height: 14px; background: var(--vert); transform: rotate(45deg); box-shadow: 0 0 0 3px rgba(62, 142, 47, .2); }
.atouts b { display: block; color: var(--bois-fonce); }
.plateformes { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 26px 0 10px; }
.note { font-size: 15px; opacity: .85; }
.sombre .note a, .mer .note a { color: var(--or-clair); }

/* le pied */
footer { background: #120a1c; color: #CBB8DE; padding: 44px 0 30px; font-size: 15px; border-top: 4px solid var(--or-fonce); }
footer .col { display: flex; flex-wrap: wrap; gap: 30px; align-items: center; justify-content: space-between; }
footer a { color: var(--or-clair); text-decoration: none; margin-right: 16px; font-weight: 600; }
footer a:hover { text-decoration: underline; }
footer img { width: 70px; }
footer small { display: block; margin-top: 20px; opacity: .7; }

/* les pages intérieures */
.page-tete { padding: 150px 0 70px; text-align: center; color: #fff; background: radial-gradient(90% 120% at 50% 0%, rgba(142, 76, 184, .5), transparent 70%), var(--nuit); }
.page-tete h1 { font-size: clamp(36px, 5vw, 62px); text-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.page-tete p { font-size: 21px; max-width: 760px; margin: 16px auto 0; color: #EADBF8; }
.astuces { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

/* pour une photo de la page entière (index.html?photo) : tout est visible, le héros a une hauteur fixe */
html.photo .heros { min-height: 880px; } html.photo .apparait { opacity: 1; transform: none; transition: none; } html.photo .barre { position: absolute; }

/* l'apparition au défilement */
/* Les photos larges du jeu : un tableau (la photo dans le cadre de bois, sa légende dessous), une galerie (une grande, deux petites) */
.galerie { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 56px; }
.tableau { margin: 0; border: 16px solid transparent; border-image: url("../assets/matieres/cadre.png") 8 fill / 16px / 0 round; image-rendering: pixelated; background: var(--parchemin-2); box-shadow: 0 14px 30px rgba(27, 16, 40, .28); }
.tableau.grand { grid-column: 1 / -1; }
.galerie.seule { grid-template-columns: 1fr; max-width: 980px; margin: 0 auto 70px; }
.sombre .galerie, .mer .galerie { margin-top: 70px; }
.mer .galerie.seule { margin-top: 0; }
.tableau img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: auto; }
.tableau figcaption { image-rendering: auto; background: var(--parchemin-2) url("../assets/matieres/parchemin.png") 0 0 / 96px 96px repeat; color: var(--encre); font-weight: 600; font-size: 17px; text-align: center; padding: 12px 16px 10px; }
.tableau.grand figcaption { font-size: 19px; }
.apparait { opacity: 0; transform: translateY(34px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--retard, 0s); }
.apparait.de-gauche { transform: translateX(-50px); } .apparait.de-droite { transform: translateX(50px); } .apparait.grandit { transform: scale(.88); }
/* sur un écran étroit, ce qui glisse de côté dépasserait de l'écran et élargirait toute la page : ça monte, comme le reste */
@media (max-width: 960px) { .apparait.de-gauche, .apparait.de-droite { transform: translateY(34px); } }
.apparait.vu { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .heros .grille { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .heros .entete { flex-direction: column; } .heros .gestes { justify-content: center; } .heros .accroche { margin-left: auto; margin-right: auto; }
  .eventail { height: 430px; } .eventail .telephone { width: min(200px, 40vw); }
  .cartes, .etapes, .astuces { grid-template-columns: 1fr 1fr; }
  .rang, .rang.inverse { grid-template-columns: 1fr; gap: 26px; text-align: left; } .rang .telephone, .rang.inverse .telephone { order: 0; max-width: 270px; margin: 0 auto; }
  .vitrine, .launcher { grid-template-columns: minmax(0, 1fr); }
  .chiffres ul { grid-template-columns: repeat(3, 1fr); row-gap: 20px; }
  .menu { display: block; }
  .barre nav { position: fixed; inset: 58px 0 auto 0; flex-direction: column; align-items: stretch; background: rgba(27, 16, 40, .97); padding: 10px 18px 18px; display: none; margin: 0; border-bottom: 3px solid var(--or-fonce); }
  .barre nav.ouvert { display: flex; } .barre nav a { padding: 12px; font-size: 18px; }
}
@media (max-width: 620px) {
  .galerie { grid-template-columns: 1fr; gap: 22px; margin-top: 40px; }
  body { font-size: 17px; } section { padding: 64px 0; }
  .cartes, .etapes, .etapes.longue, .etapes.trois, .astuces { grid-template-columns: 1fr; }
  .chiffres ul { grid-template-columns: repeat(2, 1fr); }
  .defile .va { display: none; }
  /* un bouton au texte long passe à la ligne plutôt que de dépasser de l'écran */
  .bouton { white-space: normal; text-align: center; }
  .bouton.grand { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .apparait, .apparait.de-gauche, .apparait.de-droite, .apparait.grandit { opacity: 1; transform: none; transition: none; }
  .heros .logo, .vitrine .credit, .descends, .braises i { animation: none; }
}
