/* ============================================================
   voyageVoyage — main.css
   MOBILE-FIRST : base = mobile, @media min-width = agrandir
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

/* ── Tokens ── */
:root {
  --bg: #0a0a0f;
  --bg-2: #111118;
  --bg-3: #1a1a24;
  --surface: #16161e;
  --surface-2: #1e1e2a;
  --border: rgba(255,255,255,.08);
  --border-2: rgba(255,255,255,.15);
  --text: #e8e4dc;
  --text-2: #9b95a0;
  --text-3: #5a5560;
  --accent: #c8a96e;
  --accent-2: #e8c87a;
  --accent-glow: rgba(200,169,110,.18);
  --rose: #c47a7a;
  --teal: #5a9a8f;
  --green: #6ab87a;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,.5);
  --shadow-lg: 0 8px 48px rgba(0,0,0,.7);
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --ease: .25s cubic-bezier(.4,0,.2,1);

  /* Touch targets */
  --touch: 44px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 16px;        /* 16px = minimum lisible mobile */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
textarea { resize: vertical; font-family: inherit; }
input, select { font-family: inherit; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  height: 56px;          /* 56px sur mobile */
}
.logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.logo-v, .logo-accent { color: var(--accent); }
.logo-v { font-style: italic; }

.header-nav {
  display: flex; align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar { display: none; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--touch);
  background: var(--accent); color: #0a0a0f;
  padding: 0 18px;
  border-radius: 50px;
  font-size: .875rem; font-weight: 600;
  white-space: nowrap;
  transition: background var(--ease), transform var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:active { background: var(--accent-2); transform: scale(.97); }
@media (hover: hover) { .btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); } }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--touch);
  border: 1px solid var(--border-2); color: var(--text-2);
  padding: 0 16px;
  border-radius: 50px;
  font-size: .875rem;
  white-space: nowrap;
  transition: var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn-ghost:active { border-color: var(--accent); color: var(--accent); }
@media (hover: hover) { .btn-ghost:hover { border-color: var(--accent); color: var(--accent); } }

.btn-text {
  display: inline-flex; align-items: center;
  min-height: 36px;
  color: var(--text-2); font-size: .875rem;
  white-space: nowrap;
  padding: 0 4px;
  transition: color var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn-text.muted { color: var(--text-3); }
.btn-text:active, .btn-text:hover { color: var(--accent); }

.btn-sm { min-height: 34px; padding: 0 12px; font-size: .8rem; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--touch); min-height: var(--touch);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; font-size: .9rem;
  transition: var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn-icon-sm {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; min-height: 30px;
  color: var(--text-3); font-size: .8rem; border-radius: 4px;
}
.btn-icon-sm:active, .btn-icon-sm:hover { color: var(--rose); }
.w-full { width: 100%; }

/* ── Badges ── */
.badge-admin {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0a0f;
  padding: 4px 10px; border-radius: 50px;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  white-space: nowrap;
}
.badge-guest {
  background: var(--surface-2); border: 1px solid var(--border-2);
  padding: 4px 10px; border-radius: 50px;
  font-size: .78rem; color: var(--text-2);
  white-space: nowrap; max-width: 130px;
  overflow: hidden; text-overflow: ellipsis;
}

/* ── Hero ── */
.hero {
  position: relative;
  padding: 60px 20px 50px;  /* compact mobile */
  text-align: center;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; }
.hero-eyebrow {
  font-size: .75rem; font-weight: 500;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;  /* mobile base */
  font-weight: 400; line-height: 1.15;
}
.hero-title em { color: var(--accent); font-style: italic; }
.hero-bg { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-orb {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: .12;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb1 { width: 260px; height: 260px; background: var(--accent); top: -80px; right: -80px; }
.orb2 { width: 200px; height: 200px; background: var(--teal); bottom: -40px; left: -40px; animation-delay: -4s; }
.orb3 { width: 180px; height: 180px; background: var(--rose); bottom: -30px; left: 25%; animation-delay: -2s; }
@keyframes orbFloat {
  0%,100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-14px) scale(1.04); }
}
@media (min-width: 640px) {
  .hero { padding: 80px 24px 70px; }
  .hero-title { font-size: 3rem; }
  .orb1 { width: 350px; height: 350px; }
  .orb2 { width: 260px; height: 260px; }
}
@media (min-width: 1024px) {
  .hero { padding: 100px 24px 80px; }
  .hero-title { font-size: clamp(3rem, 5vw, 4.5rem); }
}

/* ── Voyages section ── */
.voyages-section { padding: 0 16px 60px; }
@media (min-width: 640px) { .voyages-section { padding: 0 24px 80px; } }
@media (min-width: 1280px) { .voyages-section { max-width: 1200px; margin: 0 auto; } }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.section-header h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem; font-weight: 400;
}
@media (min-width: 640px) { .section-header { margin-bottom: 32px; } .section-header h2 { font-size: 1.8rem; } }

