/* Gobly, site vitrine. Le style de l'app (décision 29, « l'écran est la scène ») : la scène 3D de la
   campagne en grand, une interface minimale posée dessus, texte crème, titres en Almendra, texte en
   Alegreya, un seul bouton d'or. Ni cadre lumineux, ni capitales espacées. */

/* Polices libres (SIL OFL, voir fonts/OFL-*.txt), servies par le site. */
@font-face { font-family: 'Almendra'; src: url(/fonts/almendra-gras.woff2) format('woff2'); font-weight: 700; font-display: swap; }
/* Le logo, à la police de la marque (copiée au build si elle est là, sinon Almendra). */
@font-face { font-family: 'Armodis'; src: url(/fonts/armodis.otf) format('opentype'); font-display: swap; }
@font-face { font-family: 'Alegreya'; src: url(/fonts/alegreya.woff2) format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alegreya'; src: url(/fonts/alegreya-italique.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

/* Les jetons de l'app (apps/mobile/src/ui/theme.ts). */
:root {
  color-scheme: dark;
  --nuit: #100e1f;
  --encre: #05040b;
  --creme: #f3ead6;
  --discret: #a9a3b0;
  --filet: rgba(243, 234, 214, .12);
  --action: #e9cf7c;
  --or: #f2b53c;
  --or-tranche: #b9770e;
  --sur-or: #1d1405;
  --panneau: rgba(242, 236, 224, .05);
  /* Les nuits des campagnes (JEWELS) : le ciel derrière chaque scène. */
  --rubis: #b3261e; --rubis-nuit: #1d0a12;
  --jade: #1f7a4a; --jade-nuit: #0a1c17;
  --saphir: #2748b0; --saphir-nuit: #0b1130;
  --marge: 16px;
  --titre: 'Almendra', Georgia, serif;
  --texte: 'Alegreya', Georgia, serif;
  --ombre-titre: 0 2px 0 var(--encre), 0 0 18px rgba(5, 4, 11, .6);
}
@media (min-width: 700px) { :root { --marge: 40px; } }

* { box-sizing: border-box; }
html { background: var(--nuit); overflow-x: clip; }
body {
  margin: 0; color: var(--creme); overflow-x: clip;
  font: 18px/1.5 var(--texte); font-variant-numeric: lining-nums;
  -webkit-text-size-adjust: 100%;
  /* Le ciel étoilé de l'app, en quelques points. */
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(243, 234, 214, .5), transparent),
    radial-gradient(1px 1px at 68% 9%, rgba(243, 234, 214, .4), transparent),
    radial-gradient(1.5px 1.5px at 84% 34%, rgba(243, 234, 214, .35), transparent),
    radial-gradient(1px 1px at 33% 52%, rgba(243, 234, 214, .3), transparent),
    radial-gradient(1px 1px at 52% 76%, rgba(243, 234, 214, .35), transparent),
    radial-gradient(1.5px 1.5px at 6% 88%, rgba(243, 234, 214, .3), transparent),
    var(--nuit);
  background-size: 420px 520px, 420px 520px, 420px 520px, 420px 520px, 420px 520px, 420px 520px, auto;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--action); text-underline-offset: .18em; }
a:focus-visible, .bouton:focus-visible, summary:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; border-radius: 4px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--titre); font-weight: 700; text-wrap: balance; text-shadow: var(--ombre-titre); }
h2 { font-size: clamp(1.9rem, 7vw, 2.75rem); line-height: 1.1; }
h3 { font-size: 1.35rem; line-height: 1.2; }

.evitement { position: absolute; left: var(--marge); top: -100px; z-index: 20; background: var(--creme); color: var(--encre); padding: 10px 14px; }
.evitement:focus { top: 10px; }

/* Un sur-titre : le texte courant, en petit, jamais en capitales. */
.surtitre { color: var(--discret); font-size: .95rem; }
.logo { font: 400 1.75rem/1 'Armodis', var(--titre); color: var(--creme); text-decoration: none; text-shadow: var(--ombre-titre); }
.note { color: var(--discret); font-size: .95rem; }
mark.a-completer { background: rgba(242, 181, 60, .2); color: var(--action); padding: 0 .2em; border-radius: 3px; }

/* En-tête : le logo en haut à gauche, comme dans l'app. */
.tete { position: relative; z-index: 3; display: flex; align-items: center; padding: 20px var(--marge); }
.accueil .tete, .repli .tete { position: absolute; inset: 0 0 auto; }

