/* Defend Aurelis — site vitrine.
   Concept : le site reprend l'interface du jeu (boutons épais, cartes avec coût, barre marine) et alterne
   les matières de Bastion : illustration de la porte, pierre blanche des remparts, nuit, bleu royal, prairie.
   Une seule ambiance de jour, comme les sites des jeux mobiles concurrents (pas de thème sombre). */

@font-face { font-family: "Lilita One"; src: url("fonts/lilita-one-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-latin-wght.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --ink: #14204a;          /* contours et texte, comme les contours des cartes du jeu */
  --muted: #4b5781;
  --navy: #15265f;         /* barre du HUD en bataille */
  --navy-deep: #0e1a45;
  --royal: #2552c9;        /* toits et boucliers */
  --royal-light: #5d86ea;
  --gold: #f0b828;         /* or moutarde des héros */
  --gold-light: #ffd45c;
  --stone: #eef1f7;        /* pierre blanche des remparts */
  --stone-line: #d3d9e8;
  --grass: #74b93e;
  --grass-dark: #4c8f27;
  --scarlet: #c23a2e;
  --frost: #2e7f6a;
  --order: #5e3496;
  --white: #ffffff;

  --font-display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--stone); color: var(--ink); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--royal); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--ink); padding: 8px 12px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }

/* Titres façon logo de jeu : blanc avec contour épais */
.title-game {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.3rem);
  text-transform: uppercase;
  color: var(--white);
  letter-spacing: 0.01em;
  text-shadow:
    3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink),
    2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink),
    0 7px 0 var(--ink);
}
.title-ink { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); text-transform: uppercase; color: var(--ink); }

/* Boutons du jeu */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.02em; text-transform: uppercase; text-decoration: none;
  padding: 12px 22px 11px; border-radius: 14px; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink);
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--ink); }
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--ink); }
.btn-gold { background: linear-gradient(var(--gold-light), var(--gold)); color: var(--ink); }
.btn-blue { background: linear-gradient(var(--royal-light), var(--royal)); color: var(--white); text-shadow: 0 2px 0 var(--ink); }
.btn-small { font-size: 1rem; padding: 9px 16px 8px; }

/* ---------- Barre du haut ---------- */
.site-header { background: var(--navy-deep); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 10px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; gap: 6px 22px; flex-wrap: wrap; align-items: center; }
.nav a { font-family: var(--font-display); font-size: 1.02rem; letter-spacing: 0.03em; text-transform: uppercase; color: #c9d4f5; text-decoration: none; }
.nav a:hover { color: var(--white); }
.nav .lang { color: var(--ink); background: var(--gold); border: 2px solid var(--ink); border-radius: 8px; padding: 1px 9px; font-size: 0.9rem; }

/* ---------- Illustration principale ---------- */
.keyart {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(560px, 58vw, 780px);
  background: #6f9fd8 url("img/keyart-bg.webp") center 30% / cover no-repeat;
  display: flex; flex-direction: column; align-items: center;
}
.keyart::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(rgba(14, 26, 69, 0), rgba(14, 26, 69, 0.55)); z-index: -1; }
.keyart .logo { width: min(500px, 80vw); margin-top: clamp(18px, 3.5vw, 44px); filter: drop-shadow(0 12px 18px rgba(10, 18, 50, 0.45)); }
.keyart .logo-title { margin: 0; display: flex; justify-content: center; width: 100%; }
.lineup { position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); display: flex; align-items: flex-end; justify-content: center; width: min(1180px, 130vw); }
.lineup img { width: 23%; margin-inline: -3.2%; filter: drop-shadow(0 10px 14px rgba(10, 18, 50, 0.5)); }
.lineup .lead-hero { width: 31%; z-index: 2; }
.lineup .back { width: 20%; margin-bottom: 3%; }

