/* Déclaration des variables globales */
:root {
  --couleur-accent: #c1440e;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
}

/* =======================
   TITRES et SOUS-TITRES
   ======================= */
/* Marge de défilement côté haut : évite que le fil d'ariane couvre le titre lors d'un clic sur un lien */
   h2, h3, h4 {
  scroll-margin-top: 80px;
}

/* H1 : titre principal d’article */
.article-branche h1,
.article-feuille h1 {
  font-size: 2.1rem;
  margin: 1.2em 0 0.6em;
  color: #2d3a4a;
  font-weight: 700;
  line-height: 1.2;
}

/* H2 : sections principales (liées au sommaire) */
.article-branche h2,
.article-feuille h2 {
  font-size: 1.6rem;
  margin: 1.5em 0 0.6em;
  color: #3a506b;
  border-left: 4px solid #c1440e;
  padding-left: 0.6em;
  font-weight: 600;
}

/* H3 : sous-sections */
.article-branche h3,
.article-feuille h3 {
  font-size: 1.3rem;
  margin: 1.2em 0 0.5em;
  color: #455a64;
  padding-left: 0.4em;
  border-left: 3px solid #c1440e55;
  font-weight: 500;
}

/* H4 : titres plus discrets */
.article-branche h4,
.article-feuille h4 {
  font-size: 1.15rem;
  margin: 1em 0 0.4em;
  color: #5c6f7a;
  padding-left: 0.3em;
  border-left: 2px solid #c1440e33;
  font-weight: 500;
}

/* UL : listes */
p:has(+ ul) {
  margin-bottom: 0.2em;
}
ul, ol {
  padding-top: 0.0em;
  margin-top: 0.0em;
}

.conteneur {
  margin: 0 auto;
  width: 98%;
}

/* =======================
   BANNIERE DU SITE
   ======================= */
header {
  /* position relative pour placer le menu déroulant mobile en-dessous */
  position: relative;
  z-index: 2000;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background-color: #c1440e;
  color: #f5f2e7;
  margin: 0.5em 0;
  padding: 1em 2em;
  min-height: 6rem;
}

.titre {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1em; /* espace entre logo et texte */
}

.titre .logo {
    height: 80px;
    background-color: #f8f8f2;
    display: block;
}

.titre .nom-site {
    line-height: 1;       /* évite un décalage vertical inutile */
    font-size: 1.5rem;
    font-weight: bold;
    color: #f5f2e7;
}

/* ==============
   NAVIGATION
   ============== */
.nav-ppal .menu {
    list-style: none;
    display: flex;
    gap: 1.5em;
}

.nav-ppal .menu a {
  font-size: 1.2rem;
  text-decoration: none;
  color: #f8f8f2;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-ppal .menu a:hover {
  color: #f5c518;
}

.millefeuille {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: #f8f8f2;
    cursor: pointer;
}

/* ==============
   FIL d'ARIANE
   ============== */
.fildariane {
  position: sticky;
  top: 0;
  z-index: 10; /* plus bas que menu */
  font-family: sans-serif;
  font-size: 1.1rem;
  background: #fff;   /* Légèrement ouvert, pas opaque */
  border-bottom: 1px solid #dfd4d4;
  padding: 0.5rem 0 0.7rem 0;
  margin: 1em 0;
}

.fildariane ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
}

.fildariane li {
  display: flex;
  align-items: center;
}

.fildariane li + li::before {
  content: "›"; /* séparateur entre éléments */
  color: #999;
  margin: 0 0.5em;
}

.fildariane a {
  color: #0066cc;
  text-decoration: none;
}

.fildariane a:hover {
  text-decoration: underline;
}

.fildariane li.active {
  font-weight: bold;
  color: #333;
  pointer-events: none; /* empêche le curseur "main" si jamais un lien restait */
  cursor: default;
}

/* =======
   CARTE
   ======= */
