/* ═══════════════════════════════════════════════════════════
   CorsicaXperiences — main.css
   Styles globaux, variables, reset, typographie, utilitaires
═══════════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --deep:    #1C2B1E;
  --terra:   #C4622D;
  --sand:    #F5EFE0;
  --sea:     #2D6B8A;
  --gold:    #D4A843;
  --maquis:  #4A7C59;
  --cream:   #FAF7F0;
  --white:   #FFFFFF;
  --text:    rgba(28,43,30,0.85);
  --muted:   rgba(28,43,30,0.5);
  --border:  rgba(28,43,30,0.1);
  --radius:  14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow:    0 4px 24px rgba(28,43,30,0.08);
  --shadow-lg: 0 16px 56px rgba(28,43,30,0.14);
  --nav-h: 72px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--cream);
  color: var(--deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; outline: none; }
ul, ol { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4 { font-family: 'Cormorant Garamond', serif; line-height: 1.15; color: var(--deep); }
h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 700; }
h2 { font-size: clamp(28px, 3.5vw, 44px); font-weight: 600; }
h3 { font-size: clamp(20px, 2.5vw, 28px); font-weight: 600; }
h4 { font-size: 18px; font-weight: 600; }
p  { font-size: 15px; line-height: 1.75; color: var(--text); }
small { font-size: 12px; color: var(--muted); }

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 32px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 100px;
  font-size: 14px; font-weight: 500;
  border: none; transition: all 0.22s ease;
  white-space: nowrap;
}
.btn-primary   { background: var(--terra); color: #fff; }
.btn-primary:hover { background: #ad5228; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(196,98,45,0.35); }
.btn-dark      { background: var(--deep); color: #fff; }
.btn-dark:hover { background: #2d4532; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(28,43,30,0.3); }
.btn-outline   { background: transparent; color: var(--deep); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--deep); background: rgba(28,43,30,0.04); }
.btn-ghost     { background: rgba(255,255,255,0.15); color: #fff; border: 1.5px solid rgba(255,255,255,0.3); }
.btn-ghost:hover { background: rgba(255,255,255,0.25); }
.btn-gold      { background: var(--gold); color: var(--deep); }
.btn-gold:hover { background: #c4952e; transform: translateY(-1px); }
.btn-sm        { padding: 9px 18px; font-size: 13px; }
.btn-lg        { padding: 16px 36px; font-size: 16px; }
.btn-full      { width: 100%; }
.btn:disabled  { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Form Elements ── */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--deep); margin-bottom: 6px; letter-spacing: 0.01em;
}
.form-group label .required { color: var(--terra); margin-left: 2px; }
.form-control {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; color: var(--deep);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus { border-color: var(--maquis); box-shadow: 0 0 0 3px rgba(74,124,89,0.12); }
.form-control::placeholder { color: var(--muted); }
.form-control.error { border-color: var(--terra); }
.form-error { font-size: 12px; color: var(--terra); margin-top: 4px; display: none; }
.form-error.visible { display: block; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231C2B1E' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

/* ── Tags / Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-pro     { background: #E1F5EE; color: #0F6E56; }
.badge-part    { background: #E6F1FB; color: #185FA5; }
.badge-pending { background: #FFF3CD; color: #856404; }
.badge-terra   { background: rgba(196,98,45,0.12); color: var(--terra); }
.badge-sea     { background: rgba(45,107,138,0.12); color: var(--sea); }
.badge-gold    { background: rgba(212,168,67,0.15); color: #9A7310; }

/* ── Section Labels ── */
.section-eyebrow {
  font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  font-weight: 600; color: var(--terra); margin-bottom: 12px;
  display: block;
}

/* ── Dividers ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* ── Toast Notifications ── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--deep); color: #fff;
  padding: 14px 20px; border-radius: var(--radius-sm);
  font-size: 14px; min-width: 280px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
}
.toast.success { border-left: 3px solid #4CAF50; }
.toast.error   { border-left: 3px solid var(--terra); }
.toast.info    { border-left: 3px solid var(--sea); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(120%); opacity: 0; } }

/* ── Modal Base ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(28,43,30,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  width: 100%; max-width: 540px; max-height: 90vh;
  overflow-y: auto; box-shadow: var(--shadow-lg);
  transform: translateY(20px); transition: transform 0.25s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 22px; margin: 0; }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--sand); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--muted); transition: all 0.2s;
}
.modal-close:hover { background: var(--border); color: var(--deep); }
.modal-body  { padding: 28px; }
.modal-footer { padding: 20px 28px; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: flex-end; }

/* ── Stars ── */
.stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; }
.stars-count { font-size: 12px; color: var(--muted); margin-left: 4px; }

/* ── Loader ── */
.loader {
  width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive Grid ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── Animations ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.5s ease forwards; }
.fade-up-2 { animation: fadeUp 0.5s 0.1s ease both; }
.fade-up-3 { animation: fadeUp 0.5s 0.2s ease both; }
.fade-up-4 { animation: fadeUp 0.5s 0.3s ease both; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--sand); }
::-webkit-scrollbar-thumb { background: var(--maquis); border-radius: 3px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .btn-lg { padding: 14px 28px; font-size: 15px; }
}
@media (max-width: 480px) {
  .modal { border-radius: var(--radius) var(--radius) 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
}
