/* ==========================================================================
   RMF RADIO — DESIGN SYSTEM
   Fondation visuelle du site, conforme à la charte v1.0
   --------------------------------------------------------------------------
   Ce fichier contient TOUS les tokens de design (couleurs, fontes, tailles,
   espacements, composants). Toute modification de la charte se fait ici,
   et se propage automatiquement à toutes les pages.

   STRUCTURE :
   1. Variables CSS (couleurs, fontes, espacements, breakpoints)
   2. Reset et bases globales
   3. Typographie (h1, h2, h3, p, links)
   4. Composants — boutons, cartes, tags, filets
   5. Utilitaires (containers, spacings, helpers)
   ========================================================================== */


/* ==========================================================================
   1. VARIABLES — la source de vérité unique
   ========================================================================== */

:root {

  /* --- Couleurs charte RMF v1.0 ------------------------------------------ */

  --color-anthracite: #1A2B40;          /* Couleur majeure - 50% des surfaces */
  --color-anthracite-deep: #142133;     /* Variante plus profonde - sections nuit */
  --color-creme: #F7F4EE;               /* Couleur mineure - 30% des surfaces */
  --color-or: #C8A96E;                  /* Signature - 12% des surfaces */
  --color-or-light: #d6bb84;            /* Or clair - hover des liens or */
  --color-bordeaux: #7A1528;            /* Accent - 8% des surfaces */
  --color-bordeaux-light: #962036;      /* Bordeaux clair - hover des CTA */

  /* Couleurs utilitaires (techniques, hors marque) */

  --color-text: #1F1F1F;                /* Texte courant sur fond clair */
  --color-text-secondary: #5A5A5A;      /* Texte secondaire (légendes, méta) */
  --color-text-tertiary: #8A8A8A;       /* Texte tertiaire (copyright, micro-info) */
  --color-border: #E0DCD3;              /* Bordures fines, séparateurs */
  --color-success: #3D6E4A;             /* Succès formulaires */
  --color-error: #9C2A2A;               /* Erreurs (≠ bordeaux marque) */


  /* --- Typographie ------------------------------------------------------- */

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;


  /* --- Tailles de texte (en rem pour respecter le réglage navigateur) ----- */

  --text-xs: 0.75rem;       /* 12px — micro-info, copyright */
  --text-sm: 0.875rem;      /* 14px — légendes, méta */
  --text-base: 1rem;        /* 16px — corps de texte standard */
  --text-md: 1.0625rem;     /* 17px — corps de texte éditorial */
  --text-lg: 1.25rem;       /* 20px — accroches, lead */
  --text-xl: 1.5rem;        /* 24px — H4 */
  --text-2xl: 2rem;         /* 32px — H3 */
  --text-3xl: 2.5rem;       /* 40px — H2 */
  --text-4xl: 3.5rem;       /* 56px — H1 mobile */
  --text-5xl: 4.5rem;       /* 72px — H1 desktop large */


  /* --- Espacements (système 4px) ----------------------------------------- */

  --space-1: 0.25rem;       /* 4px */
  --space-2: 0.5rem;        /* 8px */
  --space-3: 0.75rem;       /* 12px */
  --space-4: 1rem;          /* 16px */
  --space-5: 1.5rem;        /* 24px */
  --space-6: 2rem;          /* 32px */
  --space-7: 3rem;          /* 48px */
  --space-8: 4rem;          /* 64px */
  --space-9: 6rem;          /* 96px */
  --space-10: 8rem;         /* 128px — sections généreuses */


  /* --- Breakpoints (utilisés via @media) --------------------------------- */
  /* Variables de référence — non utilisables dans @media en CSS pur,
     mais documentées ici pour cohérence */

  --bp-mobile: 480px;
  --bp-tablet: 768px;
  --bp-desktop: 1024px;
  --bp-wide: 1280px;


  /* --- Layout ------------------------------------------------------------ */

  --max-width: 1280px;        /* Largeur max contenu principal */
  --max-width-narrow: 720px;  /* Largeur max texte éditorial (lecture optimale) */


  /* --- Effets ------------------------------------------------------------ */

  --transition-fast: 0.15s ease-out;
  --transition-base: 0.25s ease-out;
  --transition-slow: 0.4s ease-out;

  --shadow-sm: 0 1px 2px rgba(26, 43, 64, 0.08);
  --shadow-md: 0 4px 12px rgba(26, 43, 64, 0.12);
  --shadow-lg: 0 12px 32px rgba(26, 43, 64, 0.18);


  /* --- Border-radius ----------------------------------------------------- */

  --radius-sm: 2px;          /* Boutons, tags */
  --radius-md: 4px;          /* Cartes */
  --radius-lg: 12px;         /* Sections principales */
  --radius-full: 999px;      /* Pills, avatars */
}


