/* Capital Valley, site vitrine. Direction artistique : théâtre de papier.
   Papier crème texturé, formes découpées, ombres portées douces, couleurs naturelles. */

:root {
  --paper: #f6efdf;
  --paper-2: #fdf8ec;
  --paper-3: #ede3cc;
  --ink: #2b2a26;
  --ink-2: #5a564c;
  --moss: #4f7a4b;
  --moss-dark: #365a34;
  --moss-light: #d7e4cf;
  --ocre: #c98d3a;
  --ocre-dark: #8a5b16;
  --ocre-light: #f3e2c2;
  --sky: #9dc3d6;
  --sky-dark: #3f6f87;
  --sky-light: #dbe9f0;
  --clay: #b5533c;
  --sun: #e8b84a;
  --shadow: 0 1px 0 rgba(90, 70, 30, .18), 0 6px 18px rgba(90, 70, 30, .14);
  --shadow-lg: 0 2px 0 rgba(90, 70, 30, .2), 0 18px 40px rgba(90, 70, 30, .18);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-cut: 14px 18px 12px 16px / 16px 12px 18px 14px;
  --wrap: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .15 0 0 0 .07 0'/></filter><rect width='240' height='240' filter='url(%23p)'/></svg>");
}

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: var(--moss-dark); text-underline-offset: 3px; }
a:hover { color: var(--clay); }
:focus-visible { outline: 3px solid var(--sky-dark); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; height: auto; }
small { font-size: .85em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .35em; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 760px; }
.lead { font-size: 1.2rem; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.center { text-align: center; }
.eyebrow { font-family: var(--sans); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ocre-dark); font-weight: 700; margin-bottom: .6em; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6em 1em; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* Boutons : étiquettes de papier */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  text-decoration: none;
  padding: .85em 1.5em;
  border-radius: var(--radius-cut);
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: var(--shadow);
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.2;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--ink); }
.btn-primary { background: var(--moss-dark); color: #fff; }
.btn-primary:hover { color: #fff; background: var(--moss); }
.btn-secondary { background: var(--ocre-light); color: var(--ocre-dark); }
.btn-secondary:hover { color: var(--ocre-dark); }
.btn-sm { padding: .55em 1.1em; font-size: .95rem; }
.btn-lg { padding: 1em 1.9em; font-size: 1.1rem; }
.btn.is-soon { opacity: .75; cursor: default; box-shadow: none; border: 2px dashed rgba(90, 70, 30, .35); background: var(--paper-2); color: var(--ink-2); }
.btn.is-soon:hover { transform: none; }
.btn.is-soon small { font-weight: 400; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }

/* En-tête */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(246, 239, 223, .92); backdrop-filter: blur(6px); border-bottom: 1px solid rgba(90, 70, 30, .12); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 1px 3px rgba(90, 70, 30, .3); }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; }
.nav { display: flex; align-items: center; gap: 1.1rem; }
.nav a:not(.btn) { text-decoration: none; font-weight: 600; color: var(--ink); }
.nav a:not(.btn):hover { color: var(--clay); }
@media (max-width: 560px) {
  .brand-name { display: none; }
  .nav { gap: .8rem; font-size: .95rem; }
}

