/* JF IA Lab · feuille de style
   Auteur : Jean-François Raymond · Co-auteur : Claude (Anthropic)
   Polices hébergées localement (licence SIL OFL, voir fonts/) : aucune requête externe. */

@font-face { font-family: "Playfair Display"; font-weight: 400; font-display: swap; src: url("fonts/playfair-display-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 700; font-display: swap; src: url("fonts/playfair-display-latin-700.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap; src: url("fonts/dm-sans-latin-400.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 600; font-display: swap; src: url("fonts/dm-sans-latin-600.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-display: swap; src: url("fonts/dm-sans-latin-700.woff2") format("woff2"); }

:root {
  --creme: #faf8f5;
  --carte: #fdfbf7;
  --texte: #2d2620;
  --doux: #6b5f55;
  --ligne: #e6ded3;
  --accent: #c0392b;
  --rose: #e8b4b8;      --rose-pale: #f7e6e7;
  --lavande: #b8a8d4;   --lavande-pale: #ece7f5;
  --sauge: #b8d4c0;     --sauge-pale: #e5f0e8;
  --peche: #f3d1b5;     --peche-pale: #fbeee3;
  --rayon: 14px;
  --titre: "Playfair Display", Georgia, serif;
  --corps: "DM Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--texte);
  font-family: var(--corps);
  font-size: 17px;
  line-height: 1.6;
}
h1, h2, h3 { font-family: var(--titre); line-height: 1.2; margin: 0; }
p { margin: 0 0 12px; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--lavande); outline-offset: 2px; }

.saut { position: absolute; left: -9999px; }
.saut:focus { left: 16px; top: 12px; z-index: 20; background: var(--carte); padding: 8px 14px; border-radius: 8px; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px max(16px, 5vw);
  background: rgba(250, 248, 245, 0.94);
  border-bottom: 1px solid var(--ligne);
  backdrop-filter: blur(8px);
}
.logo { font-family: var(--titre); font-weight: 700; font-size: 1.2rem; color: var(--texte); text-decoration: none; }
.logo span { color: var(--accent); }
.nav nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav nav a { color: var(--doux); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav nav a:hover { color: var(--accent); }

/* En-tête */
.hero {
  background: linear-gradient(135deg, var(--rose-pale), var(--lavande-pale));
  border-bottom: 3px solid var(--lavande);
  padding: 72px max(16px, 5vw) 64px;
}
.hero-interieur { max-width: 820px; margin: 0 auto; }
.surtitre { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700; color: var(--accent); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin-bottom: 20px; }
.chapeau { font-size: 1.15rem; color: var(--doux); max-width: 720px; }
.appels { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* Boutons */
.btn {
  display: inline-block; border: 1px solid transparent; border-radius: 999px;
  padding: 11px 22px; font: 600 0.98rem var(--corps); text-decoration: none; cursor: pointer;
}
.btn.principal { background: var(--rose); color: var(--texte); border-color: var(--rose); }
.btn.principal:hover { background: #e2a4a9; }
.btn.secondaire { background: var(--carte); color: var(--texte); border-color: var(--lavande); }
.btn.secondaire:hover { background: var(--lavande-pale); }
.btn.petit { padding: 6px 14px; font-size: 0.88rem; background: var(--carte); color: var(--texte); border-color: var(--ligne); }

/* Sections */
.section { max-width: 1080px; margin: 0 auto; padding: 64px 16px 16px; }
.section.bande { max-width: none; background: var(--peche-pale); border-top: 1px solid var(--peche); border-bottom: 1px solid var(--peche); margin-top: 48px; padding: 56px max(16px, 5vw); }
.section.bande > * { max-width: 1048px; margin-left: auto; margin-right: auto; }
.entete-section { margin-bottom: 24px; }
.entete-section h2 { font-size: 2rem; padding-bottom: 8px; border-bottom: 2px solid var(--rose); display: inline-block; margin-bottom: 10px; }
.entete-section p { color: var(--doux); }

/* Cartes projets */
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 22px; }
.carte h3 { font-size: 1.3rem; margin: 12px 0 10px; }
.carte p { font-size: 0.98rem; }
.precision { color: var(--doux); font-size: 0.9rem !important; margin-bottom: 0; }
.etiquette { display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 3px 10px; border-radius: 999px; }
.etiquette.rose { background: var(--rose-pale); border: 1px solid var(--rose); }
.etiquette.lavande { background: var(--lavande-pale); border: 1px solid var(--lavande); }
.etiquette.sauge { background: var(--sauge-pale); border: 1px solid var(--sauge); }
.etiquette.peche { background: var(--peche-pale); border: 1px solid var(--peche); }

/* Principes */
.principes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.principe { background: var(--carte); border-radius: var(--rayon); padding: 20px; border-left: 4px solid var(--accent); }
.principe h3 { font-size: 1.15rem; margin-bottom: 8px; }
.principe p { font-size: 0.96rem; margin: 0; }

/* Démo */
.chat { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); overflow: hidden; }
.chat-barre { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--lavande-pale); border-bottom: 1px solid var(--ligne); font-size: 0.92rem; font-weight: 600; }
.messages { height: 360px; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; white-space: pre-wrap; font-size: 0.96rem; }
.msg.usager { align-self: flex-end; background: var(--rose-pale); border: 1px solid var(--rose); }
.msg.assistant { align-self: flex-start; background: var(--creme); border: 1px solid var(--ligne); }
.msg.systeme { align-self: center; color: var(--doux); font-size: 0.85rem; background: none; }
.composeur { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--ligne); background: var(--creme); }
.composeur textarea { flex: 1; resize: none; font: 0.98rem var(--corps); color: var(--texte); background: var(--carte); border: 1px solid var(--ligne); border-radius: 10px; padding: 10px 12px; }
.avis { font-size: 0.88rem; color: var(--doux); margin-top: 12px; }

/* Contact */
.contact { text-align: center; padding: 36px 22px; background: var(--sauge-pale); border-color: var(--sauge); }
.contact h2 { font-size: 1.8rem; margin-bottom: 12px; }
.lien-courriel { font-weight: 700; font-size: 1.1rem; }

/* Pied de page */
.pied { margin-top: 64px; padding: 28px 16px; border-top: 2px solid var(--rose); text-align: center; color: var(--doux); font-size: 0.9rem; }
.pied p { margin: 4px 0; }
.credit { font-size: 0.82rem; }

/* Page texte (confidentialité) */
.texte-page { max-width: 760px; margin: 0 auto; padding: 48px 16px; }
.texte-page h1 { font-size: 2.2rem; margin-bottom: 20px; }
.texte-page h2 { font-size: 1.35rem; margin: 28px 0 10px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: 48px; padding-bottom: 44px; }
  .messages { height: 300px; }
  .msg { max-width: 95%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