/* Le bouton d'or, sur sa tranche (le seul de l'écran). */
.actions { display: grid; gap: 14px; justify-items: center; width: 100%; max-width: 420px; }
.bouton {
  display: flex; justify-content: center; align-items: center; width: 100%; min-height: 52px; padding: 12px 22px;
  border-radius: 12px; background: var(--or); color: var(--sur-or); text-decoration: none;
  font: 700 1.1rem/1.2 var(--titre); box-shadow: 0 4px 0 var(--or-tranche), 0 8px 18px rgba(5, 4, 11, .5);
  transition: transform .12s, box-shadow .12s;
}
a.bouton:hover { transform: translateY(-1px); }
a.bouton:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--or-tranche); }
.bouton[aria-disabled="true"] { opacity: .55; cursor: not-allowed; box-shadow: 0 4px 0 var(--or-tranche); }
/* Sur la page de repli, l'app est le bouton d'or ; le navigateur passe en second. */
.repli #web { background: none; color: var(--creme); box-shadow: inset 0 0 0 1.5px rgba(243, 234, 214, .35); }
.magasins { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; color: var(--discret); font-size: .92rem; }
.magasin { cursor: not-allowed; }
.magasin small { font-size: inherit; }
.magasin small::after { content: " "; }
.actions .note { text-align: center; }

/* Une scène : la boucle de l'app, fondue dans le ciel de sa campagne. */
.scene video, .scene img { width: 100%; height: 100%; object-fit: cover; }

/* Le héros : l'accueil de l'app, le diorama en haut, la promesse dessous. */
.heros {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; overflow: clip;
  padding-bottom: 56px;
  background: radial-gradient(ellipse 60% 48% at 50% 32%, #5e0a13 0%, #2c060c 55%, var(--nuit) 100%);
}
.heros .scene {
  width: 100%; height: 60svh; min-height: 340px;
  /* Sur téléphone, la scène tient toute la largeur : elle ne se fond qu'en haut et en bas. */
  -webkit-mask: linear-gradient(transparent, #000 14%, #000 70%, transparent);
  mask: linear-gradient(transparent, #000 14%, #000 70%, transparent);
}
.heros .dedans { position: relative; display: grid; justify-items: center; gap: 14px; width: 100%; padding: 0 var(--marge); margin-top: -24px; max-width: 760px; }
.heros h1 { font-size: clamp(2rem, 8.6vw, 3.2rem); line-height: 1.05; max-width: 22ch; }
.pitch { color: var(--creme); font-size: 1.08rem; max-width: 40ch; }
.heros .actions { margin-top: 8px; }
.heros.court .dedans { margin-top: -8px; }
.code { font: 700 1.7rem var(--texte); letter-spacing: .12em; color: var(--action); }

/* Les sections : un texte court, puis l'app en mouvement. */
.volet, .offre, .faq { position: relative; isolation: isolate; display: grid; gap: 28px; width: 100%; max-width: calc(1240px + 2 * var(--marge)); margin: 0 auto; padding: 72px var(--marge); }
/* Sur téléphone : le titre, puis l'app en mouvement, puis le texte. */
.volet { grid-template-areas: "tete" "media" "texte"; }
.volet.mj { grid-template-areas: "tete" "media" "texte" "duo"; }
.volet.objets, .volet.hors-ligne { grid-template-areas: "tete" "texte"; }
.tete-section { grid-area: tete; display: grid; gap: 10px; max-width: 620px; }
.texte { grid-area: texte; display: grid; gap: 16px; align-content: start; max-width: 620px; }
.volet > .media, .volet > .telephones, .volet > .vitrine { grid-area: media; align-self: center; }
.duo { grid-area: duo; }
.texte > p:not(.surtitre):not(.note) { color: var(--creme); }
.fort { font: 700 1.25rem var(--titre); color: var(--action); }

/* Un écran de l'app : coins ronds, cerné d'encre, posé sur la lueur de sa campagne. Pas de cadre lumineux. */
.media { position: relative; isolation: isolate; margin: 0; display: grid; gap: 10px; align-content: start; }
.media video { width: 100%; border-radius: 14px; box-shadow: 0 0 0 2px var(--encre), 0 24px 60px -18px #000; background: var(--encre); }
.media figcaption { color: var(--discret); font-size: .95rem; }
.media::before { content: ""; position: absolute; inset: -40% -25%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, var(--lueur, rgba(179, 38, 30, .35)), transparent); }
.lueur-rubis { --lueur: rgba(179, 38, 30, .42); }
.lueur-jade { --lueur: rgba(31, 122, 74, .38); }
.lueur-saphir { --lueur: rgba(39, 72, 176, .38); }
/* Un téléphone : l'écran entier, dans un boîtier d'encre. */
.media.tel { width: min(100%, 300px); justify-self: center; }
.media.tel video { aspect-ratio: 390 / 844; border-radius: 30px; box-shadow: 0 0 0 7px var(--encre), 0 0 0 8px rgba(243, 234, 214, .14), 0 30px 70px -20px #000; }
.media.tel figcaption { text-align: center; margin-top: 8px; }

/* En présentiel : trois places, en phrases. */
.places { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 14px; }
.places li { padding-left: 18px; border-left: 2px solid var(--filet); }
.places b { font-family: var(--titre); font-size: 1.1rem; color: var(--action); }

/* Le MJ en trois temps, comme les onglets de l'app. */
.temps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 16px; counter-reset: temps; }
.temps li { position: relative; padding-left: 48px; counter-increment: temps; }
.temps li::before {
  content: counter(temps); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--creme); color: var(--encre); font: 700 1rem var(--texte); box-shadow: 0 2px 0 var(--encre);
}
.temps b { display: block; font: 700 1.25rem/1.3 var(--titre); }
.duo { display: grid; gap: 28px; }

/* Six jeux */
.jeux { list-style: none; margin: 0; padding: 0; display: grid; }
.jeux li { padding: 10px 0; border-top: 1px solid var(--filet); color: var(--discret); }
.jeux li:last-child { border-bottom: 1px solid var(--filet); }
.jeux b { display: block; font: 700 1.2rem/1.25 var(--titre); color: var(--creme); }

.lignes { list-style: none; margin: 0; padding: 0; }
.lignes li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-top: 1px solid var(--filet); }
.lignes li:last-child { border-bottom: 1px solid var(--filet); }
.lignes b { font: 700 1.1rem var(--titre); flex: none; }
.lignes small { color: var(--discret); font-size: .95rem; text-align: right; }

.telephones, .vitrine { display: grid; gap: 40px; justify-items: center; }
.vitrine .media.large { justify-self: stretch; }

/* Les objets : pas de film, la lueur d'une lampe. */
.objets::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 60% 70% at 85% 40%, rgba(255, 138, 61, .13), transparent 70%); }

