/* ==========================================================================
   France Dispatch — Feuille de style principale
   --------------------------------------------------------------------------
   Site statique classique (HTML/CSS/JS) prévu pour un hébergement mutualisé.
   Organisation du fichier :
     1. Variables de couleurs et réglages généraux
     2. Réinitialisation et bases typographiques
     3. Utilitaires réutilisables (conteneur, grilles, boutons, cartes)
     4. En-tête et navigation
     5. Bandeaux (hero) et sections de contenu
     6. Composants spécifiques (formules, tableau, blog, formulaires)
     7. Pied de page
     8. Adaptations mobile (media queries)
   ========================================================================== */

/* ----------------------------------------------------
   1. Variables — couleurs de la charte France Dispatch
   ---------------------------------------------------- */
:root {
  --rouge: #c0392b;        /* rouge principal de la plaquette */
  --rouge-fonce: #9e2e22;  /* survol des boutons rouges */
  --jaune: #e0a82e;        /* jaune / or des bandes diagonales */
  --marine: #243654;       /* bleu marine des fonds sombres */
  --marine-fonce: #1a2740;

  --texte: #16202e;
  --texte-doux: #5b6675;
  --bordure: #e4e8ee;
  --fond: #ffffff;
  --fond-doux: #f6f8fa;

  --rayon: 10px;
  --largeur-max: 1200px;
  --ombre: 0 2px 10px rgba(20, 30, 45, 0.06);
}

/* -------------------------------------------
   2. Réinitialisation + bases typographiques
   ------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  color: var(--texte);
  background: var(--fond);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

h1 { font-size: 2.6rem; font-weight: 900; }
h2 { font-size: 1.9rem; font-weight: 900; }
h3 { font-size: 1.15rem; font-weight: 800; }

p { margin: 0 0 1rem; }

a { color: var(--rouge); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; }

/* Lien d'évitement pour l'accessibilité (visible au clavier uniquement) */
.lien-evitement {
  position: absolute;
  left: -9999px;
  background: var(--marine);
  color: #fff;
  padding: 0.6rem 1rem;
}
.lien-evitement:focus { left: 1rem; top: 1rem; z-index: 100; }

/* --------------------------------
   3. Utilitaires réutilisables
   -------------------------------- */

