/* Identité Briomel, partagée par les pages du site public.
   Palette et typographies alignées sur l'app et sur la maquette du futur
   miam.briomel.com : Fraunces en titrage, Figtree en courant. */

:root {
  --ground: #F3EBDC;
  --surface: #FBF6EA;
  --ink: #2A1520;
  --ink-soft: #6A5560;
  --ink-faint: #7C6670;
  --wine: #722F37;        /* vin de la marque : fonds sombres (hero, téléphone, boutons) */
  --wine-deep: #5C242B;   /* survol */
  --plum: #722F37;        /* liens, boutons et accents sur fond clair */
  --plum-ink: #722F37;
  --gold: #E8A93A;        /* miel : traits, pastilles, jamais en texte sur fond clair */
  --gold-text: #722F37;   /* « miel » quand il doit s'écrire : vin sur fond clair */
  --gold-light: #F0B54A;  /* miel de texte sur fond vin */
  --gold-soft: #F3DDA8;
  --on-gold: #3A1218;
  --on-plum: #F3EBDC;
  --sage: #4C6944;
  --sage-soft: #DCE7D3;
  --line: #DDCFB6;
  --shell: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #2A1218;
    --surface: #3A1A22;
    --ink: #F3EBDC;
    --ink-soft: #D9C9BC;
    --ink-faint: #A8939A;
    --plum: #F0B54A;
    --on-plum: #3A1218;
    --plum-ink: #F5C56A;
    --gold: #F0B54A;
    --gold-text: #F0B54A;
    --gold-soft: #4A3A20;
    --sage: #95BC85;
    --sage-soft: #2C3826;
    --line: #5A2A33;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  font-optical-sizing: auto;
  text-wrap: balance;
  line-height: 1.15;
  margin: 0;
}

a { color: var(--plum); }
a:hover { color: var(--wine-deep); }

:where(a, button, summary):focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  background: var(--wine);
  color: #F3EBDC;
  padding: .6em 1em;
  border-radius: 0 0 8px 0;
  z-index: 100;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; top: 0; }

/* Libellé destiné aux lecteurs d'écran seuls (légendes de tableaux, etc.). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── En-tête ─────────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--plum);
  text-decoration: none;
}
.header-nav {
  margin-left: auto;
  display: flex;
  gap: 22px;
  font-size: .9rem;
}
.header-nav a { color: var(--ink-soft); text-decoration: none; }
.header-nav a:hover { color: var(--plum); }
.header-cta {
  background: var(--plum);
  color: var(--on-plum);
  text-decoration: none;
  font-weight: 600;
  font-size: .88rem;
  padding: 9px 20px;
  border-radius: 999px;
  white-space: nowrap;
}
.header-cta:hover { background: var(--wine-deep); color: #F3EBDC; }

/* ── Contenu ─────────────────────────────────────────────── */
/* `main` reste pleine largeur pour permettre les sections full bleed ;
   chaque section se recadre elle-même sur la largeur de la coquille. */
main { margin: 0; padding: 0; }

main > section {
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: 24px;
}

main > .prose {
  max-width: 68ch;
  margin: 0 auto;
  padding: 0 24px 72px;
}
.prose h1 { font-size: 2.1rem; font-weight: 600; margin: 40px 0 8px; }
.prose h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 40px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.prose h3 { font-size: 1.05rem; font-weight: 600; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--ink); }

.doc-meta {
  font-size: .85rem;
  color: var(--ink-faint);
  margin: 0 0 32px;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 24px 0;
}
.callout.important { border-left-color: var(--plum); }
.callout p { margin: 0; font-size: .93rem; }

.doc-toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 22px 20px;
  margin: 24px 0 40px;
}
.doc-toc p { margin: 0 0 10px; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); font-weight: 700; }
.doc-toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 24px; }
.doc-toc li { margin: 5px 0; font-size: .88rem; break-inside: avoid; }
.doc-toc a { text-decoration: none; }
.doc-toc a:hover { text-decoration: underline; }
@media (max-width: 640px) { .doc-toc ol { columns: 1; } }
.callout p + p { margin-top: 10px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  margin: 20px 0;
}
.table-wrap { overflow-x: auto; }
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-faint);
  font-weight: 700;
}
td { color: var(--ink-soft); }

/* ── Hero ────────────────────────────────────────────────── */
/* Pleine largeur, fond prune, comme sur les autres sites de l'écosystème :
   c'est le bloc qui doit dominer la page au premier coup d'oeil. */
