/* ============================================================
   Yassir Kazar — site.css
   Charte « Bleu Nuit » : fond bleu profond, texte clair, accent platine.
   Typographie : Fraunces (serif, titres) + Inter (sans, corps).
   ------------------------------------------------------------
   Tokens sémantiques (mêmes noms que la version claire, valeurs
   inversées pour le thème sombre) :
     --paper    fond de base
     --surface  surface surélevée (cartes) — remplace bg-white
     --ink      titres / texte fort
     --body     texte de corps           — remplace text-slate-700
     --navy     accent platine
     --hairline filets / bordures
     --muted    texte secondaire discret
   ============================================================ */

:root {
  --paper:    #0a1a33;
  --surface:  #10233f;
  --ink:      #f2f5fa;
  --body:     #b9c6da;
  --navy:     #cfd6e2;
  --hairline: #1d3557;
  --muted:    #8496b0;
}

html { scroll-behavior: smooth; color-scheme: dark; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-feature-settings: 'ss01', 'cv11';
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  font-family: 'Fraunces', Georgia, serif;
  font-feature-settings: 'ss01';
  letter-spacing: -0.018em;
}
h1 { line-height: 1.08; font-weight: 500; }
h2 { line-height: 1.12; font-weight: 500; }
h3 { line-height: 1.2;  font-weight: 600; }

a { color: inherit; }

/* Petit label majuscule, omniprésent dans le design éditorial */
.label-small {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  font-family: 'Inter', system-ui, sans-serif;
}

/* Bande de preuve — items de logos en majuscules */
.logo-item {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: 'Inter', system-ui, sans-serif;
  white-space: nowrap;
}

/* Boutons — deux variantes seulement */
.btn-primary {
  display: inline-block;
  background: var(--navy);
  color: var(--paper);
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  transition: opacity 0.2s ease, transform 0.2s ease;
  border: 1px solid var(--navy);
  cursor: pointer;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Lien éditorial — souligné doux qui se renforce au hover */
.link-editorial {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: text-decoration-color 0.2s ease;
}
.link-editorial:hover {
  text-decoration-color: currentColor;
}

/* Tailwind étend les couleurs via la config inline — ces règles sont
   un filet de rattrapage pour les anciens navigateurs ou cas de chargement
   où la config Tailwind ne serait pas encore appliquée. */
.bg-paper    { background-color: var(--paper); }
.bg-surface  { background-color: var(--surface); }
.bg-navy     { background-color: var(--navy); }
.text-ink    { color: var(--ink); }
.text-body   { color: var(--body); }
.text-navy   { color: var(--navy); }
.text-muted  { color: var(--muted); }
.border-hairline { border-color: var(--hairline); }

/* Focus visible accessible — plutôt qu'un outline brut Chrome */
*:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

/* Formulaires : champs en fond paper, bordure hairline, focus ink */
input, select, textarea {
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--hairline);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238496b0' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 10px 6px;
  padding-right: 2.5rem;
}

/* Sélection de texte — accent navy sur paper */
::selection {
  background: var(--navy);
  color: var(--paper);
}

/* Carousel vidéos — scroll-snap natif (pas de dépendance JS lourde) */
.video-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0 16px;
  -webkit-overflow-scrolling: touch;
}
.video-track::-webkit-scrollbar { display: none; }

.video-slide {
  flex: 0 0 calc(100% - 1.5rem);
  scroll-snap-align: start;
}
@media (min-width: 640px) {
  .video-track  { gap: 1.5rem; }
  .video-slide  { flex-basis: calc(50% - 0.75rem); }
}
@media (min-width: 1024px) {
  .video-slide  { flex-basis: calc(33.333% - 1rem); }
}

.video-card .video-thumb { transition: transform 0.5s ease; }
.video-card:hover .video-thumb { transform: scale(1.04); }

/* Clamp 2 lignes (utilisé sur les titres de vidéos — Tailwind CDN ne le sort pas par défaut) */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Prose éditoriale — utilisée sur les billets du blog (HTML rendu par Parsedown) */
.blog-prose {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--body);
}
.blog-prose p { margin: 1.4em 0; }
.blog-prose h2 {
  font-size: 1.875rem;
  margin: 2.4em 0 0.6em;
  line-height: 1.2;
  font-weight: 600;
  color: var(--ink);
}
.blog-prose h3 {
  font-size: 1.375rem;
  margin: 2em 0 0.5em;
  line-height: 1.3;
  font-weight: 600;
  color: var(--ink);
}
.blog-prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}
.blog-prose a:hover { text-decoration-color: currentColor; }
.blog-prose blockquote {
  border-left: 3px solid var(--navy);
  margin: 1.8em 0;
  padding: 0.2em 0 0.2em 1.4em;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1.5;
}
.blog-prose ul, .blog-prose ol { margin: 1.4em 0; padding-left: 1.4em; }
.blog-prose li { margin: 0.4em 0; }
.blog-prose li > ul, .blog-prose li > ol { margin: 0.4em 0; }
.blog-prose code {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.07);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}
.blog-prose pre {
  background: var(--surface);
  color: var(--body);
  border: 1px solid var(--hairline);
  padding: 1.2em 1.4em;
  margin: 1.6em 0;
  overflow-x: auto;
  font-size: 0.9em;
  line-height: 1.55;
}
.blog-prose pre code { background: transparent; padding: 0; color: inherit; }
.blog-prose hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 2.6em 0;
}
.blog-prose img { max-width: 100%; height: auto; margin: 1.8em 0; }
.blog-prose strong { font-weight: 600; }