/* ==========================================================================
   2. RESET ET BASES GLOBALES
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-creme);
  font-feature-settings: "ss01", "ss02"; /* Inter — chiffres tabulaires */
  text-rendering: optimizeLegibility;
}

img, picture, video, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}


/* ==========================================================================
   3. TYPOGRAPHIE
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-anthracite);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
}

h1 {
  font-size: var(--text-4xl);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

@media (min-width: 768px) {
  h1 {
    font-size: var(--text-5xl);
  }
}

h2 {
  font-size: var(--text-3xl);
  font-weight: 500;
}

h3 {
  font-size: var(--text-2xl);
  font-weight: 500;
}

h4 {
  font-size: var(--text-xl);
  font-weight: 500;
}

/* Italiques d'accent — Fraunces shine en italique */
em, .italic {
  font-style: italic;
}

/* Accent doré dans les titres — usage : <h1>La France est <em>vivante</em></h1> */
h1 em, h2 em, h3 em {
  color: var(--color-or);
  font-style: italic;
  font-weight: 400;
}

/* Lead — accroche après un titre */
.lead {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--color-text);
  max-width: var(--max-width-narrow);
}

/* Eyebrow — petit label au-dessus d'un titre */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-bordeaux);
  margin-bottom: var(--space-3);
  display: block;
}

.eyebrow-or {
  color: var(--color-or);
}

/* Paragraphes */
p {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.7;
  color: var(--color-text);
  max-width: var(--max-width-narrow);
}

p strong {
  font-weight: 600;
  color: var(--color-anthracite);
}

/* Liens dans le corps de texte */
p a, .link {
  color: var(--color-bordeaux);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

p a:hover, .link:hover {
  color: var(--color-bordeaux-light);
}


/* ==========================================================================
   4. COMPOSANTS — BOUTONS
   ========================================================================== */

/* Bouton principal — bordeaux, pour les CTA forts (Écouter, S'abonner) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background-color: var(--color-bordeaux);
  color: var(--color-creme);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn-primary:hover {
  background-color: var(--color-bordeaux-light);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Triangle play pour bouton "Écouter en direct" */
.btn-primary .play-triangle {
  width: 0;
  height: 0;
  border-left: 8px solid var(--color-creme);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

/* Bouton secondaire — outline, pour les actions secondaires */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background-color: transparent;
  color: var(--color-anthracite);
  border: 1px solid var(--color-anthracite);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background-color: var(--color-anthracite);
  color: var(--color-creme);
}

/* Variante sur fond sombre */
.btn-secondary.on-dark {
  color: var(--color-creme);
  border-color: var(--color-creme);
}

.btn-secondary.on-dark:hover {
  background-color: var(--color-creme);
  color: var(--color-anthracite);
}

/* Bouton lien — texte avec flèche, sans fond */
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--color-bordeaux);
  letter-spacing: 0.04em;
  transition: gap var(--transition-fast);
}

.btn-link::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.btn-link:hover {
  gap: var(--space-3);
}

.btn-link:hover::after {
  transform: translateX(4px);
}


/* ==========================================================================
   5. COMPOSANTS — CARTES
   ========================================================================== */