/* Hors ligne : deux colonnes de texte. */
.hors-ligne .colonnes { display: grid; gap: 14px; }

/* L'offre */
.offre, .faq { gap: 18px; }
.formules { display: grid; gap: 16px; margin-top: 8px; }
.formule { display: grid; gap: 10px; padding: 22px; border-radius: 16px; background: var(--panneau); box-shadow: 0 0 0 2px var(--encre); }
.formule.mise { background: rgba(242, 181, 60, .08); }
/* Les chiffres en Alegreya, comme dans l'app : le 1 d'Almendra se lit comme un I. */
.prix { font: 700 2.6rem/1 var(--texte); font-variant-numeric: lining-nums tabular-nums; color: var(--creme); text-shadow: var(--ombre-titre); }
.prix small { font: 400 1rem var(--texte); color: var(--discret); text-shadow: none; }

/* FAQ : des questions qui se déplient. */
.questions { display: grid; margin-top: 8px; }
.questions details { border-top: 1px solid var(--filet); }
.questions details:last-child { border-bottom: 1px solid var(--filet); }
.questions summary { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; cursor: pointer; list-style: none; font: 700 1.15rem/1.3 var(--titre); }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; flex: none; color: var(--action); font: 700 1.5rem/1 var(--titre); transition: transform .2s; }
.questions details[open] summary::after { transform: rotate(45deg); }
.questions details p { padding: 0 0 18px; max-width: 68ch; }

