/* ============================================================
   style.css — Famille Raguin
   Feuille de style centralisée : variables, base typographique,
   format "page simple" et format "roadbook" (tableau jour par jour).
   À inclure dans index.html ET dans chaque page chargée en iframe.
   ============================================================ */

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

:root {
  --nav-h: 66px;
  --accent: #2ea3f2;
  --text: #333;
  --text-muted: rgba(0,0,0,0.6);
  --bg: #fff;
  --border: rgba(0,0,0,0.1);
  --font: 'Open Sans', Arial, sans-serif;
}

html, body {
  font-family: var(--font);
  font-size: 14px;
  color: #666;
  background: var(--bg);
  max-width: 100%;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

/* ============================================================
   NAVIGATION (menu adaptatif, utilisé uniquement par index.html)
   ============================================================ */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: #fff;
  box-shadow: 0 1px 0 var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 30px;
  gap: 0;
}

.nav-brand {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  margin-right: 10px;
}

.nav-links {
  display: flex;
  align-items: stretch;
  list-style: none;
  height: var(--nav-h);
}

.nav-item {
  position: relative;
  display: flex;
  align-items: stretch;
}

.nav-item > a, .nav-item > span {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 11px;
  height: 100%;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
  user-select: none;
}
.nav-item > a:hover,
.nav-item > span:hover { opacity: 0.7; }

.chevron {
  font-size: 0.6rem;
  font-family: ETmodules, Arial;
}

.submenu {
  display: none;
  position: absolute;
  top: calc(var(--nav-h) - 1px);
  left: 0;
  min-width: 200px;
  background: #fff;
  border-top: 3px solid var(--accent);
  list-style: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 9999;
  padding: 20px 0;
}
@media (hover: hover) and (pointer: fine) {
  .nav-item:hover .submenu { display: block; }
}
.nav-item:focus-within .submenu,
.nav-item.open .submenu { display: block; }

.submenu li a {
  display: block;
  padding: 6px 20px;
  width: 200px;
  font-size: 14px;
  font-weight: 400;
  color: #666;
  text-decoration: none;
  transition: opacity 0.2s, background-color 0.2s;
}
.submenu li a:hover {
  background-color: rgba(0,0,0,0.03);
  opacity: 0.7;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: #333;
  margin-left: auto;
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  nav { justify-content: space-between; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: #fff;
    border-top: 3px solid var(--accent);
    padding: 5%;
    overflow-y: auto;
    max-height: calc(100vh - var(--nav-h));
    z-index: 99;
    height: auto;
  }
  .nav-links.open .nav-item { width: 100%; }
  .nav-item > a, .nav-item > span { height: auto; padding: 10px 5%; border-bottom: 1px solid rgba(0,0,0,0.03); }
  .submenu { position: static; border: none; box-shadow: none; padding: 0 0 0 10px; display: block; }
  .submenu li a { width: 100%; }
}

/* ============================================================
   FORMAT "PAGE SIMPLE"
   Conteneur générique pour du texte courant (comme la page Japon,
   Ecosse, etc.) : marge de lecture confortable, titres cohérents.
   ============================================================ */

.page-simple {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.page-simple h1 {
  font-family: var(--font);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6em;
}

.page-simple h2 {
  font-family: var(--font);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.6em 0 0.6em;
}

.page-simple p {
  line-height: 1.7;
  margin-bottom: 1em;
}

.page-simple a {
  color: var(--accent);
  text-decoration: none;
}
.page-simple a:hover { text-decoration: underline; }

/* ============================================================
   FORMAT "ROADBOOK"
   Tableau jour par jour : Jour / Description / Lieu le soir /
   Heures et Km de route. Bascule en "cartes" empilées sur mobile.
   ============================================================ */

.roadbook {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.roadbook h1 {
  font-family: var(--font);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3em;
}

.roadbook .subtitle {
  color: var(--text-muted);
  margin-bottom: 1.8em;
  font-size: 0.95rem;
}

.roadbook table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
}

.roadbook td, .roadbook th {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.roadbook thead th {
  text-align: left;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 12px 14px;
}

.roadbook thead th:first-child { border-radius: 4px 0 0 0; }
.roadbook thead th:last-child  { border-radius: 0 4px 0 0; }

.roadbook tbody tr {
  border-bottom: 1px solid var(--border);
}
.roadbook tbody tr:nth-child(even) { background: rgba(0,0,0,0.02); }

.roadbook tbody td {
  padding: 14px;
  vertical-align: top;
  line-height: 1.6;
}

.roadbook td.jour {
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.roadbook td.lieu {
  font-weight: 600;
  color: var(--text);
}

.roadbook td.trajet {
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── RESPONSIVE : cartes empilées sous 680px ── */
@media (max-width: 680px) {
  .roadbook table, .roadbook thead, .roadbook tbody, .roadbook th, .roadbook td, .roadbook tr {
    display: block;
  }
  .roadbook thead { display: none; }

  .roadbook tbody tr {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 14px;
    padding: 14px;
  }
  .roadbook tbody tr:nth-child(even) { background: #fff; }

  .roadbook tbody td {
    padding: 4px 0;
    border: none;
  }

  .roadbook td.jour {
    font-size: 1.05rem;
    margin-bottom: 4px;
  }

  .roadbook td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    margin-top: 8px;
  }
  .roadbook td.jour::before { display: none; }
}

/* ============================================================
   DÉTAIL DES JOURNÉES
   Bloc par jour sous le tableau : triangle vert + titre,
   puis texte courant et listes à puces.
   ============================================================ */

.day-detail {
  max-width: 700px;
  margin: 50px auto 0;
}

.day-detail + .day-detail {
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.day-detail__title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.day-detail__title::before {
  content: "▲";
  color: #4CAF50;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.day-detail p {
  line-height: 1.7;
  margin-bottom: 1em;
}

.day-detail ul {
  list-style: none;
  margin: 0 0 1em;
  padding: 0;
}

.day-detail ul li {
  position: relative;
  padding-left: 18px;
  line-height: 1.7;
  margin-bottom: 6px;
}

.day-detail ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.day-detail ul ul {
  margin-top: 6px;
}
.day-detail ul ul li::before {
  content: "–";
  color: var(--text-muted);
}

@media (max-width: 680px) {
  .day-detail {
    padding: 0 14px;
  }
}

/* ============================================================
   IMAGES "ZOOMABLE"
   Effet d'apparition (fondu + léger agrandissement) et clic pour
   afficher en grand avec zoom. Nécessite lightbox.js.
   Usage : <img class="zoomable" src="..." alt="...">
   ============================================================ */

.zoomable {
  max-width: 600px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.5s ease, transform 0.5s ease;
  cursor: zoom-in;
  border-radius: 4px;
}

.zoomable.zoomable--visible {
  opacity: 1;
  transform: scale(1);
}

.zoomable:hover {
  transform: scale(1.015);
}

/* ── Overlay plein écran ── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  overflow: auto;
  cursor: zoom-out;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  touch-action: pinch-zoom;
  transition: transform 0.25s ease;
  cursor: zoom-in;
}

.lightbox-overlay img.lightbox-zoomed {
  max-width: none;
  max-height: none;
  cursor: grab;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 10001;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }

/* ============================================================
   Coeurs de notation (♥♥♥♥)
   ============================================================ */
 
.heart {
  color: #e0245e;
  letter-spacing: 1px;
}
