:root {
  --primary: #1a1a1a;
  --secondary: #ce011f;
  --accent: #d81b60;
  --white: #FFFFFF;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d8;
  --gray-400: #a1a1aa;
  --gray-500: #71717a;
  --gray-600: #52525b;
  --gray-700: #3f3f46;
  --gray-800: #27272a;
  --gray-900: #18181b;
  --success: #ce011f;
  --warning: #f59e0b;
  --error: #ef4444;
  --essential: #ce011f;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--primary);
  background: var(--white);
  line-height: 1.6;
  font-weight: 400;
}

/* --- Header & Nav --- */
.header {
  position: sticky; top: 0; z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--gray-200); transition: all 0.3s ease;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }

.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; color: var(--primary); text-decoration: none; }
.brand-logo {
  height: 70px;       /* Logo agrandi (était 50px) */
  width: auto;        /* Largeur libre pour s'adapter au ratio de l'image */
  display: flex;
  align-items: center; /* Centre l'image verticalement */
  justify-content: flex-start;
  margin-right: 0;    /* Suppression des marges parasites */
}
.brand-logo img {
  height: 100%;       /* L'image remplit la hauteur définie (50px) */
  width: auto;        /* Garde les proportions exactes */
  max-width: 360px;   /* Élargi pour la nouvelle image plus large (ajustable) */
  object-fit: contain; /* Assure que tout le logo est visible */
  display: block;      /* Évite les espaces fantômes sous l'image */
}

.brand-text { display: flex; flex-direction: column; align-items: flex-start; }
.brand-name { font-size: 18px; font-weight: 800; color: var(--primary); line-height: 1; }
.brand-tagline { font-size: 10px; font-weight: 400; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1px; line-height: 1; }

.nav-links { display: flex; gap: 32px; align-items: center; margin-left: auto; margin-right: 32px; }
.nav-links a { font-weight: 500; color: var(--gray-700); text-decoration: none; font-size: 15px; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--primary); }

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

/* Desktop: le panneau repliable se comporte comme avant (menu+cta a droite) */
.nav-collapse { display: flex; align-items: center; flex: 1; }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0; margin-left: auto; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--primary); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Boutons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 14px;
  text-decoration: none; transition: all 0.2s ease; border: none; cursor: pointer;
}
.btn-primary {
  background: var(--secondary); color: white;
}
.btn-primary:hover {
  background: var(--accent); transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.15);
}
.btn-secondary {
  background: transparent; color: var(--gray-700); border: 1px solid var(--gray-300);
}
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); }

.btn-white { background: white; color: var(--secondary); }
.btn-white:hover { background: var(--gray-100); transform: translateY(-1px); }

.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.3); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); }

/* --- Footer --- */
.footer { background: var(--gray-900); color: var(--gray-300); padding: 40px 0; }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--gray-400); text-decoration: none; font-size: 14px; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--gray-200); }

/* --- Sélecteur de langue (i18n.js) --- */
.lang-switch { display: inline-flex; border: 1px solid var(--gray-300); border-radius: 8px; overflow: hidden; background: var(--white); }
.lang-switch button {
  font-family: inherit; font-size: 13px; font-weight: 700; letter-spacing: .02em;
  padding: 7px 11px; border: 0; background: transparent; color: var(--gray-500);
  cursor: pointer; transition: background .15s ease, color .15s ease; line-height: 1;
}
.lang-switch button + button { border-left: 1px solid var(--gray-200); }
.lang-switch button:hover { background: var(--gray-50); color: var(--gray-800); }
.lang-switch button.active { background: var(--secondary); color: var(--white); }

/* --- Message d'erreur inline (remplace alert() natif) --- */
.fe-inline-error {
  display: none; margin-top: 8px; padding: 8px 12px;
  background: rgba(239,68,68,0.08); border: 1px solid var(--error); border-radius: 8px;
  color: var(--error); font-size: 14px; font-weight: 500;
}
.input-error { border-color: var(--error) !important; box-shadow: 0 0 0 2px rgba(239,68,68,0.15); }

/* --- Global Responsive --- */
@media (max-width: 968px) {
  .footer-content { flex-direction: column; text-align: center; }

  /* Mobile: tout (menu + langue + bouton) dans le hamburger */
  .nav-toggle { display: flex; margin-left: auto; }
  .nav-collapse {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 18px;
    background: var(--white); padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  }
  .nav-collapse.open { display: flex; }
  .nav-links, .nav-cta, .nav-actions { display: flex; flex-direction: column; align-items: stretch; gap: 16px; margin: 0; }
  .nav-cta .btn, .nav-actions .btn { width: 100%; text-align: center; }
  .lang-switch { align-self: flex-start; }
}