/* Conteneur centré, utilisé sur toutes les pages */
.conteneur {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Espacements verticaux de section */
.section { padding: 4.5rem 0; }
.section--douce { background: var(--fond-doux); }
.section--marine { background: var(--marine); color: #fff; }

/* Petit intitulé au-dessus des titres ("sur-titre") */
.surtitre {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rouge);
}
.section--marine .surtitre { color: var(--jaune); }

.texte-doux { color: var(--texte-doux); }
.centre { text-align: center; }
.limite-texte { max-width: 44rem; }

/* Grilles simples : 2, 3 ou 4 colonnes qui se replient en mobile */
.grille { display: grid; gap: 1.25rem; }
.grille--2 { grid-template-columns: repeat(2, 1fr); }
.grille--3 { grid-template-columns: repeat(3, 1fr); }
.grille--4 { grid-template-columns: repeat(4, 1fr); }

/* Cartes de contenu */
.carte {
  background: var(--fond);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 1.5rem;
  box-shadow: var(--ombre);
}
.carte h3 { margin-bottom: 0.4rem; }
.carte p:last-child { margin-bottom: 0; }

/* Pastille d'icône (carré arrondi coloré) */
.pastille {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(192, 57, 43, 0.1);
  color: var(--rouge);
  margin-bottom: 0.9rem;
}
.pastille--pleine { background: var(--rouge); color: #fff; }
.pastille svg { width: 20px; height: 20px; }

/* Boutons */
.bouton {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--rayon);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.bouton:hover { text-decoration: none; }
.bouton--rouge { background: var(--rouge); color: #fff; }
.bouton--rouge:hover { background: var(--rouge-fonce); }
.bouton--jaune { background: var(--jaune); color: var(--marine); }
.bouton--jaune:hover { background: #fff; }
.bouton--blanc { background: #fff; color: var(--rouge); }
.bouton--blanc:hover { background: var(--jaune); color: var(--marine); }
.bouton--contour { border-color: var(--bordure); color: var(--texte); background: #fff; }
.bouton--contour:hover { border-color: var(--rouge); color: var(--rouge); }
.bouton--contour-clair { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.bouton--contour-clair:hover { background: rgba(255, 255, 255, 0.12); }
.bouton[disabled] { opacity: 0.65; cursor: not-allowed; }
.bouton--large { width: 100%; justify-content: center; }

/* Étiquettes / puces d'information */
.etiquette {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Bande diagonale décorative (rappel de la plaquette commerciale) */
.bande-diagonale { clip-path: polygon(0 15%, 100% 0, 100% 85%, 0 100%); }

/* ------------------------------
   4. En-tête et navigation
   ------------------------------ */
.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--bordure);
  backdrop-filter: blur(8px);
}
.entete__barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 68px;
}
.entete__logo img { height: 42px; width: auto; display: block; }

.navigation { display: flex; align-items: center; gap: 0.15rem; }
.navigation a {
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(22, 32, 46, 0.8);
}
.navigation a:hover { background: var(--fond-doux); color: var(--texte); text-decoration: none; }
/* La classe "actif" est posée à la main dans chaque page sur le lien courant */
.navigation a.actif { color: var(--rouge); background: var(--fond-doux); }

.entete__actions { display: flex; align-items: center; gap: 0.5rem; }

/* Bouton hamburger : masqué sur grand écran, affiché en mobile */
.bouton-menu {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--texte);
}

/* Menu déroulant mobile (ouvert/fermé via assets/js/main.js) */
.menu-mobile {
  display: none;
  border-top: 1px solid var(--bordure);
  background: #fff;
}
.menu-mobile.ouvert { display: block; }
.menu-mobile a {
  display: block;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--bordure);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--texte);
}
.menu-mobile .bouton { margin-top: 0.9rem; }

/* ------------------------------------
   5. Bandeaux (hero) et sections
   ------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--marine), var(--marine-fonce));
  color: #fff;
}
/* Voile rouge en diagonale à droite */
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 60%;
  background: rgba(192, 57, 43, 0.28);
  clip-path: polygon(0 15%, 100% 0, 100% 85%, 0 100%);
}
/* Bande jaune en bas du bandeau */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 34px;
  background: var(--jaune);
  clip-path: polygon(0 15%, 100% 0, 100% 85%, 0 100%);
}
.hero__contenu { position: relative; padding: 5rem 0 5.5rem; }
.hero--page .hero__contenu { padding: 4rem 0 4.5rem; }
.hero p { color: rgba(255, 255, 255, 0.85); }
.hero .surtitre { color: var(--jaune); }
.hero__accroche { font-size: 1.1rem; max-width: 36rem; }
.hero__mise-en-avant { color: var(--jaune); }
.hero__grille { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 0; }
.hero__preuves {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 2.2rem;
  font-size: 0.87rem;
  color: rgba(255, 255, 255, 0.75);
}
.hero__preuves span { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero__preuves svg { width: 16px; height: 16px; color: var(--jaune); }

/* Encart "dispatch en cours" illustrant le tableau de bord (page d'accueil) */
.tableau-dispatch {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1.5rem;
}
.tableau-dispatch__ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  margin-top: 0.7rem;
}
.tableau-dispatch__type {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(192, 57, 43, 0.25);
  color: var(--jaune);
  font-size: 0.75rem;
  font-weight: 800;
}
.tableau-dispatch__etat {
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
}
.etat--jaune { background: var(--jaune); color: var(--marine); }
.etat--rouge { background: var(--rouge); color: #fff; }
.etat--neutre { background: rgba(255, 255, 255, 0.2); color: #fff; }

/* ------------------------------------------
   6. Composants spécifiques
   ------------------------------------------ */

/* Cartes de formules */
.formule { border: 1px solid var(--bordure); border-radius: 14px; padding: 1.6rem; background: #fff; }
.formule--phare {
  background: var(--rouge);
  border-color: var(--rouge);
  color: #fff;
  box-shadow: 0 12px 28px rgba(192, 57, 43, 0.25);
}
.formule--phare .formule__horaires { color: var(--jaune); }
.formule--phare p { color: rgba(255, 255, 255, 0.85); }
.formule__categorie {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texte-doux);
}
.formule--phare .formule__categorie { color: var(--jaune); }
.formule__horaires { font-weight: 700; font-size: 0.9rem; color: var(--rouge); margin: 0.4rem 0 0.6rem; }

/* Tableau comparatif des formules */
.tableau-enveloppe { overflow-x: auto; border: 1px solid var(--bordure); border-radius: 14px; }
.tableau-comparatif { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tableau-comparatif th,
.tableau-comparatif td { padding: 0.85rem 1rem; text-align: center; }
.tableau-comparatif thead th { background: var(--fond-doux); font-weight: 800; }
.tableau-comparatif th:first-child,
.tableau-comparatif td:first-child { text-align: left; }
.tableau-comparatif .colonne-phare { background: var(--rouge); color: #fff; }
.tableau-comparatif tbody tr:nth-child(even) { background: rgba(20, 30, 45, 0.025); }
.tableau-comparatif td.cellule-phare { background: rgba(192, 57, 43, 0.05); }
.oui { color: var(--rouge); font-weight: 800; }
.non { color: rgba(91, 102, 117, 0.45); }

/* Liste à puces jaune (pages Services) */
.liste-puces { list-style: none; margin: 1.1rem 0 0; padding: 0; }
.liste-puces li { position: relative; padding-left: 1.1rem; margin-bottom: 0.6rem; font-size: 0.92rem; }
.liste-puces li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--jaune);
}

/* Cartes d'articles de blog */
.article-carte {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--bordure);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--ombre);
}
.article-carte__visuel {
  position: relative;
  height: 150px;
  background: linear-gradient(135deg, var(--rouge), var(--marine));
}
.article-carte__visuel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 22px;
  background: var(--jaune);
  clip-path: polygon(0 15%, 100% 0, 100% 85%, 0 100%);
}
.article-carte__categorie {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--rouge);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 800;
}
.article-carte__corps { padding: 1.3rem; display: flex; flex-direction: column; flex: 1; }
.article-carte__date { font-size: 0.75rem; color: var(--texte-doux); }

