/* Vigie Frelons Périgord — feuille de style
   Palette dérivée du logo : encre #231b10, bronze #9e6325, rouge viseur #a81f1f.
   Font-stack universelle, aucune police tierce externe (RGPD/perf/souveraineté). */

:root {
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", "Noto Sans", Arial, sans-serif;

  --ink: #231b10;         /* brun encre — texte, monogramme */
  --bronze: #9e6325;      /* bronze/or — couleur de marque */
  --bronze-dark: #7c4c1a;
  --red: #a81f1f;         /* rouge viseur — alerte / signalement */
  --red-dark: #8a1818;
  --honey: #e0a92e;

  --bg: #faf6ef;
  --surface: #ffffff;
  --text: #2b2013;
  --muted: #6d6252;
  --border: #e8ddca;
  --radius: 14px;
  --wrap: 70rem;

  /* rôles adaptatifs pour le wordmark */
  --wm-ink: var(--ink);
  --wm-bronze: var(--bronze);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bronze: #cf9a52;
    --bronze-dark: #b9843c;
    --red: #e05c53;
    --bg: #161009;
    --surface: #201811;
    --text: #f1e9dc;
    --muted: #b9ab95;
    --border: #3a2c1c;
    --wm-ink: #f1e9dc;
    --wm-bronze: #cf9a52;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: max(1.25rem, env(safe-area-inset-left));
}
.narrow { max-width: 46rem; }

h1, h2, h3 { line-height: 1.15; }
a { color: var(--bronze); }

/* ── En-tête ── */
.site-header {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand-logo { width: 48px; height: 48px; display: block; }
.wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.wm-vfp { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.wm-full { font-size: .62rem; font-weight: 700; letter-spacing: .12em; margin-top: 2px; }
.wm-vfp .ink, .wm-full .ink { color: var(--wm-ink); }
.wm-vfp .bronze, .wm-full .bronze { color: var(--wm-bronze); }

.nav { display: flex; gap: .15rem; flex-wrap: wrap; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 .85rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
}
.nav a:active { background: var(--border); }
@media (hover: hover) { .nav a:hover { background: var(--border); color: var(--bronze); } }

/* ── Hero ── */
.hero {
  padding: clamp(2.5rem, 7vw, 5rem) 0;
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--bronze) 16%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--ink) 6%, var(--bg)), var(--bg));
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.hero-emblem { display: flex; justify-content: center; }
.hero-emblem img {
  width: min(100%, 340px);
  height: auto;
  filter: drop-shadow(0 12px 28px color-mix(in srgb, var(--ink) 28%, transparent));
}
.badge {
  display: inline-block;
  background: color-mix(in srgb, var(--red) 12%, transparent);
  color: var(--red);
  border: 1px solid color-mix(in srgb, var(--red) 35%, transparent);
  border-radius: 999px;
  padding: .35rem .85rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  margin: 0 0 1rem;
}
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin: 0 0 1rem; color: var(--ink); }
@media (prefers-color-scheme: dark) { .hero h1 { color: var(--text); } }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.28rem); color: var(--muted); max-width: 40rem; }
.lead strong { color: var(--text); }

/* ── Boutons — cibles tactiles >= 48px ── */
.cta-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform .05s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-alert { background: var(--red); color: #fff; }
.btn-outline { background: transparent; color: var(--bronze); border-color: var(--bronze); }
@media (hover: hover) {
  .btn-alert:hover { background: var(--red-dark); }
  .btn-outline:hover { background: color-mix(in srgb, var(--bronze) 12%, transparent); }
}

/* ── Sections ── */
.section { padding: clamp(2.75rem, 7vw, 4.5rem) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin: 0 0 1.25rem; color: var(--ink); }
@media (prefers-color-scheme: dark) { .section h2 { color: var(--text); } }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--bronze); margin: 0 0 .35rem; }

.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem 1.5rem;
}
.section-alt .card { background: var(--bg); }
.card-num {
  display: inline-block;
  font-size: .8rem;
  font-weight: 800;
  color: #fff;
  background: var(--bronze);
  border-radius: 8px;
  padding: .15rem .5rem;
  margin-bottom: .6rem;
}
.card h3 { margin: 0 0 .4rem; color: var(--ink); font-size: 1.2rem; }
@media (prefers-color-scheme: dark) { .card h3 { color: var(--text); } }
.card p { margin: 0; color: var(--muted); }

.contact-mail { margin: 1.5rem 0 1rem; }
.note { color: var(--muted); font-size: .9rem; }

/* ── Pied de page ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: .9rem;
}
.footer-grid { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-grid p { margin: 0; }
.credit a { font-weight: 700; }

/* ── Accessibilité : focus clavier ── */
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--honey);
  outline-offset: 2px;
}

/* ── Responsive ── */
@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-emblem { order: -1; }
  .hero-emblem img { width: min(72%, 240px); }
  .wm-full { display: none; }
}
