/* ============================================================
   FORT ET CHÂTEAU — Design system
   Structure du site Acoustic Detector, identité de l'app :
   pierre sombre #14100D / or #D4AF37 / parchemin #F5F2E8
   Cinzel (titres) — Lora (texte)
   Pour changer de palette, il suffit de modifier les variables ci-dessous.
   ============================================================ */
:root {
  --bg: #14100D;
  --bg-700: #1B1510;
  --bg-600: #251D15;
  --bg-500: #342818;
  --gold: #D4AF37;
  --gold-b: #E8CD78;
  --gold-dark: #8A6D1C;
  --on-gold: #14100D;
  --parch: #F5F2E8;
  --ink-muted: rgba(245, 242, 232, 0.78);
  --ink-faint: rgba(245, 242, 232, 0.52);
  --line: rgba(212, 175, 55, 0.24);
  --gold-soft: rgba(212, 175, 55, 0.10);
  --font-display: "Cinzel", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Lora", Georgia, "Times New Roman", serif;
  --container: 1180px;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html { overflow-x: clip; }
body { overflow-x: clip; margin: 0; background: var(--bg); color: var(--parch); font-family: var(--font-body); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: .01em; line-height: 1.14; margin: 0 0 .5em; color: var(--parch); }
h1 { font-size: clamp(2.2rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }
h4 { font-size: 1.02rem; margin-bottom: .25em; }
p { margin: 0 0 1em; color: var(--ink-muted); }
strong { color: var(--parch); font-weight: 600; }
.gold { color: var(--gold-b); }
section { padding: 84px 0; }
.section--tight { padding: 40px 0; }
.section--alt { background: var(--bg-700); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.eyebrow { font-family: var(--font-display); font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); display: inline-flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--gold); }
.lead { font-size: 1.15rem; color: var(--ink-muted); max-width: 680px; }

/* ---------- Ornement ---------- */
.ornament { display: flex; align-items: center; gap: 16px; padding: 0 24px; max-width: var(--container); margin: 0 auto; color: var(--gold); }
.ornament::before, .ornament::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-dark), transparent); }
.ornament i { width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); display: block; box-shadow: 0 0 12px rgba(212,175,55,.6); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--font-display); font-size: .86rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 15px 28px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: linear-gradient(180deg, var(--gold-b), var(--gold)); color: var(--on-gold); box-shadow: 0 6px 22px rgba(212,175,55,.25); }
.btn--primary:hover { box-shadow: 0 8px 28px rgba(212,175,55,.42); }
.btn--outline { border-color: var(--gold); color: var(--parch); background: transparent; }
.btn--outline:hover { border-color: var(--gold-b); background: var(--gold-soft); }
.btn--sm { padding: 10px 18px; font-size: .74rem; }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(20,16,13,.98); border-bottom: 1px solid var(--line); }
.site-header__row { max-width: none; padding: 0 32px; display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); align-items: center; height: 76px; gap: 24px; }
.brand { justify-self: center; display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-b); white-space: nowrap; }
.brand-mark { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; border: 1px solid var(--line); }
.main-nav { display: flex; align-items: center; gap: 30px; justify-self: center; }
.main-nav__links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; font-family: var(--font-display); font-size: .8rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.main-nav__links a { color: var(--ink-muted); position: relative; padding: 6px 0; }
.main-nav__links a:hover, .main-nav__links a[aria-current="page"] { color: var(--gold-b); }
.main-nav__links a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 18px; justify-self: end; }
.lang-switch { display: flex; gap: 4px; font-family: var(--font-display); font-size: .78rem; font-weight: 600; }
.lang-switch a { padding: 6px 10px; border-radius: 6px; color: var(--ink-faint); border: 1px solid transparent; }
.lang-switch a:hover { color: var(--parch); }
.lang-switch a.active { color: var(--on-gold); background: var(--gold); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--gold-b); display: block; }
@media (max-width: 1180px) {
  .header-actions .btn { display: none; }
  .main-nav__links { gap: 18px; font-size: .76rem; }
}
@media (max-width: 1000px) {
  .site-header__row { display: flex; justify-content: space-between; padding: 0 24px; }
  .brand { justify-self: auto; }
  .main-nav { position: fixed; inset: 76px 0 0 0; background: var(--bg); flex-direction: column; align-items: flex-start; padding: 32px 24px; gap: 28px; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s; overflow-y: auto; z-index: 90; }
  .main-nav.open { transform: translateX(0); visibility: visible; }
  .main-nav__links { flex-direction: column; gap: 22px; font-size: 1rem; }
  .nav-toggle { display: flex; }
}

