/* ============================================================
   DokoVista V2 — Design System
   Blanc/clair dominant · Navy #1B2A4A · Teal #2DD4BF
   Poppins titres · Inter corps · Mobile-first 375px
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:ital,wght@0,600;0,700;0,800;1,400&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  /* Couleurs principales */
  --navy:       #1B2A4A;
  --navy-dark:  #0f1d35;
  --navy-light: #2a3f6a;
  --teal:       #2DD4BF;
  --teal-dark:  #0D9488;
  --teal-light: #CCFBF4;
  --orange:     #F97316;
  --orange-dark:#EA6C0A;

  /* Fonds */
  --bg:         #FFFFFF;
  --bg-alt:     #F8FAFF;
  --bg-muted:   #F1F5F9;
  --bg-input:   #F8FAFF;

  /* Textes */
  --tx:         #374151;
  --tx2:        #6B7280;
  --tx3:        #9CA3AF;
  --tx-inv:     #FFFFFF;

  /* Bordures */
  --bd:         #E5E7EB;
  --bd-strong:  #D1D5DB;
  --bd-focus:   #2DD4BF;

  /* États */
  --success:    #10B981;
  --success-bg: #D1FAE5;
  --warning:    #F59E0B;
  --warning-bg: #FEF3C7;
  --danger:     #EF4444;
  --danger-bg:  #FEE2E2;
  --info:       #3B82F6;
  --info-bg:    #EFF6FF;

  /* Score 5D */
  --score-high:   #10B981;
  --score-mid:    #F59E0B;
  --score-low:    #EF4444;
  --score-none:   #9CA3AF;

  /* Ombres */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:     0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-md:  0 8px 24px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.06);
  --shadow-lg:  0 16px 40px rgba(0,0,0,.12), 0 8px 16px rgba(0,0,0,.08);
  --shadow-teal:0 4px 20px rgba(45,212,191,.25);

  /* Rayons */
  --r-sm:  6px;
  --r:     10px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-full:9999px;

  /* Typographie */
  --font-title: 'Poppins', sans-serif;
  --font-body:  'Inter', sans-serif;

  /* Transitions */
  --ease: .18s cubic-bezier(.4,0,.2,1);

  /* Layout */
  --max-w:      1200px;
  --max-w-text: 720px;
  --px:         20px;   /* padding mobile */
  --px-tablet:  40px;
  --px-desk:    80px;

  /* Header */
  --hd-h:    60px;
  --hd-h-d:  72px;

  /* Bottom nav mobile */
  --bn-h:    60px;
}

/* ── 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-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--tx);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-top: var(--hd-h);
  padding-bottom: var(--bn-h); /* espace bottom nav mobile */
}
img, video { max-width: 100%; display: block; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); }

/* ── Layout ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--px);
}
.container--text {
  max-width: var(--max-w-text);
  margin: 0 auto;
  padding: 0 var(--px);
}
.section { padding: 56px 0; }
.section--alt { background: var(--bg-alt); }
.section--muted { background: var(--bg-muted); }

/* ── Grilles ────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

/* ── Typographie ────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-title); color: var(--navy); line-height: 1.2; }
h1 { font-size: clamp(28px, 5vw, 52px); font-weight: 800; }
h2 { font-size: clamp(22px, 3.5vw, 36px); font-weight: 700; }
h3 { font-size: clamp(17px, 2.5vw, 22px); font-weight: 700; }
h4 { font-size: 16px; font-weight: 600; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(45,212,191,.1);
  border: 1px solid rgba(45,212,191,.25);
  border-radius: var(--r-full);
  padding: 5px 14px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--teal-dark);
  margin-bottom: 16px;
}
.lead { font-size: 17px; color: var(--tx2); line-height: 1.75; }
.caption { font-size: 12px; color: var(--tx3); }
.text-center { text-align: center; }
.text-navy  { color: var(--navy); }
.text-teal  { color: var(--teal-dark); }
.text-muted { color: var(--tx2); }
em.teal { font-style: italic; color: var(--teal); font-weight: 400; }

/* ── Boutons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 24px;
  font-size: 14px; font-weight: 600;
  border-radius: var(--r);
  border: 1.5px solid transparent;
  transition: var(--ease);
  white-space: nowrap;
  text-decoration: none;
  min-height: 44px; /* touch target */
}
.btn:hover { text-decoration: none; }

