/* ═══════════════════════════════════════════════════════════════════════════
   CORMORANT — Identité visuelle CDex Pro / CDExpertise / BATISKOR
   ───────────────────────────────────────────────────────────────────────────
   Sert pour l'app web, les rapports PDF générés par Puppeteer, et les mails
   sortants. Fallback Georgia (serif système) pour les clients qui bloquent
   les webfonts (Outlook desktop notamment).

   Hiérarchie :
     • Titres (h1-h4, .titre, .doc-titre)  → Cormorant Garamond SemiBold/Italic
     • Corps long (rapports, mails)        → Cormorant Garamond Regular
     • Interface écran (formulaires, etc.) → reste sans-serif (lisibilité)

   USAGE
     <link rel="stylesheet" href="/cormorant.css">
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&display=swap');

:root {
  --font-cormorant: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-cormorant-italic: 'Cormorant Garamond', Georgia, serif;
}

/* ─── Titres : Cormorant SemiBold automatique ──────────────────────────── */
/* S'applique à TOUS les h1-h4 par défaut. Pour exclure un titre précis
   (ex. logo), ajouter la classe .no-cormorant ou une font-family inline. */
h1:not(.no-cormorant), h2:not(.no-cormorant), h3:not(.no-cormorant), h4:not(.no-cormorant),
.titre-cormorant, .doc-titre {
  font-family: var(--font-cormorant);
  font-weight: 600;
  letter-spacing: 0.005em;
}

/* Variante italique élégante (pour titres de section style "Genèse et…") */
.titre-italique, .doc-titre-italique {
  font-family: var(--font-cormorant);
  font-style: italic;
  font-weight: 500;
}

/* ─── Corps long : à appliquer sur des conteneurs "document" ───────────── */
.corps-cormorant, .doc-corps {
  font-family: var(--font-cormorant);
  font-size: 14.5px;
  line-height: 1.55;
  color: #1f2937;
  font-feature-settings: "onum" 1, "liga" 1, "kern" 1;
}

/* ─── Signature : nom en italique, titre en petites caps ──────────────── */
.signature-cormorant .sig-nom {
  font-family: var(--font-cormorant);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  color: #1e40af;
  letter-spacing: 0.01em;
}
.signature-cormorant .sig-fonction {
  font-family: var(--font-cormorant);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #065f46;
}

/* ─── Print : optimisation pour PDF/papier ─────────────────────────────── */
@media print {
  body.cormorant-print {
    font-family: var(--font-cormorant);
    font-feature-settings: "onum" 1, "liga" 1, "kern" 1;
  }
}
