/* ============================================================
   css/main.css — Système de design global eSIM Voyage
   Direction : Vacances · Clair · Aéré · Chaleureux
   Palette : Sable chaud · Orange corail · Bleu lagon · Texte ardoise
   Fonts : Cormorant Garamond (display) + DM Sans (body)
   ============================================================ */


/* ── Variables — Palette vacances claire ───────────────────── */
:root {
  /* Fonds — sable chaud, jamais blanc pur */
  --bg:          #f7f4ef;   /* Sable clair principal */
  --bg2:         #efe9e0;   /* Sable légèrement plus foncé */
  --bg3:         #e6ddd1;   /* Sable foncé (hover, inputs) */
  --surface:     #ffffff;   /* Cartes et surfaces élevées */
  --surface2:    #faf7f3;   /* Surface secondaire */
  --border:      #e0d8cc;   /* Bordures subtiles */
  --border2:     #cfc5b5;   /* Bordures visibles */

  /* Accent principal — Orange corail vacances */
  --gold:        #e07830;
  --gold-light:  #f09448;
  --gold-dim:    rgba(224,120,48,0.12);
  --gold-glow:   rgba(224,120,48,0.07);

  /* Texte — Ardoise sombre (lisible sur fond clair) */
  --ivory:       #1e1a16;         /* Texte principal */
  --ivory-dim:   rgba(30,26,22,0.62);
  --ivory-muted: rgba(30,26,22,0.38);

  --text:        #2a2420;
  --muted:       #7a7068;         /* Texte secondaire */
  --dim:         #c0b8ae;         /* Texte très atténué */

  /* États */
  --green:       #22a06b;
  --green-dim:   rgba(34,160,107,0.12);
  --red:         #d94f4f;
  --red-dim:     rgba(217,79,79,0.10);

  /* Typographie */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Rayons */
  --radius:      10px;
  --radius-lg:   18px;
  --radius-xl:   28px;

  /* Ombres légères (fond clair = ombres douces) */
  --shadow:      0 2px 14px rgba(30,26,22,0.07);
  --shadow-lg:   0 8px 40px rgba(30,26,22,0.11);
  --shadow-gold: 0 0 32px rgba(224,120,48,0.18);

  --transition:  0.22s cubic-bezier(0.4,0,0.2,1);
  --spring:      0.35s cubic-bezier(0.34,1.56,0.64,1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { font-size:16px; scroll-behavior:smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width:100%; display:block; }
a { color:inherit; text-decoration:none; }
button { cursor:pointer; border:none; background:none; font-family:inherit; }
ul { list-style:none; }
input, select, textarea {
  font-family: var(--font-body);
  font-size:inherit;
}

/* ── Typographie ────────────────────────────────────────────── */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(52px, 8vw, 110px);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -2px;
  color: var(--ivory);
}
.display-lg {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -1px;
  color: var(--ivory);
}
.display-md {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--ivory);
}
.label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
}
.label-muted {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 640px) { .container { padding: 0 20px; } }

/* ── Boutons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: #ffffff;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(224,120,48,0.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  border: 1px solid var(--border2);
  color: var(--ivory-dim);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow);
}
.btn-ghost {
  color: var(--ivory-dim);
}
.btn-ghost:hover { color: var(--ivory); }

.btn-lg { padding: 18px 36px; font-size: 14px; border-radius: var(--radius-lg); }
.btn-sm { padding: 9px 18px; font-size: 12px; }
.btn-icon {
  width: 42px; height: 42px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-icon:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-glow); }

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Header / Nav ────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 32px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(247,244,239,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.site-header.scrolled {
  background: rgba(247,244,239,0.98);
  border-bottom-color: var(--border);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ivory);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo span { color: var(--gold); }
.nav-logo .logo-dot {
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink:0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--ivory-muted);
  letter-spacing: 0.2px;
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content:'';
  position:absolute;
  bottom:-2px; left:0; right:0;
  height:1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.nav-links a:hover { color: var(--ivory); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ivory); }

.nav-actions { display:flex; align-items:center; gap:12px; }

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--ivory-dim);
  transition: var(--transition);
  background: var(--surface);
}
.cart-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow);
}
.cart-count {
  background: var(--gold);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.cart-count.hidden { display:none; }

/* Hamburger mobile */
.nav-toggle {
  display:none;
  flex-direction:column;
  gap: 5px;
  padding: 8px;
  cursor:pointer;
}
.nav-toggle span {
  display:block;
  width:22px; height:1.5px;
  background: var(--ivory-dim);
  transition: var(--transition);
}
@media(max-width:1024px) {
  .nav-toggle { display:flex; }
  .nav-links { display: none !important; }
  .nav-links.open { display: flex !important; }
  .nav-links {
    position:fixed;
    top:72px; left:0; right:0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    flex-direction:column;
    gap:0;
    padding: 16px 0;
    transform: translateY(-110%);
    overflow: hidden;
    pointer-events: none;
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateY(0); pointer-events: auto; }
  .nav-links a { padding: 14px 32px; width:100%; }
  .site-header { padding: 0 20px; }
}

/* ── Page wrapper ────────────────────────────────────────────── */
.page-content { padding-top: 72px; }
/* Hero colle immédiatement sous le header — pas d'espace supplémentaire */
.page-content > .hero:first-child { margin-top: 0; }

/* ── Cards produit ───────────────────────────────────────────── */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  border-color: rgba(224,120,48,0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--shadow-gold);
}
.product-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg3);
  position: relative;
}
.product-card-img img {
  width:100%; height:100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.05); }