.launch-bar { background: var(--navy); border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); }
.launch-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; padding-block: 18px; }
.app-id { display: flex; align-items: center; gap: 14px; color: var(--white); }
.app-id img { width: 64px; height: 64px; border-radius: 15px; border: 3px solid var(--ink); }
.app-id strong { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; display: block; line-height: 1.1; }
.app-id span { color: #b9c5ec; font-weight: 700; font-size: 0.95rem; }
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.store { display: inline-grid; line-height: 1.1; padding: 7px 16px; border-radius: 10px; background: #000; color: var(--white); border: 2px solid #59647f; min-width: 150px; }
.store small { font-size: 0.72rem; font-weight: 700; color: #c5cbdb; }
.store b { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; }

/* ---------- Le jeu (pierre des remparts) ---------- */
.stone {
  background-color: var(--stone);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cg fill='none' stroke='%23d3d9e8' stroke-width='2'%3E%3Cpath d='M0 1h120M0 31h120M1 1v30M61 1v30M31 31v30M91 31v30'/%3E%3C/g%3E%3C/svg%3E");
}
.pitch .wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 6vw, 80px); align-items: center; padding-block: clamp(56px, 8vw, 100px); }
.phone { border-radius: 36px; padding: 11px; background: var(--ink); box-shadow: 0 24px 50px rgba(20, 32, 74, 0.35); }
.phone img { border-radius: 26px; width: 100%; aspect-ratio: 480 / 854; object-fit: cover; }
.pitch .phone { width: min(100%, 330px); justify-self: center; transform: rotate(-3deg); }
.pitch-copy { display: grid; gap: 18px; min-width: 0; }
.pitch-copy p { font-size: 1.15rem; max-width: 52ch; color: var(--muted); }
.pitch-copy p strong { color: var(--ink); }
.hud-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.hud { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.04em; color: var(--white); background: var(--navy); border: 3px solid var(--ink); border-radius: 10px; padding: 5px 12px 4px; font-variant-numeric: tabular-nums; }
.hud i { font-style: normal; color: var(--gold); }

/* ---------- Chapitres (nuit) ---------- */
.night { background: var(--navy-deep) radial-gradient(ellipse at 50% 0%, #22357f 0%, rgba(14, 26, 69, 0) 60%); }
.chapters-sec .wrap { padding-block: clamp(56px, 8vw, 100px); display: grid; gap: clamp(28px, 4vw, 44px); justify-items: center; text-align: center; }
.chapters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 36px); width: 100%; }
.chapter { display: grid; gap: 14px; justify-items: center; min-width: 0; }
.chapter .phone { width: min(100%, 270px); }
.ribbon { font-family: var(--font-display); font-size: 1.25rem; color: var(--white); background: var(--faction); border: 3px solid var(--ink); border-radius: 10px; padding: 5px 16px 4px; box-shadow: 0 4px 0 var(--ink); text-shadow: 0 2px 0 var(--ink); }
.chapter small { display: block; color: #b9c5ec; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }
.chapter .quote { color: #e6ebff; font-style: italic; max-width: 30ch; }
.chapter .quote b { font-style: normal; color: var(--gold); display: block; font-size: 0.9rem; }
.ch1 { --faction: var(--scarlet); }
.ch2 { --faction: var(--frost); }
.ch3 { --faction: var(--order); }

/* ---------- Duel et Siège sans fin (pierre) ---------- */
.modes-sec .wrap { padding-block: clamp(56px, 8vw, 100px); display: grid; gap: clamp(24px, 4vw, 40px); justify-items: center; text-align: center; }
.modes-sec .sub { color: var(--muted); font-weight: 700; font-size: 1.1rem; max-width: 48ch; margin-top: -8px; }
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 72px); width: 100%; max-width: 920px; }
.mode { display: grid; gap: 14px; justify-items: center; align-content: start; min-width: 0; }
.mode .phone { width: min(100%, 270px); }
.mode small { display: block; color: var(--muted); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }
.mode p { color: var(--muted); max-width: 38ch; }
.mode p strong { color: var(--ink); }
.duel { --faction: var(--royal); }
.endless { --faction: var(--grass-dark); }
.leagues { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin: 2px 0 0; padding: 0; list-style: none; }
.leagues li { display: grid; justify-items: center; gap: 2px; font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.03em; color: var(--ink); }
.leagues img { width: 52px; height: 52px; filter: drop-shadow(0 3px 0 rgba(20, 32, 74, 0.2)); }

/* ---------- Cartes (bleu royal) ---------- */
.royal { background: var(--royal) radial-gradient(ellipse at 50% 0%, #4a75e0 0%, rgba(37, 82, 201, 0) 65%); }
.deck-sec .wrap { padding-block: clamp(56px, 8vw, 100px); display: grid; gap: 22px; justify-items: center; text-align: center; }
.deck-sec .sub { color: #e3e9ff; font-weight: 700; font-size: 1.1rem; max-width: 46ch; }
.cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; width: 100%; margin-top: 10px; text-align: left; }
.card { position: relative; display: grid; grid-template-rows: auto 1fr; background: linear-gradient(#6d93ee, #3a64d4); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink); overflow: hidden; min-width: 0; transition: transform 0.15s; }
.card:hover { transform: translateY(-6px) rotate(-1deg); }
.card.hero { background: linear-gradient(#ffd96a, #e8a91a); }
.card.tower { background: linear-gradient(#e9dcc2, #c9b48c); }
.card img { aspect-ratio: 1 / 1; object-fit: contain; width: 100%; }
.card .cost { position: absolute; top: 6px; left: 6px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); background: radial-gradient(circle at 35% 30%, #ffe48a, #e8a91a); border: 3px solid var(--ink); }
.card .plate { background: var(--ink); color: var(--white); padding: 7px 9px 8px; display: grid; align-content: start; }
.card .plate b { font-family: var(--font-display); font-weight: 400; font-size: 1rem; line-height: 1.1; }
.card .plate span { font-size: 0.78rem; color: #b9c5ec; font-weight: 700; }
.deck-note { color: #e3e9ff; font-size: 0.95rem; }

/* ---------- Communauté (prairie) ---------- */
.meadow {
  background-color: var(--grass);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='%2389c94f'%3E%3Cpath d='M10 20q3-9 6 0zM50 12q3-9 6 0zM30 52q3-9 6 0zM66 60q3-9 6 0z'/%3E%3C/g%3E%3C/svg%3E");
}
.join-sec .wrap { padding-block: clamp(56px, 8vw, 96px) clamp(64px, 9vw, 110px); display: grid; gap: 20px; justify-items: center; text-align: center; }
.join-sec p { color: var(--ink); font-weight: 800; font-size: 1.15rem; max-width: 46ch; }
.join-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 6px; }

/* ---------- Pied de page : la muraille et la porte de Bastion ---------- */
.footer-wall { position: relative; height: 150px; margin-top: 30px; }
main > section:last-child { margin-bottom: -30px; padding-bottom: 30px; }
.footer-wall::before { content: ""; position: absolute; inset: 0; background-color: #f7f8fc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cg fill='none' stroke='%23d3d9e8' stroke-width='2'%3E%3Cpath d='M0 1h120M0 31h120M1 1v30M61 1v30M31 31v30M91 31v30'/%3E%3C/g%3E%3C/svg%3E");
  border-top: 4px solid var(--ink); }
.footer-wall::after { content: ""; position: absolute; left: 0; right: 0; top: -30px; height: 30px; background: #f7f8fc;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 46px, transparent 46px 74px); mask: repeating-linear-gradient(90deg, #000 0 46px, transparent 46px 74px);
  box-shadow: inset 0 4px 0 var(--ink); }
.gate { position: absolute; z-index: 1; left: 50%; bottom: 0; transform: translateX(-50%); width: 104px; height: 118px; border: 4px solid var(--ink); border-bottom: 0; border-radius: 52px 52px 0 0;
  background: #8a5a2b repeating-linear-gradient(90deg, transparent 0 22px, rgba(0, 0, 0, 0.22) 22px 26px); }
.footer-body { background: var(--navy-deep); color: #b9c5ec; border-top: 4px solid var(--ink); }
.footer-body .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding-block: 26px 34px; font-size: 0.92rem; }
.footer-body nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-body a { color: var(--white); text-decoration: none; font-weight: 800; }
.footer-body a:hover { text-decoration: underline; }

/* ---------- Pages de texte ---------- */
.page-head { background: var(--navy) radial-gradient(ellipse at 50% 0%, #2a4296 0%, rgba(21, 38, 95, 0) 70%); border-bottom: 4px solid var(--ink); }
.page-head .wrap { padding-block: clamp(30px, 5vw, 54px); display: grid; gap: 6px; }
.page-head p { color: var(--gold); font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; }
.prose { max-width: 72ch; display: grid; gap: 16px; padding-block: clamp(36px, 5vw, 64px); }
.prose h2 { font-size: 1.6rem; text-transform: uppercase; margin-top: 14px; }
.prose .lead { font-size: 1.15rem; color: var(--muted); }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.note { background: var(--white); border: 3px solid var(--ink); border-radius: 12px; padding: 14px 16px; box-shadow: 0 4px 0 var(--ink); }
.todo { background: #ffe58a; border-radius: 4px; padding: 0 4px; font-weight: 800; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--white); border: 3px solid var(--ink); border-radius: 12px; padding: 12px 16px; }
.faq summary { cursor: pointer; font-weight: 800; }
.faq details p { margin-top: 8px; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; }
.kv dt { font-weight: 800; }
.kv dd { margin: 0; color: var(--muted); }
.press-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.press-grid a { display: grid; gap: 6px; text-decoration: none; color: var(--muted); font-size: 0.85rem; font-weight: 800; }
.press-grid img { background: var(--white); border: 3px solid var(--ink); border-radius: 12px; aspect-ratio: 1 / 1; object-fit: contain; width: 100%; }
.press-grid .tall img { aspect-ratio: 480 / 854; object-fit: cover; }
.press-grid .wide img { aspect-ratio: 5 / 2; object-fit: contain; background: var(--royal); }

/* ---------- Écrans moyens et petits ---------- */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .launch-bar .wrap { justify-content: center; text-align: left; }
}
@media (max-width: 760px) {
  .keyart { min-height: 600px; background-position: 50% 20%; background-image: url("img/keyart-bg-960.webp"); }
  .lineup { width: 175vw; }
  .lineup .back { display: none; }
  .lineup img { width: 30%; }
  .lineup .lead-hero { width: 40%; }
  .pitch .wrap { grid-template-columns: minmax(0, 1fr); }
  .pitch .phone { width: min(78%, 300px); order: 2; }
  .chapters { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .modes { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .site-header .wrap { justify-content: center; }
  .nav { justify-content: center; gap: 4px 16px; }
  .nav a { font-size: 0.92rem; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dd { margin-bottom: 8px; }
}
@media (max-width: 460px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stores { justify-content: center; }
  .store { min-width: 0; flex: 1 1 140px; }
}
.press-grid .wide { grid-column: span 2; }
