/* ==========================================================================
   Carnets de Route — feuille de style
   Direction "Journal de bord" : encre, cachet de cire, laiton de navigation.
   ========================================================================== */

/* Piège à robots (honeypot) : champ invisible pour un visiteur humain (hors
   écran, pas display:none — trop facilement détecté par les bots) mais que
   les robots de spam remplissent aveuglément en soumettant le formulaire. */
.hp-field{
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

:root{
  --paper: #F4EEE0;
  --card: #FBF7EC;
  --ink: #211C15;
  --ink-soft: #6B6250;
  --indigo: #2D4159;
  --brass: #B8892E;
  --line: #E4DAC2;
  --danger: #A8432B;

  --st-nouveau: var(--brass);
  --st-update: var(--indigo);
  --st-chaud: var(--danger);
  --st-termine: #6B7A5E;

  --font-display: 'Petrona', Georgia, serif;
  --font-body: 'Karla', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; }
button, input, textarea, select{ font: inherit; color: inherit; }
h1, h2, h3, h4{ font-family: var(--font-display); margin: 0; text-wrap: balance; }
p{ margin: 0; }
ul, ol{ margin: 0; padding: 0; list-style: none; }

:focus-visible{ outline: 2px solid var(--indigo); outline-offset: 2px; }

/* Plusieurs éléments (modales, lightbox, panneaux latéraux) déclarent leur
   propre `display` pour se centrer/positionner une fois visibles ; sans cette
   règle, cette déclaration d'auteur l'emporte sur le `display: none` par
   défaut du navigateur pour `[hidden]`, et l'attribut `hidden` n'a alors plus
   aucun effet visuel (l'élément reste affiché même une fois "fermé"). */
[hidden]{ display: none !important; }

/* ---------- En-tête / navigation ---------- */

.site-header{
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 30;
}

.nav{
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding: 18px 24px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-link{
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover{ color: var(--ink); }
.nav-link.is-active{ color: var(--indigo); border-color: var(--brass); }

.nav-link--button{
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0 3px;
}

.nav-logout-form{ margin-left: auto; }

main{ min-height: 60vh; }

/* ---------- Pied de page ---------- */

.site-footer{
  border-top: 1px solid var(--line);
  margin-top: 90px;
}

.footer-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-name{
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 16px;
}

.footer-version{
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 400;
  font-size: 11px;
  color: var(--ink-soft);
  vertical-align: middle;
  margin-left: 4px;
}

.footer-contact{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
}

.footer-contact a{ text-decoration: none; color: var(--ink-soft); }
.footer-contact a:hover{ color: var(--indigo); }
.footer-sep{ margin: 0 8px; color: var(--line); }

/* ---------- Hero ---------- */

.hero-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 88px 24px 56px;
}

.hero-eyebrow{
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--brass);
}

.hero-title{
  font-style: italic;
  font-weight: 600;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
  margin: 14px 0 16px;
}

.hero-sub{
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 56ch;
}

.hero--photo{
  background-size: cover;
  background-position: center;
  min-height: min(66vh, 600px);
  display: flex;
  align-items: flex-end;
}

.hero--photo .hero-inner{ padding-bottom: 52px; }
.hero--photo .hero-eyebrow{ color: #E4C77E; }
.hero--photo .hero-title, .hero--photo .hero-sub{ color: #F8F5EC; }

/* ---------- Grille de voyages (accueil + listing) ---------- */

.entries{
  max-width: 1100px;
  margin: 0 auto;
  padding: 46px 24px 90px;
}

.trip-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.trip-card{
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.trip-card:hover{ box-shadow: 0 12px 26px rgba(33, 28, 21, 0.10); transform: translateY(-1px); }

.trip-card-link{
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.trip-card-image{
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--line);
  overflow: hidden;
}

.trip-card-image img{ width: 100%; height: 100%; object-fit: cover; }
.trip-card-image--empty{ background: linear-gradient(135deg, var(--line), #CBBB92); }

.trip-card-badge{
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--indigo);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 3px;
}

.trip-card-status{
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 20px;
  background: var(--ink-soft);
}

.trip-card-draft-badge{
  position: absolute;
  bottom: 14px;
  left: 12px;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 20px;
  background: var(--danger);
}

.trip-card-status--nouveau{ background: var(--st-nouveau); }
.trip-card-status--update{ background: var(--st-update); color: var(--paper); }
.trip-card-status--chaud{ background: var(--st-chaud); }
.trip-card-status--termine{ background: var(--st-termine); }

.trip-card-body{
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.trip-card-location{
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brass);
}

.trip-card-title{ font-weight: 600; font-size: 21px; line-height: 1.2; }
.trip-card-dates{ font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); }

.trip-card-meta{
  display: flex;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.trip-card-desc{ font-size: 14px; line-height: 1.55; color: var(--ink-soft); margin-top: 4px; }

.trip-card-status-form{ position: absolute; bottom: 14px; right: 14px; }

.trip-card-status-select{
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 20px;
  border: 1px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
}

.trip-card-status-select--nouveau{ background: var(--st-nouveau); border-color: var(--st-nouveau); }
.trip-card-status-select--update{ background: var(--st-update); color: var(--paper); border-color: var(--st-update); }
.trip-card-status-select--chaud{ background: var(--st-chaud); color: var(--paper); border-color: var(--st-chaud); }
.trip-card-status-select--termine{ background: var(--st-termine); color: var(--paper); border-color: var(--st-termine); }

.trip-card-delete{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(33, 28, 21, 0.6);
  color: var(--paper);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.trip-card-delete:hover{ background: var(--danger); }
.trip-card-delete:disabled{ opacity: 0.5; cursor: default; }

.trip-card-engagement{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.trip-card-vote{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.trip-card-vote:hover{ border-color: var(--brass); color: var(--brass); }
.trip-card-vote:disabled{ cursor: default; }
.trip-card-vote.is-voted{ background: var(--brass); border-color: var(--brass); color: var(--ink); }

.trip-card-vote-icon{ font-size: 10px; }
.trip-card-vote-count{ font-weight: 600; }
.trip-card-view-count{ opacity: 0.85; }

.empty-state{
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 50px 0;
  text-align: center;
}

/* ---------- Page d'erreur ---------- */

.error-page{
  max-width: 480px;
  margin: 0 auto;
  padding: 110px 24px 130px;
  text-align: center;
}

.error-code{
  display: block;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--brass);
  margin-bottom: 14px;
}

.error-title{
  font-style: italic;
  font-weight: 600;
  font-size: clamp(26px, 4vw, 36px);
  margin-bottom: 16px;
}

.error-text{
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 34px;
}

.error-actions{
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.error-actions a{ text-decoration: none; display: inline-block; }

/* ---------- Page listing (treks / bikepacking) ---------- */

.trips-page{ max-width: 1100px; margin: 0 auto; padding: 56px 24px 90px; }

.trips-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 28px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.trips-head h1{ font-style: italic; font-weight: 600; font-size: clamp(28px, 4.4vw, 40px); }

.trips-controls{ display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.trips-controls select{
  font-family: var(--font-body);
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--card);
}

#order-toggle{
  font-family: var(--font-mono);
  font-size: 15px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--card);
  cursor: pointer;
}

#scroll-sentinel{ height: 1px; }

/* ---------- Boutons ---------- */

.btn-primary{
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  background: var(--indigo);
  color: var(--paper);
  border: 1px solid var(--indigo);
  border-radius: 3px;
  padding: 10px 16px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-primary:hover{ opacity: 0.88; }

.btn-ghost{
  font-family: var(--font-mono);
  font-size: 13px;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 3px;
  padding: 8px 13px;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-ghost:hover{ background: var(--ink); color: var(--paper); }

.btn-ghost.is-active{ background: var(--ink); color: var(--paper); }

.btn-danger{
  font-family: var(--font-mono);
  font-size: 13px;
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 3px;
  padding: 8px 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-danger:hover{ background: var(--danger); color: var(--paper); }

/* ---------- Champs de formulaire / modales ---------- */

.field{ display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > span{ font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }

.field--checkbox{
  flex-direction: row;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.field--checkbox input{ width: 16px; height: 16px; flex-shrink: 0; }
.field--checkbox > span{ text-transform: none; letter-spacing: normal; font-family: var(--font-body); font-size: 14px; color: var(--ink); }

.field input, .field select, .field textarea{
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 10px 12px;
  background: var(--card);
  font-size: 15px;
}

.field input:focus, .field select:focus, .field textarea:focus{ border-color: var(--indigo); }

.field-row{ display: flex; gap: 16px; }
.field-row .field{ flex: 1; }

.field-hint{ font-size: 12px; color: var(--ink-soft); }
.field-hint a{ color: var(--indigo); text-decoration: underline; }

.modal{ position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop{ position: absolute; inset: 0; background: rgba(33, 28, 21, 0.55); }

.modal-panel{
  position: relative;
  background: var(--paper);
  border-radius: 6px;
  max-width: 520px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px 28px 28px;
  box-shadow: 0 20px 50px rgba(33, 28, 21, 0.28);
}

.modal-panel--wide{ max-width: 720px; }

.modal-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-head h2{ font-style: italic; font-weight: 600; font-size: 24px; }

.modal-close{
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 0;
}

.modal-close:hover{ color: var(--ink); }

.modal-actions{ display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.form-error{
  background: #F5E1DA;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 3px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 16px;
}

.duplicate-notice{
  background: var(--card);
  border: 1px solid var(--brass);
  color: var(--ink);
  border-radius: 3px;
  padding: 10px 16px;
  font-size: 13.5px;
  margin: 0 0 20px;
  text-align: center;
}

.type-picker{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.type-btn{
  font-family: var(--font-mono);
  font-size: 12.5px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 20px;
  padding: 7px 14px;
  cursor: pointer;
  color: var(--ink-soft);
}

.type-btn.is-active{ background: var(--indigo); border-color: var(--indigo); color: var(--paper); }

.image-row, .link-row{ display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.image-row .field, .link-row .field{ flex: 1; margin-bottom: 0; }

.btn-add-link{ margin-top: 4px; }

/* ---------- Page produits ---------- */

.products-page{ max-width: 1100px; margin: 0 auto; padding: 50px 24px 20px; }
.products-header{ display: flex; justify-content: flex-end; margin-bottom: 28px; }

.product-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }

.product-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card-image{ aspect-ratio: 16 / 10; background: var(--line); }
.product-card-image img{ width: 100%; height: 100%; object-fit: cover; }
.product-card-image--empty{ width: 100%; height: 100%; background: linear-gradient(135deg, var(--line), #CBBB92); }

.product-card-body{ padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card-title{ font-weight: 600; font-size: 19px; margin: 0; }
.product-card-dates{ font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); }
.product-card-desc{ font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.product-card-actions{ display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

.status-select, .status-badge{
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid transparent;
  color: var(--paper);
}

.status-select{ cursor: pointer; }
.status-select--en_projet, .status-badge--en_projet{ background: var(--ink-soft); }
.status-select--en_ecriture, .status-badge--en_ecriture{ background: var(--brass); }
.status-select--en_production, .status-badge--en_production{ background: var(--indigo); }
.status-select--publie, .status-badge--publie{ background: var(--st-termine); }
.status-select--rupture_stock, .status-badge--rupture_stock{ background: var(--danger); }

.contact-cta{
  max-width: 1100px;
  margin: 60px auto 0;
  padding: 44px 24px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.contact-cta h2{ font-style: italic; font-weight: 600; font-size: 26px; margin-bottom: 8px; }
.contact-cta p{ color: var(--ink-soft); margin-bottom: 14px; }
.contact-cta-links{ font-family: var(--font-mono); font-size: 13px; display: flex; justify-content: center; align-items: center; }
.contact-cta-links a{ color: var(--indigo); text-decoration: none; }

/* ---------- Page Contact ---------- */

.contact-page{ max-width: 720px; margin: 0 auto; padding: 40px 24px 100px; text-align: center; }

.contact-links-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.contact-link-card{
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.contact-link-card:hover{ border-color: var(--indigo); }

.contact-link-label{
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass);
}

.contact-link-value{ font-size: 15px; color: var(--indigo); word-break: break-word; }

/* ---------- Connexion admin ---------- */

.login-page{ max-width: 420px; margin: 0 auto; padding: 90px 24px 100px; }
.login-page h1{ font-style: italic; font-weight: 600; font-size: 30px; }
.login-form{ margin-top: 24px; }

/* ==========================================================================
   Page voyage — chronologie de jours et de chapitres
   ========================================================================== */

.trip-detail{ max-width: 900px; margin: 0 auto; padding: 0 24px 100px; }

.bleed{
  width: 100vw;
  max-width: 1400px;
  margin-left: 50%;
  transform: translateX(-50%);
}

.trip-detail-cover{
  position: relative;
  aspect-ratio: 21 / 9;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 40px;
  border-radius: 4px;
}
.trip-detail-cover img{ width: 100%; height: 100%; object-fit: cover; display: block; }

.trip-detail-cover::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 17, 12, 0) 35%, rgba(20, 17, 12, 0.82) 100%);
  pointer-events: none;
}

.trip-detail-head{ text-align: center; padding-bottom: 30px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.trip-detail-head .hero-eyebrow{ font-size: 11px; letter-spacing: 0.16em; }

.trip-detail-head--overlay{
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 80px 32px 32px;
  border-bottom: none;
  margin-bottom: 0;
}
.trip-detail-head--overlay .hero-eyebrow{ color: #E4C77E; }
.trip-detail-head--overlay .trip-detail-title{ color: #F8F5EC; }
.trip-detail-head--overlay .trip-detail-meta{ color: #DCD3BC; }
.trip-detail-head--overlay .trip-detail-meta span::after{ color: rgba(244, 238, 224, 0.35); }

.trip-detail-actions{ text-align: center; padding-bottom: 30px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }

.trip-detail-title{
  font-style: italic;
  font-weight: 600;
  font-size: clamp(30px, 4.6vw, 46px);
  margin: 12px 0 14px;
}

.trip-detail-meta{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
}

.trip-detail-meta span::after{ content: "·"; margin: 0 16px; color: var(--line); }
.trip-detail-meta span:last-child::after{ content: none; }

.trip-detail-actions-row{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.comments-jump{
  background: none;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 7px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink-soft);
}

.comments-jump:hover{ border-color: var(--indigo); color: var(--indigo); }

.trip-vote-btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 7px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink-soft);
}
.trip-vote-btn:hover{ border-color: var(--brass); color: var(--brass); }
.trip-vote-btn:disabled{ cursor: default; }
.trip-vote-btn.is-voted{ background: var(--brass); border-color: var(--brass); color: var(--ink); }
.trip-vote-icon{ font-size: 11px; }

.trip-view-count{
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
}

.trip-detail-delete{ margin-top: 20px; margin-left: 10px; border-radius: 20px; padding: 7px 16px; }

.draft-banner{
  max-width: 900px;
  margin: 0 auto 24px;
  padding: 12px 18px;
  border: 1px solid var(--danger);
  background: rgba(168, 67, 43, 0.08);
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: center;
  border-radius: 4px;
}

.carnet-open-btn{
  background: none;
  border: 1px solid var(--brass);
  border-radius: 20px;
  padding: 7px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--brass);
  cursor: pointer;
}
.carnet-open-btn:hover{ background: var(--brass); color: var(--card); }

/* ---------- Sommaires ---------- */

.toc, .chapters-index{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 26px 30px;
  margin-bottom: 24px;
}

.toc h2, .chapters-index h2{
  font-style: italic;
  font-weight: 600;
  font-size: 19px;
  color: var(--indigo);
  margin-bottom: 16px;
}

.toc ol{ display: grid; gap: 10px; }
.toc > ol > li > a{ text-decoration: none; color: var(--ink); font-size: 15px; }
.toc > ol > li > a:hover{ color: var(--indigo); }
.toc ul{ margin: 6px 0 0 18px; display: grid; gap: 5px; }
.toc ul a{ text-decoration: none; font-size: 13.5px; color: var(--ink-soft); }
.toc ul a:hover{ color: var(--indigo); }
.toc-empty{ color: var(--ink-soft); font-size: 14px; }

.chapters-index ol{ display: grid; gap: 14px; }
.chapters-index li a{ text-decoration: none; color: inherit; display: block; }
.chapters-index-title{ font-weight: 600; font-size: 15.5px; color: var(--ink); }
.chapters-index-desc{ font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; }
.chapters-index li a:hover .chapters-index-title{ color: var(--indigo); }

/* ---------- Barre d'outils : tri + ajout ---------- */

.section-toolbar{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.sort-control{
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.toolbar-admin-actions{ display: flex; gap: 8px; }

/* ---------- Chronologie : chapitres et jours ---------- */

.timeline{ display: flex; flex-direction: column; gap: 56px; }

.chapter{ display: flex; flex-direction: column; }

/* Bandeau façon page d'ouverture de chapitre : photo alignée sur la même
   colonne que le reste du contenu (pas de bleed plein écran ici — plusieurs
   bandeaux qui débordent tour à tour casseraient la lecture), voile dégradé
   pour la lisibilité, titre superposé en bas. Se prolonge directement dans
   .chapter-days--attached juste en dessous, sans espace ni angles rompus,
   pour lire le bandeau et les jours du chapitre comme un seul bloc. */
.chapter-banner{
  position: relative;
  aspect-ratio: 21 / 8;
  background: var(--line);
  overflow: hidden;
  border-radius: 4px 4px 0 0;
}
.chapter-banner img{ width: 100%; height: 100%; object-fit: cover; display: block; }

.chapter-banner::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 17, 12, 0) 38%, rgba(20, 17, 12, 0.85) 100%);
  pointer-events: none;
}

.chapter-head{ text-align: center; max-width: 640px; margin: 0 auto 30px; }

.chapter-head--overlay{
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  padding: 60px 30px 28px;
}
.chapter-head--overlay .chapter-eyebrow{ color: #E4C77E; }
.chapter-head--overlay .chapter-title{ color: #F8F5EC; }
.chapter-head--overlay .chapter-description{ color: #DCD3BC; max-width: 60ch; margin: 0 auto; }

.chapter-eyebrow{
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--brass);
}

.chapter-title{ font-style: italic; font-weight: 600; font-size: clamp(24px, 3.6vw, 32px); margin: 8px 0 10px; }
.chapter-description{ font-size: 15px; line-height: 1.65; color: var(--ink-soft); }

/* Fond léger, pas un encart : les jours d'un chapitre reposent sur un même
   lavis de couleur (pas de bordure, pas de padding horizontal) — pour que le
   regroupement reste visible en permanence sans rétrécir la colonne de
   lecture ni empiler un cadre dans un autre par-dessus les cartes de jour,
   qui gardent exactement la même largeur qu'un jour hors chapitre. */
.chapter-days{
  display: flex;
  flex-direction: column;
  gap: 32px;
  background: rgba(184, 137, 46, 0.08);
  padding: 28px 0;
}

/* Directement sous un bandeau (.chapter-banner) : liseré de laiton en haut,
   comme un signet marquant le début du chapitre, à la place d'un espace vide. */
.chapter-days--attached{
  padding-top: 20px;
  position: relative;
}
.chapter-days--attached::before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brass);
}

/* ---------- Encart d'un jour ---------- */

.day-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 30px 34px 30px;
  box-shadow: 0 1px 2px rgba(33, 28, 21, 0.04);
  scroll-margin-top: 24px;
}

/* Le repère "dans un chapitre" (voir .day-chapter-label ci-dessous et le
   lavis de fond de .chapter-days) suffit à signaler l'appartenance — pas de
   bordure/retrait supplémentaire ici, qui rétrécirait la carte par rapport à
   un jour hors chapitre alors qu'elle doit garder la même largeur. */

.day-chapter-label{
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brass);
  margin-bottom: 6px;
}

.day-card-top{
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 4px;
}

.day-seal{
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  box-shadow: 0 4px 10px rgba(45, 65, 89, 0.25);
}

.day-seal .num{ font-size: 17px; font-weight: 500; line-height: 1; }
.day-seal .lbl{ font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; margin-top: 2px; }

.day-card-heading{ flex: 1; min-width: 0; }

.day-title{ font-style: italic; font-weight: 600; font-size: clamp(21px, 3vw, 26px); margin: 0 0 8px; }

.day-readout{
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
}

.day-readout span::after{ content: "·"; margin: 0 12px; color: var(--line); }
.day-readout span:last-child::after{ content: none; }

.day-last-badge{ color: var(--brass); font-weight: 600; }

.draft-badge{
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 20px;
  padding: 2px 9px;
  margin-bottom: 10px;
}

.day-actions{ display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }

.day-comment-row{ margin: 20px 0 4px; }

/* ---------- Sous-sections (contenu à l'intérieur d'un jour) ---------- */

.sub{ margin-top: 24px; padding-left: 18px; border-left: 2px solid var(--line); }

.sub-label{
  font-style: italic;
  font-size: 15px;
  color: var(--brass);
  margin: 0 0 8px;
}

.subsection-text{ font-size: 15.5px; line-height: 1.75; }
.subsection-text p{ margin: 0 0 14px; }
.subsection-text p:last-child{ margin-bottom: 0; }

.subsection-text blockquote{
  margin: 16px 0 0;
  border-radius: 3px;
  background: #EEF1E8;
  border: 1px solid #CBD6C1;
  padding: 14px 18px;
  font-size: 13.5px;
  color: #3E4A38;
}

/* ---------- Récit : lieux, altitude, bornes de distance ---------- */

.content-place{ color: var(--brass); font-style: italic; font-weight: 600; }

.content-altitude{
  font-style: italic;
  font-weight: 400;
  color: #9C9884;
  font-variant-numeric: tabular-nums;
}
.content-altitude::before{ content: "("; }
.content-altitude::after{ content: " m)"; }

.content-distance-marker{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
  user-select: none;
}

/* ---------- Éditeur Quill : boutons lieu / altitude / distance ---------- */

.ql-toolbar .ql-place::before{ content: "📍"; font-size: 14px; }
.ql-toolbar .ql-altitude::before{ content: "⛰"; font-size: 14px; }
.ql-toolbar .ql-distance::before{ content: "📏"; font-size: 14px; }

/* ---------- Popover de recherche Google Places (éditeur de récit) ---------- */

.place-popover{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 300;
  width: min(360px, 90vw);
  background: var(--paper);
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(33, 28, 21, 0.35);
  padding: 18px 20px;
}

.place-popover-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 14px;
}

.place-popover-close{
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
}

.place-popover-input{
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 14px;
}

.subsection-album{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.album-thumb-figure{
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.album-thumb{
  aspect-ratio: 4 / 3;
  border-radius: 3px;
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: pointer;
  background: var(--line);
  width: 100%;
  display: block;
}

.album-thumb img{ width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s ease; }
.album-thumb:hover img{ transform: scale(1.05); }

.album-thumb-caption{
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-soft);
  margin: 0;
}

.album-thumb-edit{
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(33, 28, 21, 0.6);
  color: var(--paper);
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
}

.album-thumb-edit:hover{ background: var(--indigo); }

/* Affichage "large" : une photo par ligne, pleine largeur de l'encart, avec
   sa légende affichée en clair (plutôt que la grille de vignettes compacte). */
.subsection-album--large{
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.subsection-album--large .album-thumb{
  aspect-ratio: auto;
  cursor: zoom-in;
  background: none;
}

.subsection-album--large .album-thumb img{
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  transform: none;
}

.subsection-album--large .album-thumb:hover img{ transform: none; }

.subsection-album--large .album-thumb-caption{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  text-align: center;
  color: var(--ink-soft);
  margin-top: 10px;
}

.subsection-map{
  position: relative;
  z-index: 0;
  height: 340px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
}

/* Le panorama reste contenu dans l'encart (aperçu recadré + badge) — c'est en
   l'ouvrant ("Explorer") qu'on peut se déplacer dans toute sa largeur. */
.subsection-panorama{ margin: 20px 0; }

.panorama-frame{
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border: none;
  padding: 0;
  border-radius: 4px;
  background: var(--line);
  cursor: zoom-in;
}

.panorama-frame img{ width: 100%; height: 100%; object-fit: cover; display: block; }

.panorama-icon-badge{
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(33, 28, 21, 0.68);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 20px;
}

.subsection-sphere{ margin: 20px 0; }

.sphere-frame{
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border: none;
  padding: 0;
  border-radius: 4px;
  background: var(--line);
  cursor: zoom-in;
}

.sphere-frame img{ width: 100%; height: 100%; object-fit: cover; display: block; }

.sphere-icon-badge{
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(33, 28, 21, 0.68);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 20px;
}

.panorama-overlay{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.panorama-overlay polyline, .panorama-overlay line{
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.panorama-overlay text{
  font-family: var(--font-body);
  font-size: 13px;
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 2px;
  fill: var(--ink);
}

.panorama-overlay text.panorama-marker-text{
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.panorama-overlay .panorama-marker polygon{
  stroke: var(--paper);
  stroke-width: 1px;
  stroke-linejoin: round;
}

.panorama-annotate-row{ margin-top: -10px; margin-bottom: 20px; }

.subsection-youtube{ margin: 20px 0; }

.youtube-embed-frame{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: var(--line);
}
.youtube-embed-frame iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.youtube-embed-description{
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

.subsection-links li{ margin-bottom: 8px; }
.subsection-links a{
  text-decoration: none;
  color: var(--indigo);
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}
.subsection-links a:hover{ border-color: var(--indigo); }

.subsection-actions{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }

.subsection-move-group{ display: flex; gap: 4px; }

.subsection-move-btn{
  padding: 8px 11px;
  line-height: 1;
  font-family: var(--font-mono);
}
.subsection-move-btn:disabled{ opacity: 0.3; cursor: default; }
.subsection-move-btn:disabled:hover{ background: none; color: var(--ink); }

.add-subsection-row{ margin-top: 26px; }

/* ---------- Volet latéral : gestion des chapitres (admin) ---------- */

.side-overlay{
  position: fixed;
  inset: 0;
  background: rgba(33, 28, 21, 0.5);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.side-overlay.is-open{ opacity: 1; }

.side-panel{
  position: fixed;
  top: 0;
  bottom: 0;
  width: min(440px, 92vw);
  background: var(--paper);
  z-index: 95;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 30px rgba(33, 28, 21, 0.2);
  transition: transform 0.3s ease;
}

.side-panel--right{ right: 0; transform: translateX(100%); }
.side-panel--right.is-open{ transform: translateX(0); }
.side-panel--left{ left: 0; transform: translateX(-100%); }
.side-panel--left.is-open{ transform: translateX(0); }

.side-panel-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.side-panel-head h2{ font-style: italic; font-weight: 600; font-size: 21px; }

.side-panel-body{ flex: 1; overflow-y: auto; padding: 20px 24px; }
.side-panel-form{ padding: 20px 24px; border-top: 1px solid var(--line); }
.side-panel-form h3{ font-style: italic; font-weight: 600; font-size: 16px; color: var(--indigo); margin-bottom: 14px; }

.chapter-manage-list{ display: flex; flex-direction: column; gap: 14px; margin-bottom: 4px; }

.chapter-manage-item{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px 16px;
}

.chapter-manage-title{ font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.chapter-manage-desc{ font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.chapter-manage-actions{ display: flex; gap: 8px; }
.chapter-manage-empty{ color: var(--ink-soft); font-size: 14px; }

/* ---------- Commentaires : panneau latéral ---------- */

.comments-fab{
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 45;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(33, 28, 21, 0.28);
}

#comments-fab-count{ font-family: var(--font-mono); font-size: 11px; }

.comments-overlay{ position: fixed; inset: 0; background: rgba(33, 28, 21, 0.5); z-index: 90; opacity: 0; transition: opacity 0.25s ease; }
.comments-overlay.is-open{ opacity: 1; }

.comments-panel{
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(460px, 94vw);
  background: var(--paper);
  z-index: 95;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 30px rgba(33, 28, 21, 0.2);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.comments-panel.is-open{ transform: translateX(0); }

.comments-panel-head{ display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.comments-title{ font-style: italic; font-weight: 600; font-size: 21px; }
.comments-panel-body{ flex: 1; overflow-y: auto; padding: 20px 24px; }

.comment-list{ display: flex; flex-direction: column; gap: 18px; }
.comment-list .comment-list{ margin-top: 14px; padding-left: 18px; border-left: 2px solid var(--line); }

.comment{ padding-bottom: 4px; }
.comment--owner .comment-author{ color: var(--indigo); }

.comment-head{ display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.comment-author{ font-weight: 700; font-size: 14px; }
.comment-owner-tag{
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--paper);
  background: var(--indigo);
  padding: 2px 7px;
  border-radius: 8px;
  text-transform: uppercase;
}
.comment-date{ font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }

.comment-target{ display: block; font-size: 12.5px; color: var(--brass); text-decoration: none; margin-top: 2px; }
.comment-target:hover{ text-decoration: underline; }
.comment-target--gone{ color: var(--ink-soft); }

.comment-body{ font-size: 14.5px; line-height: 1.6; margin-top: 6px; }

.comment-actions{ display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.comment-reply-btn{
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: underline;
}
.comment-reply-btn:hover{ color: var(--indigo); }
.comment-actions .btn-danger{ padding: 3px 9px; font-size: 11.5px; }

.comment-form{ border-top: 1px solid var(--line); padding: 20px 24px; }

.comment-reply-indicator{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 12px;
  font-size: 12.5px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.comment-reply-indicator button{
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
  color: var(--ink-soft);
  flex-shrink: 0;
}

/* ---------- Boutons "commenter" contextuels ---------- */

.comment-target-btn{
  background: none;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  color: var(--ink-soft);
}

.comment-target-btn:hover{ border-color: var(--indigo); color: var(--indigo); }

/* ---------- Lightbox album ---------- */

.lightbox{
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 17, 12, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-image{ max-width: 90vw; max-height: 76vh; object-fit: contain; border-radius: 3px; }
.lightbox-caption{ color: #E4DAC2; font-size: 14px; margin-top: 14px; max-width: 70ch; text-align: center; }

.lightbox-close{
  position: absolute;
  top: 22px;
  right: 26px;
  z-index: 20;
  background: none;
  border: none;
  color: #F4EEE0;
  font-size: 30px;
  cursor: pointer;
  line-height: 1;
}

.lightbox-prev, .lightbox-next{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(244, 238, 224, 0.12);
  border: none;
  color: #F4EEE0;
  font-size: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
}

.lightbox-prev{ left: 20px; }
.lightbox-next{ right: 20px; }

.lightbox-toolbar{
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.lightbox-counter{ font-family: var(--font-mono); font-size: 12px; color: #C9BFA4; }

.lightbox-comment{
  background: rgba(244, 238, 224, 0.12);
  border: 1px solid rgba(244, 238, 224, 0.3);
  color: #F4EEE0;
  border-radius: 20px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  cursor: pointer;
}

.lightbox-comment:hover{ background: rgba(244, 238, 224, 0.22); }

/* ---------- Carnet de voyage : diaporama ---------- */

.carnet-overlay{ flex-direction: column; gap: 0; padding: 26px 24px 22px; overflow: hidden; }

.carnet-hint-text{
  flex-shrink: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #C9BFA4;
  margin: 0 0 14px;
}

.carnet-stage{
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.carnet-header{ flex-shrink: 0; text-align: center; margin-bottom: 16px; }

.carnet-chapter{
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #E4C77E;
  margin-bottom: 6px;
}

.carnet-day{
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(18px, 2.6vw, 24px);
  color: #F8F5EC;
}

.carnet-subtitle{
  display: block;
  font-size: 13px;
  color: #C9BFA4;
  margin-top: 4px;
}

.carnet-image-wrap{
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carnet-image{ max-width: 100%; max-height: 62vh; object-fit: contain; border-radius: 3px; }

.carnet-caption{
  flex-shrink: 0;
  color: #E4DAC2;
  font-size: 14px;
  margin: 14px 0 0;
  max-width: 70ch;
  text-align: center;
}

.carnet-progress{
  flex-shrink: 0;
  width: 100%;
  max-width: 1200px;
  margin: 20px auto 0;
  height: 3px;
  background: rgba(244, 238, 224, 0.14);
  border-radius: 2px;
  overflow: hidden;
}

.carnet-progress-fill{
  height: 100%;
  background: var(--brass);
  transition: width 0.25s ease;
}

.carnet-toolbar{
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
}

.carnet-play-toggle{
  background: rgba(244, 238, 224, 0.12);
  border: 1px solid rgba(244, 238, 224, 0.3);
  color: #F4EEE0;
  border-radius: 20px;
  padding: 8px 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  cursor: pointer;
}
.carnet-play-toggle:hover{ background: rgba(244, 238, 224, 0.22); }
.carnet-play-toggle.is-playing{ border-color: var(--brass); color: var(--brass); }

.carnet-speed-field{
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #C9BFA4;
}

.carnet-speed-field select{
  background: rgba(244, 238, 224, 0.12);
  border: 1px solid rgba(244, 238, 224, 0.3);
  color: #F4EEE0;
  border-radius: 14px;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
}

.carnet-counter{ font-family: var(--font-mono); font-size: 12px; color: #C9BFA4; }

/* ---------- Panorama : explorer ---------- */

/* La zone image (flex:1, occupe tout l'espace dispo) et l'encart légende
   (hauteur bornée, défilement qui lui est propre) sont deux régions séparées
   dans une colonne flex — comme ça, glisser dans l'image ne peut plus faire
   défiler la page entière et "emporter" la légende avec elle. */
.panorama-explore-overlay{ flex-direction: column; gap: 0; padding: 20px 24px; overflow: hidden; }

.panorama-explore-hint-text{
  flex-shrink: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #C9BFA4;
  margin: 0 0 12px;
}

.panorama-explore-frame{
  position: relative;
  width: 100%;
  max-width: 1400px;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  cursor: grab;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  touch-action: none;
}

.panorama-explore-frame.is-dragging{ cursor: grabbing; }

.panorama-explore-inner{
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  transform-origin: 0 0;
  will-change: transform;
}

.panorama-explore-inner img{ height: 100%; width: auto; display: block; }

/* Sobre volontairement : une simple liste, pas un mur de cartes. */
.panorama-explore-legend-wrap{
  flex-shrink: 0;
  width: 100%;
  max-width: 900px;
  max-height: 22vh;
  overflow-y: auto;
  margin: 14px auto 0;
  padding-top: 12px;
  border-top: 1px solid rgba(244, 238, 224, 0.16);
}

.panorama-explore-legend-wrap h3{
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8A8168;
  margin-bottom: 6px;
  text-align: left;
}

.panorama-explore-legend{ display: flex; flex-direction: column; }

.panorama-legend-item{
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 9px 2px;
  border: none;
  border-top: 1px solid rgba(244, 238, 224, 0.1);
  background: none;
  cursor: pointer;
  text-align: left;
  color: #F4EEE0;
  font-family: var(--font-body);
}

.panorama-legend-item:first-child{ border-top: none; }

.panorama-legend-item:hover .panorama-legend-label,
.panorama-legend-item.is-active .panorama-legend-label{ color: var(--brass); }

.panorama-legend-swatch{ width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.panorama-legend-text{ display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.panorama-legend-label{ font-weight: 600; font-size: 14px; }
.panorama-legend-desc{ font-size: 12.5px; color: #A9A08A; }

/* ---------- Vue 360° : explorer ---------- */

.sphere-explore-overlay{ flex-direction: column; gap: 0; padding: 20px 24px; overflow: hidden; }

.sphere-explore-hint-text{
  flex-shrink: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #C9BFA4;
  margin: 0 0 12px;
}

.sphere-explore-container{
  position: relative;
  z-index: 0;
  width: 100%;
  max-width: 1400px;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 auto;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
}

/* ---------- Panorama : annoter (admin) ---------- */

.panorama-annotate-overlay{ flex-direction: column; gap: 0; padding: 20px 24px 24px; overflow-y: auto; }

.panorama-annotate-toolbar{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto 18px;
  padding-top: 46px;
}

.panorama-annotate-mode{ display: flex; gap: 6px; }
.panorama-mode-btn{ background: rgba(244, 238, 224, 0.08); border-color: rgba(244, 238, 224, 0.3); color: #F4EEE0; }
.panorama-mode-btn.is-active{ background: var(--indigo); border-color: var(--indigo); }

.panorama-annotate-field{
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #C9BFA4;
}

.panorama-annotate-toolbar .btn-ghost{ background: rgba(244, 238, 224, 0.08); border-color: rgba(244, 238, 224, 0.3); color: #F4EEE0; }
.panorama-annotate-toolbar .btn-ghost:hover{ background: rgba(244, 238, 224, 0.2); }

.panorama-annotate-canvas-wrap{
  position: relative;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  cursor: crosshair;
  touch-action: none;
}

.panorama-annotate-canvas-wrap img{ width: 100%; height: auto; display: block; border-radius: 4px; }

.panorama-annotate-label-form{
  max-width: 420px;
  width: calc(100% - 48px);
  margin: 20px auto 0;
  background: var(--paper);
  border-radius: 6px;
  padding: 20px 22px;
}

.panorama-annotate-hint-text{
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #C9BFA4;
  margin: 0 0 14px;
}

/* ---------- Matériel ---------- */

.gear-section{
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.gear-title{
  font-style: italic;
  font-weight: 600;
  font-size: clamp(24px, 3.6vw, 30px);
  margin-bottom: 26px;
}

.gear-showcase{ margin-bottom: 34px; }

.gear-photo{
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: var(--line);
  margin-bottom: 16px;
}

.gear-photo img{ width: 100%; height: 100%; object-fit: cover; }

.gear-comment{ font-size: 15px; line-height: 1.7; color: var(--ink-soft); margin-bottom: 12px; }

.gear-group{ margin-bottom: 30px; }

.gear-group h3{
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass);
  margin-bottom: 14px;
}

.gear-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.gear-card{
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gear-card-thumb{
  aspect-ratio: 4 / 3;
  border-radius: 3px;
  overflow: hidden;
  background: var(--line);
  margin: -14px -16px 0;
}

.gear-card-thumb img{ width: 100%; height: 100%; object-fit: cover; }

.gear-card-body{ display: flex; flex-direction: column; gap: 4px; }

.gear-card-name:is(a){
  text-decoration: none;
  color: var(--indigo);
}

.gear-card-name:is(a):hover{ text-decoration: underline; }

.gear-card-name{ font-size: 14.5px; font-weight: 600; }
.gear-card-price{ font-family: var(--font-mono); font-size: 13px; color: var(--indigo); }

.gear-card-actions{
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.gear-card:hover .gear-card-actions{ opacity: 1; }

.gear-card-edit, .gear-card-delete{
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(33, 28, 21, 0.6);
  color: var(--paper);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.gear-card-edit:hover{ background: var(--indigo); }
.gear-card-delete:hover{ background: var(--danger); }

.gear-total{
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin: 20px 0;
  text-align: right;
}

/* ---------- Profils VisuGPX (trace + profil / rendu 3D) ---------- */

.day-gpx-embeds{
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 20px 0 4px;
}

.day-gpx-embed{ display: flex; flex-direction: column; gap: 8px; }

.day-gpx-label{
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brass);
}

.day-gpx-embed iframe{
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.day-gpx-panoramas{
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.panorama-frame--mini{
  flex: 1 1 260px;
  aspect-ratio: 16 / 9;
}

.panorama-frame--mini .panorama-icon-badge{
  bottom: 10px;
  left: 10px;
  font-size: 11px;
  padding: 5px 11px;
}

.sphere-frame--mini{
  flex: 1 1 260px;
  aspect-ratio: 16 / 9;
}

.sphere-frame--mini .sphere-icon-badge{
  bottom: 10px;
  left: 10px;
  font-size: 11px;
  padding: 5px 11px;
}

/* ---------- Page publique : Parcours ---------- */

.parcours-page{ max-width: 900px; margin: 0 auto; padding: 56px 24px 100px; }

.parcours-head{ text-align: center; margin-bottom: 34px; }
.parcours-head h1{ font-style: italic; font-weight: 600; font-size: clamp(28px, 4.4vw, 40px); margin: 12px 0 10px; }
.parcours-head p{ color: var(--ink-soft); font-size: 15px; }

.parcours-filter{ display: flex; justify-content: center; margin-bottom: 40px; }
.parcours-filter .field{ min-width: 280px; margin-bottom: 0; }

.parcours-trip-head{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}

.parcours-trip-head h2{ font-style: italic; font-weight: 600; font-size: 26px; margin: 0; text-align: center; }

.parcours-chapter{ margin-bottom: 20px; }

.parcours-chapter h3{
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass);
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.parcours-day{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px 24px 24px;
  margin-bottom: 24px;
}

.parcours-day-label{
  display: block;
  font-style: italic;
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 14px;
}

/* ---------- Carte de la trace (jours + photos géolocalisés) ---------- */

.trip-map-wrap{
  position: relative;
  margin-bottom: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}

.trip-map{ position: relative; z-index: 0; height: 300px; width: 100%; }

.trip-map-empty{ margin-bottom: 40px; }

/* La mini-carte ne doit pas capter le pan/zoom (elle sert juste d'aperçu
   cliquable) : Leaflet reste initialisé avec les interactions coupées, donc
   pas besoin de neutraliser les évènements pointeur ici. */
.trip-map .leaflet-control-container{ display: none; }

.trip-map-hint{
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(33, 28, 21, 0.72);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  pointer-events: none;
}

.route-map-overlay{ padding: 0; flex-direction: column; overflow: hidden; }

.route-map-hint-text{
  flex-shrink: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #C9BFA4;
  background: rgba(20, 17, 12, 0.94);
  margin: 0;
  padding: 14px 0 8px;
}

.route-map-full{ position: relative; z-index: 0; flex: 1; width: 100%; min-height: 0; }

.route-map-admin-bar{
  position: absolute;
  top: 22px;
  left: 26px;
  z-index: 10;
}

.route-map-admin-bar .btn-ghost{ background: var(--paper); }

.route-point-form{
  position: absolute;
  bottom: 26px;
  left: 26px;
  z-index: 10;
  background: var(--paper);
  border-radius: 6px;
  padding: 18px 20px;
  width: min(320px, 80vw);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.route-point-form .field{ margin-bottom: 12px; }
.route-point-form .modal-actions{ margin-top: 0; }

/* Marqueurs Leaflet personnalisés */
.route-marker{ display: flex; align-items: center; justify-content: center; }

.route-marker-day{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(45, 65, 89, 0.4);
  border: 2px solid var(--paper);
}

.route-marker-thumb-wrap{ position: relative; width: 38px; height: 38px; }

.route-marker-thumb{
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid var(--paper);
  box-shadow: 0 3px 8px rgba(33, 28, 21, 0.4);
  display: block;
}

.route-marker-badge{
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--brass);
  color: #2B1E05;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--paper);
}

/* Le point de correction influence toujours le tracé, mais ne s'affiche plus
   comme un rond sur la carte — seule sa zone de clic (même taille) reste là
   pour pouvoir encore ouvrir sa pop-up de suppression. */
.route-marker-ghost{
  display: block;
  width: 12px;
  height: 12px;
}

.route-popup{ font-family: var(--font-body); font-size: 13.5px; max-width: 200px; }
.route-popup img{ width: 100%; border-radius: 3px; margin-bottom: 6px; display: block; }
.route-popup-goto{ padding: 0; border: none; background: none; cursor: pointer; display: block; width: 100%; }
.route-popup-goto img{ transition: opacity 0.15s ease; }
.route-popup-goto:hover img{ opacity: 0.85; }
.route-popup-label{ font-weight: 600; margin-bottom: 4px; }
.route-popup form{ margin-top: 8px; }
.route-popup .btn-danger{ font-size: 11px; padding: 4px 9px; }

/* ---------- Panneau d'administration : Images ---------- */

.admin-images{ max-width: 1280px; margin: 0 auto; padding: 50px 24px 90px; }

.admin-images-head{
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 24px;
}

.admin-images-head h1{ font-style: italic; font-weight: 600; font-size: clamp(28px, 4vw, 36px); }
.admin-images-count{ font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); }

.admin-images-filters{
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.admin-images-filters .field{ margin-bottom: 0; min-width: 220px; }

.admin-images-table-wrap{
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.admin-images-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.admin-images-table th{
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  white-space: nowrap;
}

.admin-images-table td{
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.admin-images-table tr:last-child td{ border-bottom: none; }

.admin-images-preview{ width: 96px; }

.admin-images-preview-btn{
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  display: block;
  border-radius: 3px;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.admin-images-preview-btn:hover{ box-shadow: 0 0 0 2px var(--indigo); }
.admin-images-preview-btn img{ width: 84px; height: 64px; object-fit: cover; display: block; background: var(--line); }

.admin-image-panel .side-panel-body{ padding-top: 8px; }

.admin-image-panel-preview{
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 18px;
  background: var(--line);
}

.admin-image-panel h3{
  font-style: italic;
  font-weight: 600;
  font-size: 15px;
  color: var(--indigo);
  margin: 26px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.admin-image-panel h3:first-of-type{ margin-top: 0; padding-top: 0; border-top: none; }

.admin-image-panel .field a{
  font-size: 13.5px;
  color: var(--indigo);
  text-decoration: none;
  word-break: break-all;
}

.admin-image-panel .field a:hover{ text-decoration: underline; }
.admin-image-panel .field a.is-empty{ color: var(--ink-soft); cursor: default; }

.admin-images-link{ min-width: 180px; }
.admin-images-link a{ color: var(--indigo); text-decoration: none; font-weight: 600; }
.admin-images-link a:hover{ text-decoration: underline; }
.admin-images-context{ display: block; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

.admin-images-kind{
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brass);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 9px;
}

.admin-images-type{
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brass);
  white-space: nowrap;
}

.admin-images-completion{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
}

.completion-bar{
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.completion-bar-fill{ height: 100%; border-radius: 3px; }
.completion-bar-fill--low{ background: var(--danger); }
.completion-bar-fill--mid{ background: var(--brass); }
.completion-bar-fill--high{ background: var(--st-termine); }

.completion-pct{
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.admin-images-actions{ white-space: nowrap; }
.admin-images-actions .btn-ghost{ margin-bottom: 6px; display: block; }

.admin-gear-summary{ margin-bottom: 32px; }

.admin-gear-manage{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 26px 28px;
  margin-bottom: 32px;
}

.admin-gear-manage-col h2{
  font-style: italic;
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 16px;
}

.admin-gear-photo-preview{
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper);
  margin-bottom: 14px;
}
.admin-gear-photo-preview img{ width: 100%; height: 100%; object-fit: cover; display: block; }

.admin-images-pager{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- Tablette ---------- */

@media (max-width: 1024px){
  .day-card{ padding: 24px 24px 26px; }
}

/* ---------- Mobile ---------- */

@media (max-width: 640px){
  .nav{ gap: 6px 18px; font-size: 12px; }
  .hero-inner{ padding: 56px 20px 40px; }
  .hero--photo{ min-height: min(56vh, 440px); }
  .hero--photo .hero-inner{ padding: 32px 20px 36px; }
  .footer-inner{ flex-direction: column; align-items: flex-start; }
  .field-row{ flex-direction: column; }
  .trip-detail{ padding: 0 12px 70px; }
  .trip-detail-cover{ aspect-ratio: 4 / 3; }
  .trip-detail-head--overlay{ padding: 50px 16px 20px; }
  .toc, .chapters-index{ padding: 16px 14px; }

  /* Sur un écran étroit, chaque niveau de marge/cadre imbriqué (page >
     canevas de chapitre > carte du jour > liseré "dans un chapitre") mange
     une part disproportionnée de la largeur — on les resserre tous pour que
     le contenu réel (texte, photos) ait vraiment la place de respirer. */
  .chapter-days{ padding: 18px 0; }
  .chapter-days--attached{ padding-top: 14px; }
  .day-card{ padding: 16px 12px 18px; }
  .day-card-top{ align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .day-seal{ width: 44px; height: 44px; }
  .day-seal .num{ font-size: 14px; }
  .day-seal .lbl{ font-size: 7px; }
  .day-actions{ width: 100%; justify-content: flex-start; margin-top: 10px; }

  /* Boutons plus compacts : à taille normale, plusieurs côte à côte (actions
     d'un jour ou d'une sous-section) débordent ou écrasent le peu de largeur
     disponible sur téléphone. */
  .btn-primary, .btn-ghost, .btn-danger{ font-size: 12px; padding: 7px 11px; }
  .subsection-move-btn{ padding: 6px 9px; }
  .comments-jump, .trip-vote-btn, .carnet-open-btn{ font-size: 11.5px; padding: 6px 12px; }

  .section-toolbar{ align-items: stretch; flex-direction: column; }
  .toolbar-admin-actions{ flex-wrap: wrap; }
  .comments-panel, .side-panel{ width: 100%; }
  .link-row, .image-row{ flex-direction: column; }
  .lightbox-prev, .lightbox-next{ width: 40px; height: 40px; font-size: 22px; }
  .trip-map{ height: 220px; }
  .route-point-form{ left: 16px; right: 16px; width: auto; }
  .route-map-admin-bar{ left: 16px; top: 16px; }
}