/* ---------- Héros ---------- */
.hero { padding: 72px 0 64px; background: linear-gradient(180deg, rgba(20,16,13,.55), var(--bg) 96%), url("../img/hero-bg.webp") center/cover no-repeat; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; grid-template-areas: "logo visual" "text visual"; column-gap: 48px; row-gap: 30px; align-items: center; }
.hero__logo { grid-area: logo; align-self: end; }
.hero__logo img { width: min(100%, 580px); height: auto; border-radius: 20px; border: 2px solid var(--gold-b); box-shadow: 0 14px 44px rgba(0,0,0,.55), 0 0 60px rgba(212,175,55,.28); }
.hero__text { grid-area: text; align-self: start; }
.hero h1 { margin-bottom: 22px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 28px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: .9rem; color: var(--ink-faint); }
.hero__meta span { white-space: nowrap; }
.hero__meta strong { color: var(--gold-b); }
.hero__visual { grid-area: visual; }
.hero__visual img { width: 100%; height: auto; filter: drop-shadow(0 24px 50px rgba(0,0,0,.55)); }

/* ---------- Statistiques ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-700); padding: 26px 12px; }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(2rem, 4.4vw, 3.1rem); color: var(--gold-b); line-height: 1; margin-bottom: 8px; }
.stat span { font-size: .92rem; color: var(--ink-muted); }

/* ---------- Cartes ---------- */
.grid-2, .grid-3 { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card { background: linear-gradient(180deg, var(--bg-600), var(--bg-700)); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: relative; }
.card h3 { margin-bottom: 10px; color: var(--gold-b); }
.card p:last-child { margin-bottom: 0; }
.card__icon { font-size: 1.8rem; margin-bottom: 12px; display: block; }
.card__badge, .badge-new { display: inline-block; font-family: var(--font-display); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; background: var(--gold); color: var(--on-gold); border-radius: 5px; padding: 4px 10px; }
.card__badge { position: absolute; top: 18px; right: 18px; }
.card--new { border-color: var(--gold); background: linear-gradient(180deg, var(--bg-500), var(--bg-600)); }
.changelog-list { color: var(--ink-muted); padding-left: 22px; margin: 18px 0 0; }
.changelog-list li { margin: .5em 0; }
.callout { border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 24px; }
.callout p { margin: 0; }

/* ---------- Mosaïque de photos ---------- */
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mosaic figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 3 / 2; background: var(--bg-600); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.mosaic figure:hover img { transform: scale(1.05); }
.mosaic figcaption { position: absolute; inset: auto 0 0 0; padding: 38px 16px 12px; background: linear-gradient(180deg, transparent, rgba(10,8,6,.92)); font-family: var(--font-display); font-size: .9rem; font-weight: 600; color: var(--parch); line-height: 1.25; }
.mosaic figcaption small { display: block; font-family: var(--font-body); font-weight: 400; font-size: .8rem; color: var(--gold-b); margin-top: 2px; }
.note { font-size: .86rem; color: var(--ink-faint); margin-top: 14px; }
.note a, .doc a, .card a, .callout a, .lead a { color: var(--gold-b); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Captures ---------- */
.shots { display: flex; gap: 22px; overflow-x: auto; padding: 8px 4px 26px; scroll-snap-type: x mandatory; }
.shots figure { margin: 0; flex: 0 0 auto; scroll-snap-align: start; text-align: center; }
.shots img { height: 540px; width: auto; border-radius: 22px; border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0,0,0,.5); }
.shots figcaption { margin-top: 12px; font-family: var(--font-display); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-b); }
.shots::-webkit-scrollbar { height: 8px; } .shots::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 8px; }

/* ---------- Lignes de fonctionnalité ---------- */
.feature { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: center; padding: 38px 0; }
.feature:nth-of-type(even) { grid-template-columns: 340px 1fr; }
.feature:nth-of-type(even) .feature__img { order: -1; }
.feature__img img { width: 100%; height: auto; border-radius: 26px; border: 1px solid var(--line); box-shadow: 0 18px 48px rgba(0,0,0,.55); }
.feature ul { color: var(--ink-muted); padding-left: 22px; }
.feature li { margin: .45em 0; }
.tick-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 30px; }
.tick-list li { padding-left: 26px; position: relative; color: var(--ink-muted); }
.tick-list li::before { content: "\2726"; position: absolute; left: 0; color: var(--gold); }

/* médaillon utilisé comme visuel d'une fonctionnalité */
.feature__img--medal img { border-radius: 50%; border: 2px solid var(--gold); box-shadow: 0 0 50px rgba(212,175,55,.3); max-width: 300px; margin: 0 auto; }

/* ---------- Lecteurs audio du Barde ---------- */
.bard { display: grid; grid-template-columns: 210px 1fr; gap: 40px; align-items: center; }
.bard__medal img { width: 210px; height: 210px; border-radius: 50%; border: 2px solid var(--gold); box-shadow: 0 0 40px rgba(212,175,55,.3); }
.player { background: var(--bg-600); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; }
.player h4 { color: var(--gold-b); }
.player audio { width: 100%; margin: 10px 0 8px; filter: sepia(.25) saturate(.8); }
.player p { font-size: .92rem; font-style: italic; margin: 0; }