/* ── Voyage cards ── */
.voyages-grid {
  display: grid;
  grid-template-columns: 1fr;  /* 1 colonne mobile */
  gap: 16px;
}
@media (min-width: 540px)  { .voyages-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .voyages-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1200px) { .voyages-grid { gap: 24px; } }

.voyage-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  cursor: pointer; position: relative;
  transition: var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.voyage-card:active { transform: scale(.98); }
@media (hover: hover) {
  .voyage-card:hover { border-color: var(--border-2); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
}
.card-cover { height: 180px; position: relative; overflow: hidden; background: var(--bg-3); }
@media (min-width: 640px) { .card-cover { height: 200px; } }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
@media (hover: hover) { .voyage-card:hover .card-cover img { transform: scale(1.05); } }
.card-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
}
.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,15,.75), transparent);
}
.card-body { padding: 16px; }
@media (min-width: 640px) { .card-body { padding: 20px; } }
.card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.card-dates { font-size: .75rem; color: var(--accent); font-weight: 500; }
.card-duration { font-size: .72rem; color: var(--text-3); }
.card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem; font-weight: 700;
  margin-bottom: 8px; line-height: 1.3;
}
@media (min-width: 640px) { .card-title { font-size: 1.3rem; } }
.card-desc { font-size: .83rem; color: var(--text-2); margin-bottom: 14px; line-height: 1.55; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.stop-count { font-size: .78rem; color: var(--text-3); }
.card-arrow { color: var(--accent); font-size: 1.1rem; transition: transform var(--ease); }
@media (hover: hover) { .voyage-card:hover .card-arrow { transform: translateX(4px); } }

/* Admin actions — toujours visibles sur mobile (pas de :hover) */
.card-admin-actions {
  position: absolute; top: 10px; right: 10px;
  display: flex; gap: 6px;
}
@media (hover: hover) {
  .card-admin-actions { opacity: 0; transition: opacity var(--ease); }
  .voyage-card:hover .card-admin-actions { opacity: 1; }
}
.card-admin-actions button {
  background: rgba(10,10,15,.85); border: 1px solid var(--border);
  width: 34px; height: 34px; border-radius: 8px; font-size: .9rem;
  backdrop-filter: blur(8px); transition: var(--ease);
  display: flex; align-items: center; justify-content: center;
}

.card-gallery-link {
  font-size: 1rem; opacity: .6;
  transition: opacity var(--ease); text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) { .card-gallery-link:hover { opacity: 1; } }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-2); }
.empty-icon { font-size: 2.5rem; margin-bottom: 14px; }
.empty-state p { margin-bottom: 20px; }

/* ── Modals ── */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end;  /* slide-up mobile */
  justify-content: center;
  padding: 0;
}
@media (min-width: 640px) {
  .modal { align-items: center; padding: 24px; }
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-box {
  position: relative; z-index: 1;
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius) var(--radius) 0 0; /* bottom sheet mobile */
  padding: 24px 20px 32px;
  max-height: 92vh; overflow-y: auto;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: slideUp .28s cubic-bezier(.4,0,.2,1);
}
@media (min-width: 640px) {
  .modal-box {
    border-radius: var(--radius);
    padding: 32px;
    max-width: 480px;
    animation: modalIn .25s cubic-bezier(.4,0,.2,1);
  }
  .modal-wide { max-width: 640px; }
}
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
/* Drag handle line sur mobile */
.modal-box::before {
  content: '';
  display: block;
  width: 40px; height: 4px;
  background: var(--border-2);
  border-radius: 2px;
  margin: 0 auto 20px;
}
@media (min-width: 640px) { .modal-box::before { display: none; } }

