/* ════════════════════════════════════════════════════════════
   CHARTE GRAPHIQUE · Tommy Lavie Immobilier
   Terracotta, sable et or : une ambiance méditerranéenne chaleureuse.
   Pour changer une couleur partout sur le site : modifiez-la ici.
   ════════════════════════════════════════════════════════════ */

/* Polices auto-hébergées (licence SIL OFL, fichiers dans /fonts) */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-opsz.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-opsz-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Couleurs principales */
  --terracotta-900: #5E2617;
  --terracotta-800: #7E3422;
  --terracotta-700: #8E3B26;
  --terracotta-600: #A84A30; /* couleur de marque */
  --terracotta-500: #C4673F;
  --terracotta-200: #EBC9B6;
  --terracotta-100: #F6E4D8;

  --sable-50: #FBF7F0;  /* fond principal */
  --sable-100: #F4EBDD;
  --sable-200: #E9DCC6;
  --sable-300: #D8C6A8;

  --or-500: #C9923F;
  --or-400: #E2B66E;
  --or-200: #F3DFB5;

  --olive-600: #5F6442;
  --encre-900: #2B211C; /* texte principal */
  --encre-700: #4A3B32;
  --encre-500: #6E5D51; /* texte secondaire */
  --blanc: #FFFFFF;
  --surligne: #FFF07A;  /* [À COMPLÉTER] */

  /* Typographie */
  --police-titre: "Fraunces", "Georgia", "Times New Roman", serif;
  --police-texte: "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --taille-texte: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --taille-h1: clamp(2.5rem, 1.6rem + 4.2vw, 4.75rem);
  --taille-h2: clamp(1.9rem, 1.4rem + 2.2vw, 3.1rem);
  --taille-h3: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);

  /* Formes */
  --rayon-s: 10px;
  --rayon-m: 18px;
  --rayon-l: 28px;
  --rayon-pilule: 999px;

  /* Ombres chaudes (teintées terracotta, jamais grises) */
  --ombre-1: 0 1px 2px rgba(94, 38, 23, 0.06), 0 2px 8px rgba(94, 38, 23, 0.05);
  --ombre-2: 0 6px 18px rgba(94, 38, 23, 0.08), 0 2px 6px rgba(94, 38, 23, 0.06);
  --ombre-3: 0 24px 60px rgba(94, 38, 23, 0.16), 0 8px 20px rgba(94, 38, 23, 0.08);

  /* Mise en page */
  --largeur-max: 1200px;
  --gouttiere: clamp(1.1rem, 0.6rem + 2.4vw, 2.5rem);
  --espace-section: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --transition: 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
  --focus: 0 0 0 3px var(--sable-50), 0 0 0 6px var(--terracotta-600);
}

/* ── Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--police-texte);
  font-size: var(--taille-texte);
  line-height: 1.65;
  color: var(--encre-900);
  background: var(--sable-50);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--police-titre); font-weight: 500; line-height: 1.1; letter-spacing: -0.015em; margin: 0; font-optical-sizing: auto; }
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--terracotta-600); }
p { margin: 0 0 1em; }
a { color: var(--terracotta-700); text-underline-offset: 0.2em; }
a:hover { color: var(--terracotta-900); }
ul, ol { margin: 0; padding: 0; }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--rayon-s); }
/* Titres qui reçoivent le focus par programme (lecteurs d'écran) : pas de cadre visible */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; box-shadow: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.lien-evitement {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--encre-900); color: var(--sable-50); padding: 0.75rem 1.1rem; border-radius: var(--rayon-s);
}
.lien-evitement:focus { top: 1rem; color: var(--sable-50); }

.conteneur { width: 100%; max-width: var(--largeur-max); margin-inline: auto; padding-inline: var(--gouttiere); }

.surtitre {
  font-family: var(--police-texte); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--terracotta-700); margin-bottom: 1rem;
}
.surtitre--clair { color: var(--or-400); }
.titre-section { font-size: var(--taille-h2); max-width: 20ch; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.titre-section--clair { color: var(--sable-50); }
.titre-section--clair em { color: var(--or-400); }

/* ── Boutons ──────────────────────────────────────── */
.bouton {
  --bouton-fond: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 48px; padding: 0.8rem 1.6rem;
  font: 700 0.98rem/1.2 var(--police-texte); letter-spacing: 0.01em; text-decoration: none;
  border: 1.5px solid transparent; border-radius: var(--rayon-pilule); cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition), color var(--transition), border-color var(--transition);
}
.bouton:hover { transform: translateY(-2px); }
.bouton:active { transform: translateY(0); }
.bouton--plein { background: var(--terracotta-600); color: var(--blanc); box-shadow: 0 10px 24px rgba(168, 74, 48, 0.28); }
.bouton--plein:hover { background: var(--terracotta-700); color: var(--blanc); box-shadow: 0 14px 30px rgba(168, 74, 48, 0.34); }
.bouton--fantome { background: transparent; color: var(--encre-900); border-color: var(--sable-300); }
.bouton--fantome:hover { border-color: var(--terracotta-600); color: var(--terracotta-700); background: var(--blanc); }
.bouton--or { background: var(--or-400); color: var(--encre-900); }
.bouton--or:hover { background: var(--or-200); color: var(--encre-900); }
.bouton--contour-clair { color: var(--sable-50); border-color: rgba(251, 247, 240, 0.45); }
.bouton--contour-clair:hover { color: var(--encre-900); background: var(--sable-50); border-color: var(--sable-50); }

.icone { width: 1.05em; height: 1.05em; fill: currentColor; flex: none; }

/* ── Éléments réglementaires ─────────────────────── */
.avertissement {
  font-size: 0.82rem; line-height: 1.45; color: var(--encre-700);
  background: var(--sable-100); border-left: 3px solid var(--or-500);
  padding: 0.6rem 0.85rem; border-radius: 0 var(--rayon-s) var(--rayon-s) 0; margin: 0;
}
mark.a-completer { background: var(--surligne); color: var(--encre-900); padding: 0.05em 0.35em; border-radius: 4px; font-weight: 700; }

/* ── Accessibilité : animations réduites ─────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