/* ---------- Formules ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; background: var(--bg-600); }
.plan--full { border-color: var(--gold); background: linear-gradient(180deg, var(--bg-500), var(--bg-600)); box-shadow: 0 0 40px rgba(212,175,55,.12); }
.plan h3 { margin-bottom: 4px; }
.plan .price { font-family: var(--font-display); color: var(--gold-b); font-size: 1.15rem; margin-bottom: 16px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.plan li { padding-left: 26px; position: relative; color: var(--ink-muted); }
.plan li::before { content: "\2726"; position: absolute; left: 0; color: var(--gold); }

/* ---------- Catalogue ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 14px; position: sticky; top: 76px; z-index: 50; background: rgba(20,16,13,.97); padding: 14px 0; border-bottom: 1px solid var(--line); }
.search { flex: 1 1 280px; position: relative; }
.search input { width: 100%; background: var(--bg-600); border: 1px solid var(--line); color: var(--parch); border-radius: 10px; padding: 13px 16px; font: inherit; }
.search input:focus { outline: 2px solid var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--font-display); font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: transparent; color: var(--ink-muted); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.chip:hover { border-color: var(--gold); color: var(--parch); }
.chip.on { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.count { font-size: .88rem; color: var(--ink-faint); margin: 8px 0 22px; }
.continent { margin-bottom: 40px; }
.continent h2 { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.country { margin: 26px 0 8px; }
.country h3 { font-size: 1.05rem; color: var(--gold-b); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.country h3 small { font-family: var(--font-body); font-weight: 400; color: var(--ink-faint); font-size: .85rem; }
.sites { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.site { background: var(--bg-600); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.site img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--bg-500); }
.site__b { padding: 12px 14px 14px; }
.site h4 { font-size: .98rem; margin-bottom: 4px; color: var(--parch); }
.site p { font-size: .84rem; margin: 0 0 8px; color: var(--ink-faint); }
.tag { display: inline-block; font-family: var(--font-display); font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--gold-dark); color: var(--gold-b); border-radius: 4px; padding: 2px 7px; margin-right: 6px; }
.tag--free { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.hidden { display: none !important; }

/* ---------- Bandeau d'appel à l'action ---------- */
.cta-band { background: linear-gradient(135deg, var(--gold-b), var(--gold)); color: var(--on-gold); border-radius: var(--radius); padding: 58px 40px; text-align: center; }
.cta-band h2 { color: var(--on-gold); margin-bottom: 12px; }
.cta-band p { color: rgba(20,16,13,.82); max-width: 580px; margin: 0 auto 28px; }
.cta-band .btn--primary { background: var(--on-gold); color: var(--gold-b); box-shadow: none; }
.cta-band .btn--primary:hover { background: #000; }

/* ---------- Pages ---------- */
.page-head { padding: 64px 0 20px; background: linear-gradient(180deg, rgba(20,16,13,.6), var(--bg)), url("../img/hero-bg.webp") center/cover; border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: 16px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-block .value { font-family: var(--font-display); color: var(--gold-b); font-size: 1.15rem; word-break: break-all; }
.contact-block .value a:hover { text-decoration: underline; }
.doc { max-width: 800px; }
.doc h2 { font-size: 1.55rem; margin-top: 1.8em; }
.doc h2:first-child { margin-top: 0; }
.doc ul { color: var(--ink-muted); padding-left: 22px; }
.doc li { margin: .45em 0; }
details.faq { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-600); padding: 0 22px; margin-bottom: 12px; }
details.faq summary { cursor: pointer; padding: 18px 0; font-family: var(--font-display); font-weight: 600; color: var(--gold-b); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--gold); }
details.faq[open] summary::after { content: "\2212"; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq p { padding-bottom: 6px; }
table.credits { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.credits th, table.credits td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.credits th { font-family: var(--font-display); color: var(--gold-b); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
table.credits td { color: var(--ink-muted); }
table.credits a { color: var(--gold-b); }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 32px; background: var(--bg-700); }
.site-footer__row { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 32px; }
.site-footer__brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; color: var(--gold-b); }
.site-footer__brand .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-family: var(--font-display); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.site-footer nav a:hover { color: var(--gold-b); }
.site-footer__meta { font-size: .8rem; color: var(--ink-faint); margin-top: 26px; }
.jdg-apps a { color: var(--gold-b); }

/* ---------- Adaptatif ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; grid-template-areas: "logo" "visual" "text"; }
  .hero__visual { max-width: 420px; margin: 0 auto; }
  .hero__logo { justify-self: center; align-self: auto; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .sites { grid-template-columns: repeat(3, 1fr); }
  .feature, .feature:nth-of-type(even) { grid-template-columns: 1fr; gap: 28px; }
  .feature__img, .feature:nth-of-type(even) .feature__img { order: -1; max-width: 300px; margin: 0 auto; }
  .bard, .contact-grid, .plans { grid-template-columns: 1fr; }
  .bard__medal { margin: 0 auto; }
  .tick-list { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  section { padding: 60px 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .sites { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .shots img { height: 440px; }
  .site-footer__row { flex-direction: column; }
  .toolbar { position: static; }
  .cta-band { padding: 40px 22px; }
  .mosaic { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .brand { font-size: .95rem; gap: 9px; }
  .brand-mark { width: 34px; height: 34px; }
  .header-actions { gap: 8px; }
  .hero { padding: 40px 0 40px; }
  .sites { grid-template-columns: 1fr; }
}