.product-card-img .card-flag {
  position:absolute;
  top:12px; left:12px;
  background: rgba(247,244,239,0.85);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--ivory-dim);
  border: 1px solid var(--border);
}
.product-card-body { padding: 20px; flex:1; display:flex; flex-direction:column; gap:10px; }
.product-card-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--ivory);
  line-height: 1.15;
}
.product-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  flex:1;
}
.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.product-price {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--gold);
}
.product-price .price-from {
  font-size:11px;
  font-weight:400;
  color: var(--muted);
  font-family: var(--font-body);
  display:block;
  margin-bottom:-4px;
}
/* Prix barré (original avant promo) */
.price-original {
  font-size: 14px;
  font-weight: 400;
  color: var(--dim);
  font-family: var(--font-body);
  text-decoration: line-through;
  margin-right: 4px;
}
/* Badge promo */
.badge-promo {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  background: var(--red);
  color: #fff;
  letter-spacing: 0.3px;
  margin-left: 4px;
  vertical-align: middle;
}
/* Bandeau promo sur la carte */
.card-promo-ribbon {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(217,79,79,0.35);
  z-index: 2;
}
.product-badges {
  display:flex; gap:6px; flex-wrap:wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}
.badge-data {
  background: rgba(30,125,138,0.10);
  color: #1e7d8a;
  border: 1px solid rgba(30,125,138,0.22);
}
.badge-days {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(34,160,107,0.25);
}
.badge-gold {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(224,120,48,0.25);
}

/* ── Toast notifications ─────────────────────────────────────── */
.toast-container {
  position:fixed;
  bottom: 28px; right: 28px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.35s var(--spring) forwards;
  pointer-events: auto;
  min-width: 240px;
  max-width: 340px;
}
.toast.toast-success { border-left: 3px solid var(--green); }
.toast.toast-error   { border-left: 3px solid var(--red); }
.toast.toast-info    { border-left: 3px solid var(--gold); }
.toast.removing      { animation: toastOut 0.25s ease forwards; }
@keyframes toastIn {
  from { opacity:0; transform:translateY(12px) scale(0.95); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}
@keyframes toastOut {
  to { opacity:0; transform:translateY(8px) scale(0.95); }
}

/* ── Loader / Skeleton ───────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg2) 25%, var(--bg3) 50%, var(--bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── Page loader ─────────────────────────────────────────────── */
.page-loader {
  position:fixed; inset:0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  transition: opacity 0.5s ease;
}
.page-loader.hidden { opacity:0; pointer-events:none; visibility:hidden; }
.loader-ring {
  width:40px; height:40px;
  border: 2px solid var(--border2);
  border-top-color: var(--gold);
  border-radius:50%;
  animation: spin 0.8s linear infinite;
}
.loader-text {
  font-family: var(--font-display);
  font-size:18px;
  color: var(--ivory-dim);
  letter-spacing:1px;
}
@keyframes spin { to { transform:rotate(360deg); } }

/* ── Séparateur ─────────────────────────────────────────────── */
.divider {
  height:1px;
  background: linear-gradient(90deg, transparent, var(--border2), transparent);
  margin: 48px 0;
}

/* ── Section titles ──────────────────────────────────────────── */
.section-header {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom: 36px;
  flex-wrap:wrap;
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 36px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media(max-width:900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media(max-width:480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand .nav-logo { margin-bottom:12px; }
.footer-brand p { font-size:13px; color:var(--muted); line-height:1.6; max-width:240px; }
.footer-col h4 { font-size:11px; font-weight:600; letter-spacing:1.5px; text-transform:uppercase; color:var(--ivory-dim); margin-bottom:16px; }
.footer-col a { display:block; font-size:13px; color:var(--muted); padding:4px 0; transition:color var(--transition); }
.footer-col a:hover { color:var(--gold); }
.footer-bottom {
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:12px;
  padding-top:24px;
  border-top:1px solid var(--border);
  font-size:12px; color:var(--muted);
}

/* ── Animations d'entrée ─────────────────────────────────────── */
.fade-up {
  opacity:0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity:1;
  transform: translateY(0);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ── Responsive utilities ────────────────────────────────────── */
@media(max-width:640px) {
  .hide-mobile { display:none !important; }
}
@media(min-width:641px) {
  .hide-desktop { display:none !important; }
}

/* ── Scrollbar custom ────────────────────────────────────────── */
::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Selection ───────────────────────────────────────────────── */
::selection { background: var(--gold-dim); color: var(--gold); }

/* ── Badges paiement sécurisé ──────────────────────────────── */
.payment-trust {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.payment-secure-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.payment-logos {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.pay-logo {
  height: 24px;
  width: auto;
  border-radius: 5px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* ── Footer social ─────────────────────────────────────────── */
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--bg2);
  border-radius: 8px;
  color: var(--muted);
  transition: all 0.2s;
}
.footer-social a:hover {
  background: var(--gold);
  color: #fff;
  transform: translateY(-2px);
}

/* ── Logo image ─────────────────────────────────────────────── */
.logo-img {
  height: 32px;
  width: auto;
  display: block;
}

/* ── Google Review Badge ───────────────────────────────────── */
.google-review-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #e0d8cc;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #2a2420;
  text-decoration: none;
  transition: all 0.2s;
  margin-top: 10px;
}
.google-review-badge:hover {
  border-color: #4285F4;
  box-shadow: 0 2px 8px rgba(66,133,244,0.15);
  transform: translateY(-1px);
}