/* Carte standard — fond crème sur section claire */
.card {
  background-color: var(--color-creme);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.card:hover {
  border-color: var(--color-or);
  transform: translateY(-2px);
}

/* Carte sombre — fond anthracite, sur section nuit */
.card-dark {
  background-color: var(--color-anthracite);
  border: 1px solid rgba(200, 169, 110, 0.15);
  color: var(--color-creme);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.card-dark:hover {
  border-color: var(--color-or);
  transform: translateY(-2px);
}

.card-dark h3, .card-dark h4 {
  color: var(--color-creme);
}

.card-dark p {
  color: var(--color-creme);
  opacity: 0.8;
}


/* ==========================================================================
   6. COMPOSANTS — TAGS, FILETS, SÉPARATEURS
   ========================================================================== */

/* Tag d'émission ou de catégorie */
.tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-or);
  border: 1px solid var(--color-or);
  border-radius: var(--radius-sm);
}

.tag.tag-bordeaux {
  color: var(--color-bordeaux);
  border-color: var(--color-bordeaux);
}

.tag.tag-filled {
  background-color: var(--color-or);
  color: var(--color-anthracite);
  border-color: var(--color-or);
}

/* Filet horizontal en or — séparateur signature de la marque */
.rule-or {
  width: 60px;
  height: 1px;
  background-color: var(--color-or);
  border: none;
  margin: var(--space-5) auto;
}

.rule-or.left { margin-left: 0; }

/* Séparateur de section discret */
.rule-section {
  width: 100%;
  height: 1px;
  background-color: var(--color-border);
  border: none;
  margin: var(--space-8) 0;
}


/* ==========================================================================
   7. INDICATEUR LIVE — pulse rouge cerise
   ========================================================================== */

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background-color: var(--color-bordeaux);
  color: var(--color-creme);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-creme);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}


/* ==========================================================================
   8. UTILITAIRES — CONTAINERS, SECTIONS
   ========================================================================== */

/* Container principal — toutes les sections de contenu */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--space-7);
    padding-right: var(--space-7);
  }
}

/* Container narrow — pour articles éditoriaux (lecture optimale ~70 caractères) */
.container-narrow {
  width: 100%;
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

/* Section générique */
.section {
  padding-top: var(--space-9);
  padding-bottom: var(--space-9);
}

@media (min-width: 768px) {
  .section {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
  }
}

.section-creme { background-color: var(--color-creme); }
.section-paper { background-color: #FBF9F4; }   /* Crème légèrement plus chaude */
.section-anthracite {
  background-color: var(--color-anthracite);
  color: var(--color-creme);
}
.section-anthracite-deep {
  background-color: var(--color-anthracite-deep);
  color: var(--color-creme);
}

.section-anthracite h1, .section-anthracite h2, .section-anthracite h3,
.section-anthracite-deep h1, .section-anthracite-deep h2, .section-anthracite-deep h3 {
  color: var(--color-creme);
}

.section-anthracite p,
.section-anthracite-deep p {
  color: var(--color-creme);
  opacity: 0.85;
}


/* ==========================================================================
   9. UTILITAIRES — HELPERS DIVERS
   ========================================================================== */

.text-center { text-align: center; }
.text-or { color: var(--color-or); }
.text-bordeaux { color: var(--color-bordeaux); }
.text-creme { color: var(--color-creme); }

.mt-0 { margin-top: 0; }
.mt-3 { margin-top: var(--space-3); }
.mt-5 { margin-top: var(--space-5); }
.mt-7 { margin-top: var(--space-7); }
.mt-9 { margin-top: var(--space-9); }

.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: var(--space-3); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-7 { margin-bottom: var(--space-7); }
.mb-9 { margin-bottom: var(--space-9); }

/* Accessibilité — caché visuellement mais lu par les lecteurs d'écran */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-link — accessibilité clavier */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-anthracite);
  color: var(--color-creme);
  padding: var(--space-3) var(--space-5);
  z-index: 1000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}
