/* ============================================================
   KAP PITON — Planificateur de voyage
   ============================================================ */

/* === HEADER IMMERSIF === */
.planner-hero {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: flex-end;
  padding: 130px 0 50px;
  overflow: hidden;
}

.planner-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.pexels.com/photos/7506017/pexels-photo-7506017.jpeg?auto=compress&cs=tinysrgb&w=1920');
  background-size: cover;
  background-position: center 35%;
  animation: heroPhotoZoom 26s ease-in-out infinite alternate;
}

.planner-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21,21,42,0.30) 0%, rgba(21,21,42,0.12) 45%, rgba(21,21,42,0.95) 100%);
}

.planner-hero-content { position: relative; z-index: 2; }

/* === MOTIVATION === */
.motivation-line {
  margin: 26px 0 6px;
  padding: 16px 22px;
  background: linear-gradient(90deg, rgba(255, 107, 53, 0.12), rgba(255, 107, 53, 0.03));
  border-left: 3px solid var(--lava);
  border-radius: 0 12px 12px 0;
  font-size: 1.02rem;
  line-height: 1.6;
  color: rgba(245, 230, 208, 0.9);
}

.motivation-line strong { color: var(--lava-light); }

/* === MOSAÏQUE DU VOYAGE === */
.trip-strip-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 230, 208, 0.55);
  margin: 22px 0 12px;
}

.trip-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 8px;
}

.trip-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 108px;
}

.trip-thumb {
  position: relative;
  width: 108px;
  height: 76px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--glass-border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s var(--ease-out-expo);
}

.trip-step:hover .trip-thumb { transform: translateY(-4px) scale(1.04); }

.trip-day {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 8px;
  background: rgba(21, 21, 42, 0.85);
  border-radius: 50px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--lava-light);
}

.trip-name {
  font-size: 0.68rem;
  text-align: center;
  color: rgba(245, 230, 208, 0.65);
  line-height: 1.3;
}

.trip-arrow {
  color: var(--lava);
  font-size: 1.1rem;
  margin: 0 2px 26px;
}

.accent-grad {
  background: linear-gradient(135deg, var(--lava), var(--lava-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.planner-main {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 36px;
  align-items: start;
  padding-top: 20px;
  padding-bottom: 80px;
}

.planner-col { min-width: 0; }

.planner-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 90px;
}

/* === JOURS — timeline de parcours === */
.days-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 20px;
  padding-left: 26px;
}

/* Ligne de lave qui relie les jours : le chemin du trek */
.days-list::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: linear-gradient(to bottom, var(--lava), rgba(255, 107, 53, 0.15));
  border-radius: 1px;
}

.day-card {
  position: relative;
}

/* Pastille étape sur la timeline */
.day-card::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lava);
  border: 3px solid var(--shadow);
  box-shadow: 0 0 0 1px rgba(255, 107, 53, 0.4), 0 0 14px rgba(255, 107, 53, 0.5);
}

.planner-empty {
  padding: 40px 24px;
  text-align: center;
  color: rgba(245, 230, 208, 0.5);
  background: var(--glass-bg);
  border: 1px dashed var(--glass-border);
  border-radius: 16px;
}

.day-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 20px 22px;
  transition: border-color 0.3s, transform 0.3s var(--ease-out-expo);
  overflow: hidden;
}

.day-card:hover {
  border-color: rgba(255, 107, 53, 0.25);
  transform: translateX(3px);
}

/* === BANDEAU VISUEL DE L'ÉTAPE (la photo de la rando) === */
.day-visual {
  position: relative;
  height: 150px;
  margin: 4px -22px 18px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.day-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 25%, rgba(21, 21, 42, 0.88) 100%);
}

.day-visual-text {
  position: relative;
  z-index: 1;
  padding: 14px 22px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.day-visual-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--sand-light);
}

.day-visual-sub {
  font-size: 0.78rem;
  color: rgba(245, 230, 208, 0.7);
}

.day-visual-diff {
  position: absolute;
  top: 12px;
  right: 22px;
  z-index: 1;
}

.day-card--hike { padding-top: 16px; }

.day-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.day-num {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--lava);
  font-size: 1.05rem;
  white-space: nowrap;
}

.day-meta {
  font-size: 0.75rem;
  color: rgba(245, 230, 208, 0.5);
}