main > .hero {
  max-width: none;
  padding: 0;
  background:
    radial-gradient(1000px 520px at 78% 8%, rgba(232, 169, 58, .18), transparent 68%),
    radial-gradient(760px 420px at 6% 92%, rgba(142, 63, 73, .55), transparent 70%),
    var(--wine);
  color: #F3EBDC;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 92px 24px 88px;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-text { max-width: 100%; }
.hero h1 {
  font-size: clamp(2.6rem, 5.4vw, 4rem);
  max-width: 14ch;
  font-weight: 600;
  color: #F3EBDC;
  letter-spacing: -.01em;
}
.hero-tagline { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 1.25rem; margin: 0 0 18px; color: var(--gold-light); }
.hero-accent { color: var(--gold-light); }
.hero p {
  font-size: 1.12rem;
  color: rgba(243, 235, 220, .78);
  margin: 24px 0 34px;
  max-width: 52ch;
}
.hero-trust {
  font-size: .87rem;
  color: rgba(243, 235, 220, .6);
  margin: 18px 0 0;
}

/* ── Visuel : mockup de téléphone ─────────────────────────── */
.hero-visual { display: flex; justify-content: center; }
.phone-mockup {
  width: 250px;
  aspect-ratio: 9 / 19;
  margin: 0 auto;
  border-radius: 34px;
  border: 8px solid #2A1218;
  background: var(--wine);
  box-shadow:
    0 0 0 1px rgba(243, 235, 220, .28),
    0 40px 70px -20px rgba(0, 0, 0, .6);
  overflow: hidden;
}
/* Pas encore de vraie capture d'écran de l'app : le logo centré sur le
   fond de marque reste plus honnête qu'un montage qui prétendrait à un
   aperçu réel de l'interface. */
.phone-screen {
  width: 100%;
  height: 100%;
  /* Même fond que celui déjà intégré à l'icône (android-chrome-512x512.png)
     pour qu'il n'y ait pas de bordure visible autour du carré de l'icône. */
  background: var(--wine);
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone-screen img { width: 62%; height: auto; }

/* ── Badges App Store / Google Play ─────────────────────────── */
.store-badges { display: flex; flex-wrap: wrap; gap: 14px; }
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: var(--wine);
  color: #F3EBDC;
  border-radius: 12px;
  padding: 11px 20px;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.store-btn:hover { color: #F3EBDC; transform: translateY(-2px); box-shadow: 0 8px 20px -6px rgba(114, 47, 55, .4); }
.store-btn svg { width: 24px; height: 24px; fill: currentColor; flex-shrink: 0; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.25; }
.store-btn small { font-size: .68rem; opacity: .8; }
.store-btn strong { font-size: .95rem; font-weight: 700; }

/* Sur le hero sombre, les badges s'inversent pour rester lisibles. */
.hero .store-btn { background: var(--gold); color: var(--on-gold); }
.hero .store-btn:hover { color: var(--on-gold); box-shadow: 0 12px 26px -8px rgba(0, 0, 0, .5); }

/* ── Bandeau de preuve ───────────────────────────────────── */
main > .trust-strip {
  max-width: none;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.trust-strip {
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 36px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.trust-strip span {
  padding: 18px 0;
  position: relative;
}
.trust-strip span + span::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--gold);
  opacity: .6;
}

/* ── Sections communes ───────────────────────────────────── */
.section-title { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 600; text-align: center; }
.section-lead {
  text-align: center;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 14px auto 0;
}
.comparison-section,
.scenario-section,
.steps-section,
.profiles-section,
.pillars-section,
.features-section,
.faq-section {
  padding-block: 72px 8px;
}

/* ── Comparatif avant / après ────────────────────────────── */
.comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.comparison-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
}
.comparison-col h3 {
  font-size: 1.15rem;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.comparison-col ul { margin: 0; padding: 0; list-style: none; }
.comparison-col li {
  position: relative;
  padding-left: 30px;
  margin: 14px 0;
  color: var(--ink-soft);
  font-size: .95rem;
}
.comparison-col li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  font-size: 1.05rem;
}
.comparison-before h3 { color: var(--ink-faint); }
.comparison-before li::before { content: '×'; color: var(--ink-faint); }
.comparison-after { border-color: var(--gold); box-shadow: 0 18px 40px -26px rgba(232, 169, 58, .5); }
.comparison-after h3 { color: var(--gold-text); }
.comparison-after li::before { content: '✓'; color: var(--sage); }

/* ── Scénario concret ────────────────────────────────────── */
.scenario {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.scenario-card {
  background: var(--gold-soft);
  border-radius: 18px;
  padding: 28px;
}
.scenario-card h3 { font-size: 1.1rem; margin: 0 0 10px; color: var(--plum-ink); }
.scenario-card p { margin: 0; color: var(--plum-ink); opacity: .82; font-size: .95rem; }

/* ── Étapes ──────────────────────────────────────────────── */
.steps {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.step { position: relative; padding-top: 8px; }
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--plum);
  color: var(--on-plum);
  font-family: 'Fraunces', serif;
  font-weight: 600;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.08rem; margin: 0 0 8px; }
.step p { margin: 0; color: var(--ink-soft); font-size: .93rem; }

/* ── Profils de foyer ────────────────────────────────────── */
.profiles {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.profile-card {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 22px;
}
.profile-card h3 { font-size: 1.1rem; margin: 0 0 4px; }
.profile-meta {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gold-text);
  font-weight: 700;
  margin: 0 0 12px;
}
.profile-card p { margin: 0; color: var(--ink-soft); font-size: .93rem; }

/* ── Piliers (texte long) ────────────────────────────────── */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 36px;
  margin-top: 44px;
}
.pillar { border-top: 3px solid var(--gold); padding-top: 22px; }
.pillar h3 { font-size: 1.2rem; margin: 0 0 12px; }
.pillar p { margin: 0 0 14px; color: var(--ink-soft); font-size: .95rem; }
.pillar p:last-child { margin-bottom: 0; }

/* ── Texte d'appui (sans colonnes) ───────────────────────── */
.statement { max-width: 720px; margin: 36px auto 0; font-size: 1.1rem; line-height: 1.7; color: var(--ink-soft); }
.statement p { margin: 0 0 16px; }

/* ── Fonctionnalités ─────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  padding: 44px 0 16px;
  list-style: none;
  margin: 0;
}
.features li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
}
.features h3 { font-size: 1.1rem; margin: 0 0 10px; }
.features p { margin: 0; color: var(--ink-soft); font-size: .93rem; }

/* ── FAQ ──────────────────────────────────────────────────── */
.faq { max-width: 70ch; margin: 40px auto 0; display: flex; flex-direction: column; gap: 10px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 22px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  color: var(--plum);
  font-weight: 700;
  flex-shrink: 0;
}
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 18px; color: var(--ink-soft); font-size: .94rem; }