/* Fin : la scène de l'accueil revient, la promesse dessus. */
.fin { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 0 0 80px; overflow: clip; }
.fin .fond { width: 100%; height: 46svh; min-height: 280px; -webkit-mask: linear-gradient(transparent, #000 18%, #000 66%, transparent); mask: linear-gradient(transparent, #000 18%, #000 66%, transparent); }
.fin .fond img { width: 100%; height: 100%; object-fit: cover; }
.fin .dedans { display: grid; justify-items: center; gap: 14px; width: 100%; max-width: 760px; padding: 0 var(--marge); margin-top: -12px; }
.fin h2 { font-size: clamp(2.2rem, 9vw, 3.4rem); }

/* Pied de page */
.pied { display: grid; gap: 12px; padding: 32px var(--marge) 40px; border-top: 1px solid var(--filet); color: var(--discret); font-size: .95rem; }
.pied .logo { font-size: 1.4rem; }
.pied nav { display: flex; flex-wrap: wrap; gap: 0 22px; }
.pied nav a { color: var(--creme); text-decoration: none; padding: 10px 0; }
.pied nav a:hover { color: var(--action); }

/* Pages légales : un texte long, lisible, sur la nuit. */
.texte-long { max-width: 72ch; margin: 0 auto; padding: 8px var(--marge) 64px; overflow-wrap: anywhere; }
.texte-long h1 { font-size: clamp(2rem, 8vw, 2.9rem); line-height: 1.08; margin: 24px 0 20px; }
.texte-long h2 { font-size: 1.55rem; margin: 40px 0 12px; }
.texte-long h3 { font-size: 1.2rem; margin: 28px 0 8px; text-shadow: none; }
.texte-long p, .texte-long ul, .texte-long ol { margin: 0 0 14px; }
.texte-long li { margin-bottom: 6px; }
.texte-long table { display: block; overflow-x: auto; border-collapse: collapse; margin: 0 0 18px; font-size: .95rem; }
.texte-long th, .texte-long td { text-align: left; vertical-align: top; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--filet); min-width: 12ch; }
.texte-long th { color: var(--discret); font-weight: 700; }
.brouillon { color: var(--creme); padding: 12px 16px; border-radius: 12px; background: rgba(242, 181, 60, .1); box-shadow: 0 0 0 2px var(--encre); margin-top: 8px !important; }

.seul { display: grid; gap: 18px; padding: 28vh var(--marge) 80px; max-width: 640px; }
.seul h1 { font-size: clamp(2.2rem, 9vw, 3.2rem); }

/* Grand écran : le texte à côté de la scène, les côtés alternent. */
@media (min-width: 960px) {
  :root { --marge: 56px; }
  body { font-size: 19px; }
  .heros .scene, .fin .fond { -webkit-mask: radial-gradient(closest-side, #000 62%, transparent 100%); mask: radial-gradient(closest-side, #000 62%, transparent 100%); }
  .heros .scene { width: min(100%, 1280px, 100svh); height: auto; aspect-ratio: 16 / 10; min-height: 0; }
  .heros .dedans { margin-top: -56px; max-width: 900px; }
  .volet { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr; grid-template-areas: "tete media" "texte media"; column-gap: 64px; row-gap: 20px; padding-block: 96px; }
  .volet.inverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "media tete" "media texte"; }
  .volet > .tete-section { align-self: end; }
  .volet.mj { grid-template-areas: "tete media" "texte media" "duo duo"; }
  .volet.objets, .volet.hors-ligne { grid-template-areas: "tete" "texte"; grid-template-rows: auto; }
  .duo { grid-column: 1 / -1; grid-template-columns: 1fr auto; gap: 64px; align-items: center; }
  .duo .media.tel { width: 260px; }
  .joueurs .telephones, .figurines .vitrine { grid-template-columns: 1fr 1fr; align-items: start; }
  .joueurs .telephones .media.tel:last-child { margin-top: 64px; }
  .figurines .vitrine { grid-template-columns: 1fr auto; align-items: center; }
  .figurines .vitrine .media.tel { width: 230px; }
  .volet.objets, .volet.hors-ligne { grid-template-columns: 1fr; }
  .objets .texte { max-width: none; grid-template-columns: 1fr 1fr; column-gap: 64px; align-items: start; }
  .objets .texte > p:first-child { grid-row: span 2; }
  .heros h1 { max-width: none; }
  .heros h1 span { display: inline-block; }
  .pitch { max-width: 52ch; }
  .hors-ligne .texte { max-width: 960px; }
  .hors-ligne .colonnes { grid-template-columns: 1fr 1fr; gap: 48px; }
  .formules { grid-template-columns: 1fr 1fr; gap: 24px; max-width: 900px; }
  .fin .fond { height: 56svh; width: min(100%, 1100px); }
  .pied { grid-template-columns: auto 1fr; align-items: center; column-gap: 40px; }
  .pied nav { justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