.carte {
    display: flex;
    flex-direction: row;
    max-width: 1200px;
    margin: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
/* Style de la partie texte */
.carte-texte {
    width: 33%; /* 1/3 de la largeur */
    padding: 16px;
    background-color: #f9f9f9;
    font-size: 1rem;
}
/* Style du titre de la carte */
.carte-texte h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: #3a506b;
    font-weight: 600;
}
/* Style de l'image */
.carte-image{
    width: 67%; /* 2/3 de la largeur */
    display: flex;
    align-items: center;
    background-color: white;
}
.carte-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Bouton lire la suite et icône associée */
  .bouton-lire-suite {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 18px;
    background-color: #3a506b;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
  }
  
  .bouton-lire-suite:hover {
    background-color: #5bc0be;
    transform: translateX(2px); /* effet de mouvement léger */
  }
  
  .bouton-lire-suite .fleche {
    margin-left: 8px;
    transition: margin-left 0.2s ease;
  }
  
  .bouton-lire-suite:hover .fleche {
    margin-left: 12px;
  }

/* ===========================
   PAGE AUXILIAIRE (CGU etc.)
   =========================== */
.page-auxiliaire {
  max-width: 720px;
  margin: 3rem auto;
  padding: 0 1.2rem;       /* évite que ça touche le bord sur mobile */
  line-height: 1.65;       /* lisibilité */
}

.page-auxiliaire h1 {
  margin-bottom: 1.5rem;
}

/* ================
   ARTICLE-BRANCHE
   ================ */
.article-branche {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: justify;
}

/* ================
   ARTICLE-FEUILLE
   ================ */
.article-feuille {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: justify;
}

/* ============
   ACCROCHE
   ============ */
/* Titre d'Accroche précédant le sommaire */
.accroche {
  background: linear-gradient(90deg, #fff1e6, #fffdf9);
  border-left: 5px solid #c1440e;
  margin: 0.2em 0 0.3em 0;
  padding: 0.8em 1.4em;
  font-size: 1.7rem;
  text-align: left;
  font-style: italic;
  color: #2f3e4e;
}

/* ==========
   SOMMAIRE
   ========== */
.sommaire {
  background: #fffdf9;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 0.5em 1.5em 1.5em 1.2em;
  margin: 0 0 2em 0;
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

/* ----- LISTES ----- */
.sommaire ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ----- NIVEAU 1 = H2 ----- */
.sommaire ul > li {
  margin: 0.6em 0;
  padding-left: 1.5em;
  position: relative;
  font-size: 1.1rem;
}

.sommaire ul > li::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #c1440e;
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 0.55em;
}

/* ----- NIVEAU 2 = H3 ----- */
.sommaire ul ul > li {
  margin: 0.4em 0;
  padding-left: 1.2em;
  position: relative;
  opacity: 0.85;
  font-size: 1rem
}

.sommaire ul ul > li::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #c1440e55; /* couleur plus discrète */
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 0.55em;
}

/* ----- NIVEAU 3 = H4 ----- */
.sommaire ul ul ul > li {
  margin: 0.3em 0;
  padding-left: 1em;
  opacity: 0.7;
}

.sommaire ul ul ul > li::before {
  content: "–"; /* tiret élégant */
  position: absolute;
  left: 0;
  top: 0.2em;
  color: #c1440e88;
  font-weight: 600;
}

/* ====================
   BOUTON standard
   ==================== */
.bouton-standard {
  display: block;
  width: fit-content; /* utilisation de l'espace disponible mais pas plus */
  margin: 0.7em auto;
  background: #c1440e;
  color: #fff;
  padding: 0.6em 1.2em;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.07);
}


.bouton-standard:hover {
  background: #a83c0c;
  transform: translateY(-2px);
}

.bouton-standard:active {
  transform: translateY(0);
}

/* ============
   SHORTCODES
   ============ */
/* SHORTCODES IMAGE */
.image-enligne {
  max-width: 800px;
  margin: 2rem auto;
  text-align: center;
}