/* Sections */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-tight { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.section-alt { background: rgba(255, 252, 244, .55); border-top: 1px solid rgba(90, 70, 30, .08); border-bottom: 1px solid rgba(90, 70, 30, .08); }
.section-moss { background: var(--moss-dark); color: #fff; }
.section-moss h2, .section-moss h3, .section-moss p, .section-moss a { color: #fff; }
.section-moss .btn { box-shadow: 0 4px 14px rgba(0, 0, 0, .25); background: var(--paper-2); color: var(--moss-dark); }
.section-moss .btn:hover { background: #fff; color: var(--moss-dark); }
.section-head { max-width: 720px; margin-bottom: 2.2rem; }

/* Héros */
.hero { position: relative; overflow: hidden; padding: clamp(2.5rem, 6vw, 5rem) 0 0; }
.hero-in { display: grid; gap: 2rem; align-items: center; }
.hero-text { position: relative; z-index: 2; max-width: 620px; }
.hero-text h1 { margin-bottom: .4em; }
.hero-text .lead { margin-bottom: 1.2em; }
.badges { list-style: none; padding: 0; margin: 0 0 1.6rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.badges li { font-family: var(--sans); font-size: .85rem; font-weight: 700; color: var(--moss-dark); background: var(--moss-light); border-radius: 999px; padding: .35rem .85rem; }
.outcomes { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: .5rem; }
.outcomes li { position: relative; padding-left: 1.7rem; }
.outcomes li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1rem; height: 1rem; border-radius: 50%; background: var(--moss-dark); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23000'/%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' stroke='%23fff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23000'/%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' stroke='%23fff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.hero-art { position: relative; z-index: 1; }
.hero-art img { display: block; width: 100%; height: auto; border-radius: var(--radius-cut); box-shadow: var(--shadow-lg); }
/* Le visuel d'accueil est vertical (écran de lancement du jeu) : on le cadre en paysage sur mobile,
   en portrait doux sur grand écran, centré sur l'enseigne. */
.hero-art-splash img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 42%; }
.hero-art-logo img { aspect-ratio: 1; object-fit: cover; border-radius: 22%; }
.hero { padding-bottom: clamp(2rem, 5vw, 4rem); }
@media (min-width: 880px) {
  .hero-in { grid-template-columns: 1.05fr 1fr; }
  .hero-art-splash img { aspect-ratio: 5 / 4; max-height: 560px; object-position: 50% 38%; }
  .hero-art-logo img { max-width: 520px; margin-inline: auto; }
}

/* Cartes en papier découpé */
.cards { display: grid; gap: 1.4rem; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  background: var(--paper-2);
  border-radius: var(--radius-cut);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.5rem 1.3rem;
  position: relative;
}
.card h3 { margin-top: .2em; }
.card p:last-child { margin-bottom: 0; }
.card-icon { width: 64px; height: 64px; margin-bottom: .8rem; filter: drop-shadow(0 3px 3px rgba(90, 70, 30, .25)); }
.card-num { position: absolute; top: -14px; left: 16px; width: 36px; height: 36px; border-radius: 50%; background: var(--ocre); color: #fff; font-family: var(--serif); font-weight: 700; display: grid; place-items: center; box-shadow: var(--shadow); font-size: 1.1rem; }
.card.has-num { margin-top: 14px; }
.card-tilt-l { transform: rotate(-.6deg); }
.card-tilt-r { transform: rotate(.5deg); }
@media (prefers-reduced-motion: reduce) { .card-tilt-l, .card-tilt-r { transform: none; } }

/* Étapes numérotées (liste) */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 1rem; align-items: start; background: var(--paper-2); border-radius: var(--radius-cut); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; }
.steps li::before { counter-increment: step; content: counter(step); width: 40px; height: 40px; border-radius: 50%; background: var(--moss-dark); color: #fff; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; display: grid; place-items: center; }
.steps p { margin: 0; }
.steps strong { display: block; font-family: var(--serif); font-size: 1.15rem; margin-bottom: .2em; }

/* Voyage : 5 villes */
.journey { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.city { text-align: center; }
.city img { width: 100%; max-width: 240px; height: auto; border-radius: var(--radius-cut); box-shadow: var(--shadow); }
.city h3 { font-size: 1.1rem; margin: .6rem 0 .2rem; }
.city p { font-size: .95rem; color: var(--ink-2); margin: 0; }
.city .year { font-family: var(--sans); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ocre-dark); font-weight: 700; }

/* Thèmes (liste en ligne) */
.themes { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.themes li { display: grid; grid-template-columns: 2.2rem 1fr; gap: .6rem; align-items: baseline; padding: .7rem 1rem; background: var(--paper-2); border-radius: var(--radius-cut); box-shadow: var(--shadow); }
.themes .n { font-family: var(--serif); font-weight: 700; color: var(--ocre-dark); font-size: 1.2rem; }
.themes strong { font-family: var(--serif); }

/* Bandeaux */
.banner { display: grid; gap: 1rem; align-items: center; }
@media (min-width: 760px) { .banner { grid-template-columns: 1fr auto; } }
.banner h2 { margin-bottom: .3em; }
.banner p { margin: 0; }

/* Tableaux */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0 1.5rem; border-radius: var(--radius-cut); box-shadow: var(--shadow); background: var(--paper-2); }
table { width: 100%; border-collapse: collapse; font-size: .98rem; min-width: 560px; }
th, td { text-align: left; padding: .8rem .9rem; vertical-align: top; border-bottom: 1px solid rgba(90, 70, 30, .12); }
th { font-family: var(--serif); font-size: 1rem; background: var(--paper-3); }
tr:last-child td { border-bottom: 0; }
td strong { font-family: var(--serif); }
.grille-licences .fondateur { background: var(--ocre-light); }
.grille-licences th.fondateur { color: var(--ocre-dark); }
.grille-licences td.fondateur strong { font-size: 1.25rem; color: var(--ocre-dark); }
.grille-licences .fond-in { display: flex; align-items: center; gap: 1rem; justify-content: space-between; }
.grille-licences td { vertical-align: middle; white-space: nowrap; }
.grille-licences td:nth-child(2) { white-space: normal; }
.btn-small { padding: .5rem .9rem; font-size: .9rem; }

/* Accordéon (FAQ) */
.faq details { background: var(--paper-2); border-radius: var(--radius-cut); box-shadow: var(--shadow); margin-bottom: .8rem; }
.faq summary { cursor: pointer; padding: 1rem 1.2rem; font-family: var(--serif); font-weight: 700; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); font-size: 1.4rem; color: var(--ocre-dark); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 1.2rem 1.1rem; }
.faq details > div p:last-child { margin-bottom: 0; }

/* Formulaire */
.form-card { background: var(--paper-2); border-radius: var(--radius-cut); box-shadow: var(--shadow-lg); padding: clamp(1.4rem, 4vw, 2.4rem); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; }
.field input[type="email"], .field select {
  width: 100%; font: inherit; padding: .75em .9em; border: 2px solid rgba(90, 70, 30, .25); border-radius: 10px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { border-color: var(--moss); outline: none; box-shadow: 0 0 0 3px rgba(79, 122, 75, .25); }
.field-check { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; }
.field-check input { margin-top: .3em; width: 1.15em; height: 1.15em; flex: none; accent-color: var(--moss-dark); }
.form-grid { display: grid; gap: 0 1.2rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-msg { margin-top: 1rem; padding: .9rem 1rem; border-radius: 10px; display: none; }
.form-msg.is-ok { display: block; background: var(--moss-light); color: var(--moss-dark); }
.form-msg.is-err { display: block; background: var(--ocre-light); color: var(--ocre-dark); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Encadrés */
.note { background: var(--sky-light); border-left: 6px solid var(--sky-dark); border-radius: 0 var(--radius-cut); padding: 1.1rem 1.3rem; box-shadow: var(--shadow); }
.note p:last-child { margin-bottom: 0; }
.note-ocre { background: var(--ocre-light); border-left-color: var(--ocre); }

/* Emplacement pour les futures captures du jeu */
.screenshot-slot { aspect-ratio: 16 / 10; border: 2px dashed rgba(90, 70, 30, .3); border-radius: var(--radius-cut); display: grid; place-items: center; color: var(--ink-2); font-size: .9rem; text-align: center; padding: 1rem; background: rgba(255, 252, 244, .5); }

/* Prose (pages légales, à propos) */
.prose { max-width: 720px; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.5em; }

/* Pied de page */
.footer { background: var(--ink); color: #e9e2d0; padding: 2.5rem 0 2rem; margin-top: 2rem; }
.footer a { color: #f3ead6; }
.footer a:hover { color: var(--sun); }
.footer-in { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .footer-in { grid-template-columns: 1fr 1fr; } .footer-note { grid-column: 1 / -1; } }
.footer-brand strong { font-family: var(--serif); font-size: 1.3rem; }
.footer-brand p { margin: .3rem 0 0; color: #cfc6ad; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-content: start; }
.footer-note { font-size: .88rem; color: #b9b09a; margin: 0; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 1rem; }

/* Page fiche séquence : lisible à l'écran, propre à l'impression */
.sheet { background: #fff; border-radius: var(--radius-cut); box-shadow: var(--shadow-lg); padding: clamp(1.4rem, 4vw, 2.6rem); max-width: 820px; margin: 0 auto; }
.sheet h1 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
.sheet h2 { font-size: 1.35rem; margin-top: 1.6em; border-bottom: 2px solid var(--moss-light); padding-bottom: .2em; }
.sheet table { min-width: 0; font-size: .95rem; }
.sheet .meta { color: var(--ink-2); font-style: italic; }
.print-actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-bottom: 1.5rem; }
@media print {
  @page { margin: 14mm 16mm; }
  body { background: #fff; font-size: 10.5pt; line-height: 1.45; }
  .sheet h1 { font-size: 20pt; }
  .sheet h2 { font-size: 13pt; margin-top: 1.2em; }
  .sheet table { font-size: 10pt; }
  th, td { padding: .45em .7em; }
  p { margin-bottom: .6em; }
  li { margin-bottom: .2em; }
  .topbar, .footer, .print-actions, .skip { display: none !important; }
  .sheet { box-shadow: none; padding: 0; max-width: none; }
  a { color: inherit; text-decoration: none; }
  .section { padding: 0; }
  h2 { break-after: avoid; }
  table, .card { break-inside: avoid; }
}
