/* ==========================================================================
   DigitOccitanie — couche de design 2026
   Chargée après les feuilles existantes : elle affine sans les remplacer.
   ========================================================================== */

:root {
  --ink: #0e2433;
  --ink-2: #17384d;
  --teal: #0f766e;
  --teal-soft: #e6f2f0;
  --coral: #b4304a;
  --coral-dark: #96223b;
  --gold: #d99a2b;
  --line: #e2e8ec;
  --line-strong: #cbd6dd;
  --soft: #f6f9fa;
  --muted: #5b6b78;
  --white: #ffffff;

  --radius-s: 10px;
  --radius-m: 14px;
  --radius-l: 20px;
  --shadow-s: 0 1px 2px rgba(14, 36, 51, 0.06), 0 4px 12px rgba(14, 36, 51, 0.05);
  --shadow-m: 0 2px 6px rgba(14, 36, 51, 0.07), 0 18px 40px rgba(14, 36, 51, 0.08);
  --space: clamp(56px, 6vw, 96px);
  --measure: 68ch;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- Base typographique ---------- */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p, li {
  max-width: var(--measure);
}

p { margin: 0 0 1.05em; }

h1, h2, h3, h4 {
  font-family: 'Lexend', system-ui, sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}

/* Les titres restent blancs dans les blocs sombres */
.seo-hero h1, .seo-hero h2, .seo-hero h3,
.hero h1, .hero h2, .hero h3,
.cta h1, .cta h2, .cta h3,
.pied h1, .pied h2, .pied h3 {
  color: #fff;
}

/* L'accueil a un héros clair : son titre garde la couleur d'encre (sinon « DigitOccitanie » devient invisible). */
.hero.hero-site h1, .hero.hero-site h2, .hero.hero-site h3 { color: var(--ink); }

.seo-hero a:not(.primary):not(.secondary),
.hero a:not(.primary):not(.secondary),
.cta a:not(.primary):not(.secondary) { color: inherit; }

.secondary { color: var(--ink) !important; background: #fff; }

h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.15rem); font-weight: 700; margin-top: 1.6em; }
h3 { font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: 600; }



a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s var(--ease);
}
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--teal) 45%, transparent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--teal-soft); color: var(--ink); }

img, svg { max-width: 100%; height: auto; }

/* ---------- En-tête ---------- */
.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in srgb, var(--ink) 92%, transparent);
}

.site-header-inner { min-height: 68px; }

.site-nav a {
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  opacity: 0.88;
  transition: opacity 0.15s var(--ease), color 0.15s var(--ease);
}
.site-nav a:hover { opacity: 1; }

.site-nav .nav-cta {
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  opacity: 1;
  box-shadow: 0 6px 18px rgba(180, 48, 74, 0.28);
}

/* ---------- Boutons ---------- */
.primary, .secondary, .btn, .nav-cta, button.primary, a.primary, a.secondary {
  border-radius: var(--radius-s);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.15s var(--ease);
}

.primary, a.primary, button.primary {
  background: var(--coral);
  box-shadow: 0 6px 18px rgba(180, 48, 74, 0.22);
}
.primary:hover, a.primary:hover, button.primary:hover {
  background: var(--coral-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(180, 48, 74, 0.3);
}

a.secondary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-s);
}

/* ---------- Cartes ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
  box-shadow: var(--shadow-s);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-m);
  border-color: var(--line-strong);
}
.card:hover::before { opacity: 1; }

.card strong { color: var(--ink); }

/* ---------- Héros ---------- */
.seo-hero, .hero {
  position: relative;
  overflow: hidden;
}
.seo-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -60% 40%;
  height: 420px;
  background: radial-gradient(closest-side, rgba(217, 154, 43, 0.18), transparent 70%);
  pointer-events: none;
}
.seo-hero h1 { letter-spacing: -0.025em; }
.seo-hero p { font-size: 1.06rem; line-height: 1.6; }

/* ---------- Sections ---------- */
section { scroll-margin-top: 88px; }

/* ---------- Tableaux ---------- */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-s);
  overflow: hidden;
  /* Sur téléphone, un tableau plus large que l'écran doit pouvoir défiler. */
  overflow-x: auto;
}
.table-wrap table { border-collapse: separate; border-spacing: 0; }
.table-wrap thead th {
  background: var(--soft);
  color: var(--ink-2);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.table-wrap tbody tr:nth-child(even) td { background: #fbfdfd; }
.table-wrap tbody tr:hover td { background: var(--teal-soft); }

/* ---------- FAQ ---------- */
.faq details, details {
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--white);
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
details:hover { border-color: var(--line-strong); box-shadow: var(--shadow-s); }
details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  color: var(--ink);
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+";
  font-size: 1.25rem;
  line-height: 1;
  color: var(--teal);
  transition: transform 0.2s var(--ease);
}
details[open] summary::after { content: "−"; transform: rotate(180deg); }

/* ---------- Formulaires ---------- */
input, select, textarea, button {
  font-family: inherit;
}
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="search"], select, textarea {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  padding: 11px 13px;
  font-size: 0.98rem;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}
label { color: var(--ink-2); }

/* ---------- Fil d'Ariane ---------- */
.fil-ariane { padding-top: 16px; padding-bottom: 16px; }
.fil-ariane a { color: var(--muted); }
.fil-ariane li[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- Pied de page ---------- */
.pied {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.pied-titre {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 12px;
}
.pied a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
.pied a:hover { color: #fff; text-decoration: underline; }
.pied-bas {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Badges ---------- */
.eyebrow, .section-eyebrow, .lead-kicker {
  letter-spacing: 0.14em;
  font-weight: 800;
}

/* ---------- Robustesse : le contenu du héros ne doit jamais rester masqué ----------
   Si l'animation d'entrée est interrompue (appareil lent, JS désactivé, onglet
   en arrière-plan), le titre restait à faible opacité. On force l'état final. */
.hero-copy,
.hero-copy > *,
.hero-site h1,
.hero-site .hero-lead,
.hero-site .hero-offer,
.hero-site .hero-actions,
.hero-site .hero-facts,
.seo-hero .seo-wrap > * {
  opacity: 1 !important;
  transform: none !important;
}

/* ---------- Animations douces ---------- */
@media (prefers-reduced-motion: no-preference) {
  a, button, .card, details { will-change: transform; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Impression ---------- */
@media print {
  .site-header, .site-nav, .pied, .nav-cta, .site-chat, #toast-zone, #confetti-zone { display: none !important; }
  body { font-size: 12pt; color: #000; }
  .card, .table-wrap { box-shadow: none; border-color: #ccc; }
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  h1 { font-size: 2rem; }
  .seo-hero { padding-top: 44px; padding-bottom: 44px; }
  .pied-inner { gap: 28px; }
}