/* Primaire navy */
.btn-primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); }

/* CTA teal */
.btn-cta {
  background: var(--teal);
  color: var(--navy);
  border-color: var(--teal);
  font-weight: 700;
  box-shadow: var(--shadow-teal);
}
.btn-cta:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; box-shadow: none; }

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--bd-strong);
}
.btn-outline:hover { border-color: var(--navy); background: var(--bg-muted); }

/* Ghost teal */
.btn-ghost {
  background: rgba(45,212,191,.1);
  color: var(--teal-dark);
  border-color: rgba(45,212,191,.2);
}
.btn-ghost:hover { background: rgba(45,212,191,.18); }

/* Tailles */
.btn-sm { padding: 8px 16px; font-size: 13px; min-height: 36px; }
.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: var(--r-md); min-height: 52px; }
.btn-full { width: 100%; }
.btn-icon { padding: 10px; min-width: 44px; min-height: 44px; border-radius: var(--r); }

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--ease), transform var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); }
.card--flat { box-shadow: none; }
.card--interactive { cursor: pointer; }
.card--interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-body { padding: 20px 24px; }
.card-header { padding: 16px 24px; border-bottom: 1px solid var(--bd); }
.card-footer { padding: 14px 24px; border-top: 1px solid var(--bd); background: var(--bg-alt); }

/* Card photo (destination) */
.card-photo {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-muted);
  aspect-ratio: 4/3;
}
.card-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.card-photo:hover img { transform: scale(1.04); }
.card-photo__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(15,29,53,.85) 100%);
}
.card-photo__content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 18px;
}
.card-photo__title {
  font-family: var(--font-title);
  font-size: 18px; font-weight: 700;
  color: #fff; margin-bottom: 6px;
}

/* ── Score 5D ───────────────────────────────────────────── */
.score-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  font-family: var(--font-title);
  font-size: 16px; font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.score-badge--high   { background: var(--score-high); box-shadow: 0 0 0 3px rgba(16,185,129,.2); }