/* ── CTA final ───────────────────────────────────────────── */
main > .final-cta {
  max-width: none;
  margin: 88px 0 0;
  padding: 72px 24px;
  text-align: center;
  background:
    radial-gradient(760px 420px at 50% 0%, rgba(232, 169, 58, .18), transparent 70%),
    var(--wine);
  color: #F3EBDC;
}
.final-cta h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 14px; color: #F3EBDC; }
.final-cta p { color: rgba(243, 235, 220, .75); margin: 0 0 30px; }
.final-cta .store-badges { justify-content: center; }
.final-cta .store-btn { background: var(--gold); color: var(--on-gold); }
.final-cta .store-btn:hover { color: var(--on-gold); }

/* ── Pied de page ────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
/* Pages légales : pied de page simple sur une ligne. */
.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  font-size: .87rem;
  color: var(--ink-faint);
}
.footer-inner nav { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; }
.footer-inner a { color: var(--ink-soft); text-decoration: none; }
.footer-inner a:hover { color: var(--plum); text-decoration: underline; }

/* Accueil : pied de page en colonnes. */
.footer-rich {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 52px 24px 36px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand .brand { font-size: 1.4rem; display: inline-block; margin-bottom: 8px; }
.footer-brand p { margin: 0; color: var(--ink-soft); font-size: .9rem; max-width: 32ch; }
.footer-col h2 {
  font-family: 'Figtree', sans-serif;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--ink-faint);
  margin: 0 0 14px;
}
.footer-col a {
  display: block;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .9rem;
  margin-bottom: 9px;
}
.footer-col a:hover { color: var(--plum); }
.footer-bottom {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 18px 24px 32px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--ink-faint);
}
.footer-mifelia { letter-spacing: .08em; color: inherit; text-decoration: none; }
.footer-mifelia:hover { color: var(--plum); text-decoration: underline; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; padding: 64px 24px 56px; }
  .hero h1 { max-width: none; }
  .footer-rich { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .header-inner { padding: 12px 20px; gap: 12px; }
  .header-nav { order: 3; width: 100%; margin-left: 0; gap: 16px; font-size: .84rem; overflow-x: auto; }
  .header-cta { margin-left: auto; }
  .hero-grid { padding: 48px 20px 44px; }
  .hero p { font-size: 1rem; margin: 18px 0 26px; }
  .phone-mockup { width: 190px; }
  .store-badges { justify-content: center; }
  .comparison-section,
  .scenario-section,
  .steps-section,
  .profiles-section,
  .pillars-section,
  .features-section,
  .faq-section { padding-block: 52px 8px; }
  .comparison-col, .scenario-card, .features li { padding: 22px; }
  .footer-rich { grid-template-columns: 1fr; gap: 26px; padding: 40px 20px 28px; }
  .footer-inner nav { margin-left: 0; width: 100%; }
  main > .final-cta { padding: 52px 20px; margin-top: 64px; }
}

/* ── Sélecteur de langue ─────────────────────────────────── */
.lang-select { position: relative; font-size: .85rem; }
.lang-select summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.lang-select summary::-webkit-details-marker { display: none; }
.lang-select summary::after { content: " \25BE"; color: var(--ink-soft); }
.lang-flag { font-size: 1.1em; }
.lang-select summary:hover,
.lang-select[open] summary { border-color: var(--plum); color: var(--plum); }
.lang-select ul {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(42, 21, 32, .18);
}
.lang-select a {
  display: block;
  padding: 9px 18px;
  color: var(--ink-soft);
  text-decoration: none;
}
.lang-select a:hover { background: var(--ground); color: var(--plum); }
.lang-select a[aria-current] { color: var(--plum); font-weight: 600; }