/* Filtres du blog (boutons pastilles) */
.filtres { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filtres button {
  border: 1px solid var(--bordure);
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--texte-doux);
}
.filtres button:hover { border-color: var(--rouge); color: var(--rouge); }
.filtres button.actif { background: var(--rouge); border-color: var(--rouge); color: #fff; }

/* Liens vers les plateformes d'annonces */
.liens-plateformes { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.8rem; }
.liens-plateformes a {
  border: 1px solid var(--bordure);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--texte);
  background: #fff;
}
.liens-plateformes a:hover { border-color: var(--rouge); color: var(--rouge); text-decoration: none; }

/* Formulaires */
.formulaire {
  border: 1px solid var(--bordure);
  border-radius: 14px;
  background: #fff;
  padding: 1.8rem;
  box-shadow: var(--ombre);
}
.champ { margin-bottom: 1rem; }
.champ label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 0.35rem; }
.champ input,
.champ select,
.champ textarea {
  width: 100%;
  border: 1px solid var(--bordure);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: var(--texte);
}
.champ input:focus,
.champ select:focus,
.champ textarea:focus { outline: 2px solid rgba(192, 57, 43, 0.35); border-color: var(--rouge); }
/* Message d'erreur affiché par le JavaScript de validation */
.champ .erreur { display: none; margin: 0.3rem 0 0; font-size: 0.78rem; color: var(--rouge); }
.champ.invalide .erreur { display: block; }
.champ.invalide input,
.champ.invalide textarea { border-color: var(--rouge); }

/* Champ piège anti-spam : invisible pour l'utilisateur, rempli par les robots */
.piege-antispam { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Message de confirmation d'envoi */
.message-succes {
  display: none;
  margin-top: 1rem;
  border: 1px solid var(--jaune);
  background: rgba(224, 168, 46, 0.18);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 0.88rem;
}
.message-succes.visible { display: block; }

/* Encart d'appel à l'action en bas de page */
.appel-action {
  border-radius: 16px;
  background: linear-gradient(135deg, var(--rouge), var(--rouge-fonce));
  color: #fff;
  padding: 3rem 2.5rem;
}
.appel-action h2 { margin-bottom: 0.6rem; }
.appel-action p { color: rgba(255, 255, 255, 0.88); }
.appel-action__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.4rem; }

.appel-action--marine { background: var(--marine); }

/* Pages légales : colonne de texte étroite et lisible */
.page-texte { max-width: 46rem; }
.page-texte h2 { font-size: 1.2rem; margin-top: 2rem; }

/* --------------------
   7. Pied de page
   -------------------- */
.pied {
  margin-top: 4rem;
  background: var(--marine);
  color: #fff;
}
.pied a { color: rgba(255, 255, 255, 0.75); }
.pied a:hover { color: var(--jaune); text-decoration: none; }
.pied__grille {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding: 3.5rem 0;
}
.pied__logo { display: inline-block; background: #fff; border-radius: 10px; padding: 0.7rem; }
.pied__logo img { height: 54px; width: auto; display: block; }
.pied p { color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; }
.pied h3 { font-size: 0.85rem; margin-bottom: 0.8rem; }
.pied ul { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.pied li { margin-bottom: 0.45rem; }
.pied__coordonnees { margin-top: 1.2rem; font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); }
.pied__bas {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
}
.pied__bas .conteneur {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

/* --------------------------------------
   8. Adaptations mobile / tablette
   -------------------------------------- */
@media (max-width: 1024px) {
  /* Navigation horizontale remplacée par le menu hamburger */
  .navigation,
  .entete__actions { display: none; }
  .bouton-menu { display: block; }

  .hero__grille { grid-template-columns: 1fr; }
  .hero__illustration { display: none; }
  .grille--4 { grid-template-columns: repeat(2, 1fr); }
  .grille--3 { grid-template-columns: repeat(2, 1fr); }
  .pied__grille { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .section { padding: 3rem 0; }
  .grille--2,
  .grille--3,
  .grille--4 { grid-template-columns: 1fr; }
  .pied__grille { grid-template-columns: 1fr; gap: 2rem; }
  .appel-action { padding: 2rem 1.5rem; }
}