.day-remove {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: rgba(245, 230, 208, 0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.day-remove:hover {
  background: rgba(220, 38, 38, 0.2);
  color: #F87171;
  border-color: rgba(248, 113, 113, 0.4);
}

.day-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.day-field { display: flex; flex-direction: column; gap: 6px; }
.day-field-full { grid-column: 1 / -1; }

.day-field span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(245, 230, 208, 0.5);
}

.day-field select,
.day-field input {
  padding: 11px 14px;
  background: rgba(21, 21, 42, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--sand);
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: border-color 0.3s;
}

.day-field select:focus,
.day-field input:focus {
  outline: none;
  border-color: var(--lava);
}

.day-field select option { background: #232342; }

/* === TOTAUX === */
.planner-totals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 24px 0 16px;
}

.total {
  text-align: center;
  padding: 18px 10px;
  background: rgba(255, 107, 53, 0.07);
  border: 1px solid rgba(255, 107, 53, 0.18);
  border-radius: 14px;
}

.total-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--lava);
}

.total-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(245, 230, 208, 0.5);
}

/* === ALERTES === */
.warning-item {
  padding: 12px 16px;
  margin-bottom: 8px;
  background: rgba(255, 138, 101, 0.08);
  border-left: 3px solid var(--lava);
  border-radius: 0 10px 10px 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(245, 230, 208, 0.8);
}

.planner-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn-danger:hover {
  background: rgba(220, 38, 38, 0.15) !important;
  color: #F87171;
}

/* Ajout de jour : invitation discrète (pas un pavé orange) */
.planner-add {
  width: 100%;
  justify-content: center;
  background: transparent !important;
  color: var(--sand) !important;
  border: 1px dashed rgba(245, 230, 208, 0.35) !important;
  box-shadow: none !important;
}

.planner-add:hover {
  border-color: var(--lava) !important;
  color: var(--lava-light) !important;
  background: rgba(255, 107, 53, 0.05) !important;
  transform: none !important;
}

/* === RÈGLES === */
.rules-card { border-color: rgba(255, 107, 53, 0.25); }

.rules-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.rules-list li {
  position: relative;
  padding-left: 16px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(245, 230, 208, 0.7);
}

.rules-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--lava);
  font-weight: 700;
}

.info-p {
  font-size: 0.86rem;
  line-height: 1.7;
  color: rgba(245, 230, 208, 0.65);
  margin-bottom: 12px;
}

/* === CHECKLIST === */
.checklist {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 6px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(245, 230, 208, 0.75);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.check-item:hover { background: rgba(255, 255, 255, 0.04); }

.check-item input {
  accent-color: var(--lava);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.check-item input:checked + span {
  text-decoration: line-through;
  opacity: 0.5;
}

.checklist-progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.checklist-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--lava), var(--lava-light));
  border-radius: 3px;
  transition: width 0.5s var(--ease-out-expo);
}

.checklist-count {
  font-size: 0.75rem;
  color: rgba(245, 230, 208, 0.5);
}

/* === IMPRESSION (le plan papier) === */
@media print {
  body { background: white !important; color: #111 !important; cursor: auto; }
  .nav, .footer, .planner-side, .planner-actions, .planner-add, .day-remove,
  .planner-hero-bg, .planner-hero-gradient, #tripStrip,
  .particles-canvas, .cursor-glow, .cursor-dot { display: none !important; }
  .planner-hero { min-height: 0; padding: 20px 0; }
  .day-visual { height: 90px; margin: 0 0 12px; border-radius: 8px; }
  .days-list { padding-left: 0; }
  .days-list::before, .day-card::before { display: none; }
  .planner-main { display: block; }
  .day-card { border: 1px solid #ccc; break-inside: avoid; margin-bottom: 10px; background: white; }
  .detail-title, .day-num, .total-num { color: #C2410C !important; -webkit-text-fill-color: #C2410C; }
  .day-field span, .day-meta, .total-label { color: #555; }
  .day-field select, .day-field input { border: none; background: none; color: #111; padding: 2px 0; }
  .planner-totals { display: grid; }
  .total { border: 1px solid #ddd; background: none; }
  .warning-item { background: none; border-left: 3px solid #C2410C; color: #333; }
}

/* === RESPONSIVE === */
@media (max-width: 980px) {
  .planner-main { grid-template-columns: 1fr; }
  .planner-side { position: static; }
  .day-grid { grid-template-columns: 1fr; }
  .planner-totals { grid-template-columns: repeat(2, 1fr); }
}