.score-badge--mid    { background: var(--score-mid);  box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
.score-badge--low    { background: var(--score-low);  box-shadow: 0 0 0 3px rgba(239,68,68,.2); }
.score-badge--none   { background: var(--score-none); }
.score-badge--sm { width: 36px; height: 36px; font-size: 12px; }
.score-badge--lg { width: 72px; height: 72px; font-size: 22px; }

.score-bar {
  height: 6px; border-radius: var(--r-full);
  background: var(--bg-muted);
  overflow: hidden;
}
.score-bar__fill {
  height: 100%; border-radius: var(--r-full);
  transition: width .6s ease;
}
.score-bar__fill--high { background: var(--score-high); }
.score-bar__fill--mid  { background: var(--score-mid); }
.score-bar__fill--low  { background: var(--score-low); }

/* ── Formulaires ────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--navy); }
.form-label span { font-weight: 400; color: var(--tx3); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 16px;
  font-size: 14px; color: var(--tx);
  background: var(--bg-input);
  border: 1.5px solid var(--bd);
  border-radius: var(--r);
  transition: border-color var(--ease), box-shadow var(--ease);
  min-height: 44px;
  appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45,212,191,.15);
  background: var(--bg);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.form-hint { font-size: 12px; color: var(--tx3); }
.form-error { font-size: 12px; color: var(--danger); }

/* Barre de recherche principale */
.search-bar {
  display: flex; align-items: center;
  background: var(--bg);
  border: 2px solid var(--bd);
  border-radius: var(--r-xl);
  padding: 8px 8px 8px 20px;
  box-shadow: var(--shadow-md);
  transition: border-color var(--ease), box-shadow var(--ease);
  max-width: 580px;
  width: 100%;
}
.search-bar:focus-within {
  border-color: var(--teal);
  box-shadow: var(--shadow-teal);
}
.search-bar input {
  flex: 1; border: none; background: transparent;
  font-size: 15px; color: var(--tx);
  outline: none; min-height: 40px;
}
.search-bar input::placeholder { color: var(--tx3); }
.search-bar .btn { border-radius: var(--r-lg); padding: 10px 20px; }

/* Chips / tags */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  background: var(--bg-muted);
  border: 1.5px solid var(--bd);
  border-radius: var(--r-full);
  font-size: 13px; font-weight: 500; color: var(--tx2);
  cursor: pointer; transition: var(--ease);
  min-height: 36px;
}
.chip:hover, .chip.active {
  background: rgba(45,212,191,.1);
  border-color: var(--teal);
  color: var(--teal-dark);
}
.chip.active { font-weight: 600; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  font-size: 11px; font-weight: 700;
  border-radius: var(--r-full);
  text-transform: uppercase; letter-spacing: .05em;
}
.badge-teal   { background: var(--teal-light); color: var(--teal-dark); }
.badge-navy   { background: var(--navy); color: #fff; }
.badge-orange { background: #FEF3C7; color: #92400E; }
.badge-green  { background: var(--success-bg); color: var(--success); }
.badge-red    { background: var(--danger-bg); color: var(--danger); }
.badge-gray   { background: var(--bg-muted); color: var(--tx2); }

/* ── Hero sections ──────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: var(--navy);
  min-height: 480px;
  display: flex; align-items: center;
}
.hero-photo {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: 0;
}
.hero-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15,29,53,.92) 0%,
    rgba(27,42,74,.75) 55%,
    rgba(13,51,73,.60) 100%
  );
}
.hero-content {
  position: relative; z-index: 1;
  padding: 64px 0;
  width: 100%;
}
.hero--sm { min-height: 280px; }
.hero--sm .hero-content { padding: 48px 0; }

/* ── Alertes & notices ──────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--r);
  font-size: 14px; line-height: 1.6;
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid transparent;
}
.alert-success { background: var(--success-bg); border-color: rgba(16,185,129,.3); color: #065F46; }
.alert-warning { background: var(--warning-bg); border-color: rgba(245,158,11,.3); color: #92400E; }
.alert-danger  { background: var(--danger-bg);  border-color: rgba(239,68,68,.3);  color: #991B1B; }
.alert-info    { background: var(--info-bg);    border-color: rgba(59,130,246,.3);  color: #1E40AF; }
.alert-teal    { background: var(--teal-light); border-color: rgba(45,212,191,.3);  color: var(--teal-dark); }

/* ── Affiliation ────────────────────────────────────────── */
.aff-note {
  font-size: 11px; color: var(--tx3);
  font-style: italic;
  margin-top: 6px;
}
.aff-block {
  border: 1px solid var(--bd);
  border-radius: var(--r);
  padding: 16px 20px;
  background: var(--bg-alt);
}

/* ── Séparateurs ────────────────────────────────────────── */
.divider {
  border: none; border-top: 1px solid var(--bd);
  margin: 32px 0;
}
.divider--teal { border-top-color: var(--teal); opacity: .3; }

/* ── Utilitaires ────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mt-8  { margin-top:  8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.p-16  { padding: 16px; } .p-24  { padding: 24px; } .p-32  { padding: 32px; }
.hidden { display: none !important; }
.visible { display: block !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rounded { border-radius: var(--r); }
.w-full { width: 100%; }
.relative { position: relative; }

/* ── Loading / Skeleton ─────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bd) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--r-sm);
}
@keyframes skeleton-loading {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.spinner {
  width: 24px; height: 24px;
  border: 2.5px solid var(--bd);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── HEADER ─────────────────────────────────────────────── */
.hd {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--hd-h);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bd);
  z-index: 900;
  display: flex; align-items: center;
}
.hd-inner {
  display: flex; align-items: center;
  width: 100%; max-width: var(--max-w);
  margin: 0 auto; padding: 0 var(--px);
  gap: 32px;
}
.hd-logo {
  font-family: var(--font-title);
  font-size: 20px; font-weight: 800;
  color: var(--navy);
  text-decoration: none; flex-shrink: 0;
}
.hd-logo span { color: var(--teal); }
.hd-logo:hover { text-decoration: none; }
.hd-nav {
  display: none; /* caché mobile */
  align-items: center; gap: 4px; flex: 1;
}
.hd-nav a {
  padding: 8px 14px;
  font-size: 14px; font-weight: 500; color: var(--tx2);
  border-radius: var(--r);
  transition: color var(--ease), background var(--ease);
  text-decoration: none;
}
.hd-nav a:hover, .hd-nav a.active {
  color: var(--navy); background: var(--bg-muted);
}
.hd-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.hd-actions .btn-cta { display: none; } /* caché mobile */
.hd-user { /* avatar utilisateur connecté */
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; cursor: pointer;
  border: 2px solid var(--teal-light);
  text-decoration: none;
}