.modal-box h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem; font-weight: 700;
  margin-bottom: 20px;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-2); color: var(--text-2);
  font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--bg-3); color: var(--text); }
.modal-hint { color: var(--text-2); font-size: .85rem; margin-bottom: 18px; line-height: 1.55; }

/* ── Forms ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;  /* mobile = 1 col */
  gap: 14px; margin-bottom: 20px;
}
@media (min-width: 540px) {
  .form-grid { grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
  .form-group.full { grid-column: 1 / -1; }
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .8rem; font-weight: 500; color: var(--text-2); letter-spacing: .04em; }
.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;  /* plus grand pour le touch */
  color: var(--text); font-size: 16px; /* 16px évite le zoom iOS */
  transition: border-color var(--ease);
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--accent); }
.form-group input[type=file] { padding: 10px 12px; cursor: pointer; color: var(--text-2); }
.form-actions { display: flex; gap: 10px; flex-direction: column-reverse; }
@media (min-width: 400px) { .form-actions { flex-direction: row; justify-content: flex-end; } }

/* Pin input */
.pin-input {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 1.6rem; letter-spacing: .3em;
  text-align: center; color: var(--text); width: 100%;
}
.pin-input:focus { outline: none; border-color: var(--accent); }
.error-msg { color: var(--rose); font-size: .85rem; margin-bottom: 14px; text-align: center; }

/* File drop zone */
.file-drop-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius-sm);
  padding: 24px 16px;
  text-align: center; cursor: pointer;
  color: var(--text-3); font-size: .875rem;
  position: relative; transition: var(--ease);
}
.file-drop-zone:active, .file-drop-zone.drag-over {
  border-color: var(--accent); color: var(--accent); background: var(--accent-glow);
}
.file-drop-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ── Guests ── */
.guest-add-form { display: flex; gap: 10px; margin-bottom: 20px; flex-direction: column; }
@media (min-width: 480px) { .guest-add-form { flex-direction: row; } }
.guest-add-form input {
  flex: 1; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  color: var(--text); font-size: 16px;
}
.guest-add-form input:focus { outline: none; border-color: var(--accent); }
.guest-list { display: flex; flex-direction: column; gap: 10px; }
.guest-item {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
}
.guest-avatar {
  width: 38px; height: 38px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0a0f; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
}
.guest-info { flex: 1; min-width: 0; }
.guest-info strong { display: block; font-size: .87rem; margin-bottom: 2px; }
.guest-link-url {
  font-size: .68rem; color: var(--text-3); font-family: monospace;
  word-break: break-all; display: block;
}
.guest-actions { display: flex; gap: 6px; flex-shrink: 0; }
.empty-guests { text-align: center; color: var(--text-3); padding: 20px; font-size: .875rem; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 16px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 999; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: 50px; padding: 10px 20px;
  font-size: .85rem; color: var(--text);
  opacity: 0; transition: all .3s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow); pointer-events: none;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-default { border-color: var(--accent); color: var(--accent); }
.toast-error   { border-color: var(--rose);   color: var(--rose); }
.toast-ok      { border-color: var(--green);  color: var(--green); }

/* ── Progress ── */
.progress-bar { width: 100%; height: 4px; background: var(--bg-3); border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* ── Media upload tabs ── */
.media-upload-tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn {
  padding: 8px 14px; border-radius: 50px; font-size: .82rem;
  border: 1px solid var(--border); color: var(--text-2);
  min-height: 38px; transition: var(--ease);
}
.tab-btn.active { background: var(--accent); color: #0a0a0f; border-color: var(--accent); }

/* ── Footer ── */
.site-footer {
  text-align: center; padding: 32px 20px;
  color: var(--text-3); font-size: .8rem;
  border-top: 1px solid var(--border);
}
.site-footer em { color: var(--accent); font-style: italic; }