.image-enligne img.enligne {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.image-habillee-gauche {
  max-width: 350px;
  float: left;
  margin: 0 1.6rem 1rem 0;
  text-align: center;
}

.image-habillee-droite {
  max-width: 350px;
  float: right;
  margin: 0 0 1rem 1.6rem;
  text-align: center;
}

.image-habillee-gauche img,
.image-habillee-droite img {
  display: block;
  width: 100%;
  height: auto;
}

.image-enligne figcaption,
.image-habillee-gauche figcaption,
.image-habillee-droite figcaption {
  font-size: 1rem;
  color: #444;
  margin-top: 0.6rem;
  line-height: 1.4;
}

.image-enligne .legende,
.image-habillee-gauche .legende,
.image-habillee-droite .legende {
  display: block;
}

.image-enligne .legende small,
.image-habillee-gauche .legende small,
.image-habillee-droite .legende small {
 font-size: 0.8rem;
}

/* Annule l'habillage (clear) pour que le texte reprenne sous l'image */
.clear {
  clear: both;
}

/* SHORTCODE TABLEAU des HORAIRES */
.horaires {
  border-collapse: collapse;
  width: max-content; /* largeur ajustée au contenu */
  margin: 0 0 1em 0;
}

.horaires td {
  border: none;        /* pas de grille */
  padding: 4px 8px;    /* espace entre les colonnes */
  text-align: left;
  vertical-align: top;
}

/* SHORTCODE TRAJET */
/* trajet de train avec durée et lien de réservation */
.trajet-train {
  margin: 1rem 0 1.5rem 0;
  line-height: 1;
}

.trajet-train__ligne {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
}

.trajet-train__ligne img {
  flex-shrink: 0;
}

.trajet-train__duree {
  margin: 0.35rem 0 0.55rem 0.5rem;
  color: #625f59;
  font-size: 0.95rem;
}

.trajet-train__reservation {
  margin-left: 0.5rem;
}

.trajet-train__reservation a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #c1440e;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.95rem;
}

.trajet-train__reservation img {
  flex-shrink: 0;
}


/* ===================
   PIED de PAGE
   =================== */
footer {
  color: #666;
  background: #f1f1f1;
  padding: 1em;
  margin-top: 1em;
}
footer hr {
    border: none;
    border-top: 1px solid #bbb;
    margin-bottom: 1rem;
}
.pdp-grille {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
}
.pdp-gauche {
  margin: 0.3rem 0;
  font-size: 0.85rem;
}
.pdp-droit {
  margin: 0.3rem 0;
  font-size: 1.1rem;
}
footer a {
  color: #555;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}
.pdp-droit a {
  margin-left: 0.5rem;
}
.pdp-droit a:first-child {
  margin-left: 0;
}


/* ===================
   STYLE ADAPTATIF
   =================== */
/* Style Adaptatif pour les écrans de taille intermédiaire */
@media (max-width: 1024px) {
  .carte {
      flex-direction: column;
  }
  .carte-texte,
  .carte-image {
      width: 100%;
  }
}

/* Style Adaptatif pour les petits écrans */
@media (max-width: 768px) {
  .nav-ppal .menu {
    display: none;
    flex-direction: column;
    position: absolute; /* se place par rapport à la bannière */
    z-index: 1000; /* au-dessus de tout */
    top: 100%; /* sous la bannière */
    left: 0; /* collé à gauche */
    width: 100%;
    background-color: #c1440e;
    margin: 0.2em 0;
    padding: 0.5em 0;
  }
  .nav-ppal .menu.ouvert {
    display: flex; /* le menu s'ouvre */
  }
  .nav-ppal .menu a {
    padding-left: 0.8em;
  }
  .millefeuille {
    display: block;
  }

}

/* ----- BANDEAU DE CONSENTEMENT (GA4) ----- */
.consentement {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  background: #fff;
  color: #222;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
  font-size: .95rem;
  line-height: 1.5;
}
.consentement[hidden] {
  display: none;
}
.consentement-texte {
  margin: 0 0 .75rem;
}
.consentement-texte a {
  color: var(--couleur-accent);
}
.consentement-boutons {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
/* Accepter et refuser ont exactement le même style (exigence CNIL) */
.consentement-bouton {
  flex: 1 1 10rem;
  padding: .6rem 1rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--couleur-accent);
  border: 2px solid var(--couleur-accent);
  border-radius: 4px;
  cursor: pointer;
}
.consentement-bouton:hover,
.consentement-bouton:focus-visible {
  color: var(--couleur-accent);
  background: #fff;
}
