/* brand.css — Design system partagé Nael
   Tokens, reset, typo de base, nav + boutons partagés.
   Chargé par toutes les pages publiques. */

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

/* ── Tokens ────────────────────────────────────────────────────────────── */
:root {
  /* Surfaces */
  --bg:              #F5F5F7;
  --bg-v2:           #F5F5F7;
  --surface:         #FFFFFF;
  --surface-v2:      #FFFFFF;
  --card:            #FFFFFF;
  --card-bg:         #FFFFFF;

  /* Bordures */
  --border:          #E5E5EA;
  --border-v2:       #E5E5EA;
  --border2:         #D1D1D6;
  --border-strong:   #C8C8CC;

  /* Accent */
  --accent:          #1B4FCC;
  --accent-v2:       #1B4FCC;
  --accent-hover:    #1640A8;
  --accent-dim:      #EEF2FB;

  /* Texte */
  --cream-v2:        #1D1D1F;   /* texte principal (sombre) */
  --dark:            #1D1D1F;
  --cream:           #F7F5F0;   /* texte clair sur fond sombre */
  --cream-elevated:  #FFFFFF;
  --cream-subtle:    #EFECE4;
  --c2:              #3C3C43;
  --c2-v2:           #3C3C43;
  --text-secondary:  #6B6B70;
  --muted-v2:        #86868B;
  --text-muted:      #86868B;

  /* États */
  --red:             #C0392B;
  --rdim:            #FFF1F0;
  --critique:        #C0392B;
  --green:           #1A5C38;
  --gdim:            #F0FBF5;
  --green-soft:      #E8F5EE;
  --orange:          #D4500A;
  --odim:            #FEF4EE;

  /* Ombres */
  --shadow-sm:       0 1px 4px rgba(0,0,0,.06);
  --shadow-md:       0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.05);
  --shadow-lg:       0 12px 40px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06);

  /* Typo */
  --font-sans:       'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif:      'Fraunces', Georgia, serif;

  /* Rayons */
  --radius-sm:       8px;
  --radius-md:       12px;
  --radius-lg:       20px;
}

/* ── Reset minimal ─────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background:              var(--bg);
  color:                   var(--cream-v2);
  font-family:             var(--font-sans);
  font-size:               14px;
  line-height:             1.5;
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img { max-width: 100%; height: auto; display: block; }

/* ── Animations partagées ──────────────────────────────────────────────── */
@keyframes fadeUp  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin    { to { transform: rotate(360deg); } }

.anim-fade-up  { animation: fadeUp  .45s ease both; }
.anim-fade-in  { animation: fadeIn  .3s  ease both; }

/* ── Utilitaires typography ────────────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--accent-dim);
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* ── Nav partagée ──────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 245, 247, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.site-header .container,
.site-header > .container {
  display: flex;
  align-items: center;
  height: 60px;
  gap: 32px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) { .container { padding: 0 32px; } }

/* Logo */
.logo {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 300;
  color: var(--cream-v2);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo em { font-style: italic; color: var(--accent); }
.logo:hover { color: var(--cream-v2); text-decoration: none; }

/* Liens nav */
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover  { color: var(--cream-v2); text-decoration: none; }
.nav-links a.active { color: var(--accent); font-weight: 500; }

/* Groupe CTA nav (boutons à droite) */
.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Masquer les liens texte sur mobile, garder les boutons */
@media (max-width: 767px) {
  .nav-links a:not(.btn) { display: none; }
}

/* ── Boutons partagés ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}
.btn:hover  { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:disabled,
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Primaire — bleu plein */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  box-shadow: 0 4px 12px rgba(27, 79, 204, 0.25);
}

/* Secondaire — texte sombre plein */
.btn-secondary {
  background: var(--cream-v2);
  color: #fff;
  border-color: var(--cream-v2);
}
.btn-secondary:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

/* Ghost — contour discret */
.btn-ghost {
  background: transparent;
  color: var(--cream-v2);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--cream-v2);
  color: var(--cream-v2);
}

/* Tailles */
.btn-sm    { padding: 7px 14px; font-size: 13px; }
.btn-lg    { padding: 14px 28px; font-size: 16px; font-weight: 600; }
.btn-xl    { padding: 18px 36px; font-size: 17px; font-weight: 600; }
.btn-block { width: 100%; justify-content: center; }

/* ── Champs de saisie ──────────────────────────────────────────────────── */
.input {
  width: 100%;
  padding: 13px 16px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.4;
  color: var(--cream-v2);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  display: block;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.input::placeholder { color: var(--text-muted); }
.input:hover        { border-color: var(--border-strong); }
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px rgba(27, 79, 204, 0.13);
}
.input.is-error {
  border-color: var(--red);
  box-shadow: 0 0 0 3.5px rgba(192, 57, 43, 0.11);
}
.input:disabled {
  background: var(--bg-v2);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ── Select : caret custom ─────────────────────────────────────────────── */
/* Le <select class="input"> hérite de .input ci-dessus.
   Le wrapper .select-wrap ajoute un caret SVG custom. */
.select-wrap { position: relative; }
.select-wrap select.input { padding-right: 44px; cursor: pointer; }
.select-wrap::after {
  content: '';
  pointer-events: none;
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: translateY(-65%) rotate(45deg);
}

/* ── Checkbox custom ───────────────────────────────────────────────────── */
.checkbox-field {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--bg-v2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.18s ease;
}
.checkbox-field:hover { border-color: var(--border-strong); }
.checkbox-field:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* Case à cocher visuellement épurée */
.checkbox-field input[type="checkbox"] {
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.checkbox-field input[type="checkbox"]:hover {
  border-color: var(--accent);
}
.checkbox-field input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(27, 79, 204, 0.18);
  outline: none;
}
.checkbox-field input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
/* Coche SVG inline sur :checked */
.checkbox-field input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 7px;
  height: 11px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.checkbox-field-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.checkbox-field-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
