/* LAPARLIE — Base CSS */

:root {
  --navy:      #0D1B2A;
  --navy-mid:  #162236;
  --navy-lt:   #1E3050;
  --gold:      #C9A84C;
  --gold-lt:   #E2C87A;
  --gold-pale: #F5EDD6;
  --cream:     #FAF8F4;
  --white:     #FFFFFF;
  --ink:       #0D1B2A;
  --ink-mid:   #3A4A5C;
  --ink-lt:    #6B7E94;
  --ink-faint: #B8C4CF;
  --rule:      #DDE3E9;
  --green:     #2D6A4F;  --green-bg:  #F0F7F4;
  --amber:     #92600A;  --amber-bg:  #FEF7EC;
  --red:       #8B1A1A;  --red-bg:    #FDF2F2;
  --blue:      #2B4C9B;  --blue-bg:   #EFF3FB;

  --radius:    4px;
  --shadow-sm: 0 1px 4px rgba(13,27,42,.06);
  --shadow:    0 4px 16px rgba(13,27,42,.10);
  --shadow-lg: 0 12px 40px rgba(13,27,42,.16);
  --transition: .18s ease;
}

*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Jost', sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typographie ── */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  line-height: 1.15;
}

a { color: inherit; text-decoration: none; }

/* ── Flags ── */
.flag { display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px; font-size: 10px;
  font-weight: 500; letter-spacing: .04em; white-space: nowrap; }
.flag-premium    { background: var(--amber-bg); color: var(--amber); }
.flag-fort       { background: var(--amber-bg); color: var(--amber); }
.flag-modere     { background: var(--rule);     color: var(--ink-mid); }
.flag-distress   { background: var(--red-bg);   color: var(--red); }
.flag-divergence { background: var(--blue-bg);  color: var(--blue); }
.flag-opportunite{ background: var(--green-bg); color: var(--green); }
.flag-faible     { background: var(--cream);    color: var(--ink-lt);
  border: 1px solid var(--rule); }

/* ── Score bar ── */
.score-bar {
  height: 3px; background: var(--rule); border-radius: 2px; overflow: hidden;
}
.score-bar-fill {
  height: 100%; border-radius: 2px; background: var(--gold);
  transition: width .4s ease;
}

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

/* ── Boutons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 22px; border: none; cursor: pointer;
  font-family: 'Jost', sans-serif; font-size: 10px;
  font-weight: 400; letter-spacing: .14em; text-transform: uppercase;
  transition: var(--transition); border-radius: var(--radius);
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-lt); }
.btn-gold    { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-lt); }
.btn-ghost   { background: transparent; color: var(--ink-mid);
  border: 1px solid var(--rule); }
.btn-ghost:hover { border-color: var(--ink-mid); color: var(--ink); }

/* ── Inputs ── */
input, select, textarea {
  font-family: 'Jost', sans-serif; font-size: 12px;
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 8px 12px; color: var(--ink); background: var(--white);
  transition: border-color var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
}

/* ── Modale ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(13,27,42,.5);
  backdrop-filter: blur(4px); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.open {
  opacity: 1; pointer-events: all;
}
.modal {
  background: var(--white); border-radius: 8px;
  box-shadow: var(--shadow-lg); width: 680px; max-width: 95vw;
  max-height: 88vh; overflow-y: auto;
  transform: translateY(12px); transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0); }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 2000;
  background: var(--navy); color: var(--white);
  padding: 10px 18px; border-radius: var(--radius);
  font-size: 11px; letter-spacing: .04em;
  transform: translateY(60px); opacity: 0;
  transition: all .25s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--red); color: var(--white);
  border-radius: 8px; font-size: 9px; font-weight: 500;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  body { font-size: 12px; }
}