/* ── BOTTOM NAV MOBILE ──────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bn-h);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--bd);
  display: flex;
  z-index: 900;
}
.bottom-nav a {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  font-size: 10px; font-weight: 500; color: var(--tx3);
  text-decoration: none;
  transition: color var(--ease);
  min-height: 44px;
}
.bottom-nav a:hover, .bottom-nav a.active { color: var(--teal-dark); }
.bottom-nav a.active .bn-icon { color: var(--teal); }
.bn-icon { font-size: 20px; line-height: 1; }

/* ── FOOTER ─────────────────────────────────────────────── */
.ft {
  background: var(--navy);
  padding: 48px 0 32px;
  color: rgba(255,255,255,.7);
  font-size: 13px;
}
.ft a { color: rgba(255,255,255,.6); text-decoration: none; transition: color var(--ease); }
.ft a:hover { color: var(--teal); text-decoration: none; }
.ft-logo {
  font-family: var(--font-title);
  font-size: 22px; font-weight: 800;
  color: #fff; margin-bottom: 8px;
}
.ft-logo span { color: var(--teal); }
.ft-tagline { font-size: 13px; color: rgba(255,255,255,.4); margin-bottom: 24px; }
.ft-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.ft-col h4 { font-family: var(--font-title); font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .08em; }
.ft-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ft-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.ft-bottom p { font-size: 12px; color: rgba(255,255,255,.3); }
.ft-legal { display: flex; gap: 16px; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (min-width: 640px) {
  :root { --px: 32px; }
  body { font-size: 16px; }
}

@media (min-width: 768px) {
  :root { --px: var(--px-tablet); --hd-h: var(--hd-h-d); }
  body { padding-top: var(--hd-h-d); padding-bottom: 0; }
  .hd-nav { display: flex; }
  .hd-actions .btn-cta { display: inline-flex; }
  .bottom-nav { display: none; }
  .grid-2, .grid-3, .grid-4 { /* maintien desktop */ }
}

@media (min-width: 1024px) {
  :root { --px: var(--px-desk); }
}

@media (max-width: 767px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .ft-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
  .section { padding: 40px 0; }
  h1 { font-size: clamp(24px, 7vw, 36px); }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .ft-cols { grid-template-columns: 1fr; }
  .ft-bottom { flex-direction: column; text-align: center; }
}

/* ── Accessibilité WCAG AA ──────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
/* Contraste minimum 4.5:1 vérifié :
   --tx #374151 sur --bg #FFFFFF = 9.73:1 ✅
   --tx2 #6B7280 sur --bg #FFFFFF = 4.63:1 ✅
   --navy #1B2A4A sur --teal #2DD4BF = 5.2:1 ✅ */
