/* ==========================================================================
   Design system — SAMARIS Conseil et Finance
   Chargé sur toutes les pages : tokens, reset, typographie, boutons,
   navigation, pied de page, formulaires génériques, bannière cookies.
   Palette officielle de marque : Bleu nuit #0A315C · Or #C89B4B · Ivoire #FAF7F2
   ========================================================================== */

:root {
  /* Colors — palette officielle de marque */
  --clr-navy:        #0A315C; /* Bleu nuit principal — texte, rivière, fonds sombres */
  --clr-navy-light:  #143E6A; /* Bleu nuit secondaire — liens, variations sur fond clair */
  --clr-gold:        #C89B4B; /* Or principal — filets, icônes, accents */
  --clr-gold-dark:   #B8842E; /* Or soutenu — hover / actif */
  --clr-gold-dim:    rgba(200,155,75,0.4);
  --clr-sand:        #EADCC7; /* Beige sable — décor */
  --clr-beige:       #F5EEE4; /* Beige clair — surfaces secondaires */
  --clr-olive:       #6B7355; /* Vert olive — accents végétaux (feuilles du logo) */
  --clr-olive-light: #8A9174;
  --clr-ivory:       #FAF7F2; /* Fond ivoire — fond principal du site */
  --clr-white:       #FFFFFF;
  --clr-text:        #23303F; /* Texte courant */
  --clr-text-muted:  rgba(35,48,63,0.55);
  --clr-border:      rgba(10,49,92,0.12);

  /* Typography */
  --font-sans:  'Instrument Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Gloock', Georgia, 'Times New Roman', serif;

  --text-xs:   0.6875rem; /* 11px */
  --text-sm:   0.8125rem; /* 13px */
  --text-base: 0.875rem;  /* 14px */
  --text-md:   1rem;      /* 16px */
  --text-lg:   1.125rem;  /* 18px */
  --text-xl:   1.5rem;    /* 24px */
  --text-2xl:  2.125rem;  /* 34px */

  /* Spacing */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-18: 4.5rem;

  /* Radius */
  --r-sm:  4px;
  --r-md:  6px;
  --r-lg:  8px;
  --r-xl:  10px;
  --r-full: 9999px;

  /* Shadow */
  --shadow-sm:  0 1px 3px rgba(10,49,92,0.06);
  --shadow-md:  0 4px 16px rgba(10,49,92,0.10);
  --shadow-lg:  0 8px 32px rgba(10,49,92,0.15);

  /* Layout */
  --nav-height: 73px;
  --page-max: 1440px;
  --container-max: 1280px;

  /* Transitions */
  --ease: 0.2s ease;
}

/* — Reset — */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-sans); font-size: var(--text-base); font-weight: 400; color: var(--clr-text); background: var(--clr-ivory); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 400; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* — Focus visible — */
:focus-visible {
  outline: 2.5px solid var(--clr-gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* — Shared layout utility — */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-8);
}

/* — Shared section header (eyebrow + serif title) — */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-gold-dark);
  margin-bottom: 20px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 400;
  color: var(--clr-navy);
  line-height: 1.2;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 12px 26px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background var(--ease), color var(--ease), border-color var(--ease), box-shadow var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--clr-gold);
  border-color: var(--clr-gold);
  color: var(--clr-navy);
}
.btn-primary:hover {
  background: transparent;
  color: var(--clr-gold);
}
.btn-outline {
  background: transparent;
  color: var(--clr-gold);
  border: 1.5px solid var(--clr-gold);
}
.btn-outline:hover {
  background: var(--clr-gold);
  color: var(--clr-navy);
}
.btn-ghost {
  background: transparent;
  color: var(--clr-navy-light);
  border: 1.5px solid var(--clr-border);
}
.btn-ghost:hover {
  background: rgba(10,49,92,0.06);
}
.btn-sm { padding: 8px 16px; font-size: 10.5px; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   NAV — fixe, sombre, translucide (architecture v4)
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(200, 155, 75, 0.3);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--sp-8);
  height: var(--nav-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-6);
}
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  justify-self: start;
}
.nav-logo-img { height: 51px; width: auto; object-fit: contain; }
/* Sur desktop, nav-menu s'efface pour que ses enfants (liens + CTA)
   deviennent des cellules indépendantes de la grille de nav-inner :
   liens centrés, bouton casé à droite. Le menu déroulant mobile
   (voir la media query) redéfinit display explicitement. */
.nav-menu { display: contents; }
.nav-links { display: flex; align-items: center; gap: 40px; justify-self: center; }
.nav-cta { justify-self: end; }
.nav-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-navy);
  text-decoration: none;
  transition: color var(--ease);
}
.nav-link:hover { color: var(--clr-gold-dark); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: var(--sp-2); }
.nav-toggle-bar { width: 22px; height: 1.5px; background: var(--clr-navy); border-radius: 2px; transition: transform var(--ease), opacity var(--ease); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--clr-navy);
  border-top: 1px solid rgba(200, 155, 75, 0.2);
}
.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--sp-3) var(--sp-8);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--sp-4);
}
.footer-brand { display: flex; align-items: center; justify-self: start; }
.footer-brand-icon { height: 100px; width: auto; opacity: 0.92; }
.footer-links { display: flex; gap: var(--sp-8); flex-wrap: wrap; justify-self: center; }
.footer-links a {
  font-size: 13px;
  color: rgba(234, 220, 199, 0.5);
  text-decoration: none;
  transition: color var(--ease);
}
.footer-links a:hover { color: var(--clr-gold); }
.footer-link-btn {
  font: inherit;
  font-size: 13px;
  color: rgba(234, 220, 199, 0.5);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color var(--ease);
}
.footer-link-btn:hover { color: var(--clr-gold); }
.footer-copy { font-size: 13px; color: rgba(234, 220, 199, 0.35); justify-self: end; text-align: right; }
.footer-credits {
  text-align: center;
  padding: var(--sp-2) var(--sp-8) var(--sp-3);
  font-size: 11px;
  color: rgba(234, 220, 199, 0.3);
}
.footer-credits a { color: var(--clr-gold); text-decoration: none; }
.footer-credits a:hover { text-decoration: underline; }

/* ============================================================
   FORMULAIRES — champs génériques (fond clair)
   ============================================================ */
.form-field { display: flex; flex-direction: column; gap: var(--sp-2); }
.form-field--honeypot { display: none; }
.form-label { font-size: var(--text-sm); font-weight: 500; color: var(--clr-navy); }
.form-label span { color: var(--clr-gold); }
.form-input {
  padding: 15px 18px;
  border: 1px solid rgba(10,49,92,0.16);
  border-radius: 14px;
  font-size: var(--text-base);
  color: var(--clr-text);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(250,247,242,0.92) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 10px 24px rgba(10,49,92,0.04);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease), background var(--ease);
  width: 100%;
  caret-color: var(--clr-gold-dark);
  appearance: none;
}
.form-input::placeholder {
  color: rgba(35,48,63,0.38);
  transition: color var(--ease), transform var(--ease);
}
.form-input:hover {
  border-color: rgba(10,49,92,0.26);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 14px 30px rgba(10,49,92,0.06);
}
.form-input:focus {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(184,132,46,0.9);
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(250,247,242,0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    0 0 0 4px rgba(200,155,75,0.14),
    0 16px 36px rgba(10,49,92,0.08);
}
.form-input:focus::placeholder {
  color: rgba(35,48,63,0.24);
  transform: translateX(2px);
}
.form-input--error {
  border-color: #b3432f;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 0 0 4px rgba(179,67,47,0.08);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.7;
}
.form-rgpd {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 4px;
}
.form-rgpd input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--clr-gold);
  cursor: pointer;
}
.form-rgpd label {
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: rgba(10, 49, 92, 0.55);
  line-height: 1.5;
  cursor: pointer;
}
.form-rgpd label a {
  color: var(--clr-gold-dark);
  text-decoration: none;
}
.form-error { font-size: var(--text-xs); color: #b3432f; }
.alert { padding: var(--sp-4); border-radius: var(--r-sm); font-size: var(--text-sm); margin-bottom: var(--sp-5); }
.alert-error { background: #fdf2f0; color: #a13a28; border: 1px solid #f0cabf; }

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: var(--sp-4);
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - var(--sp-8)), 640px);
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  padding: var(--sp-4) var(--sp-6);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner { display: flex; align-items: center; gap: var(--sp-6); flex-wrap: wrap; }
.cookie-banner-text { flex: 1; min-width: 200px; }
.cookie-title { font-size: var(--text-sm); font-weight: 600; color: var(--clr-navy); margin-bottom: 4px; }
.cookie-desc  { font-size: 12px; color: var(--clr-text-muted); line-height: 1.5; }
.cookie-desc a { color: var(--clr-navy-light); }
.cookie-banner-actions { display: flex; gap: var(--sp-2); flex-shrink: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* — Tablette / petit laptop — nav en menu burger, footer empilé.
     Déclenché dès 1024px : avec 5 liens + logo agrandi + bouton CTA,
     la nav desktop ne tient plus dans une seule ligne en dessous de
     ~1300px de large ; le footer (logo 100px + copyright complet +
     3 liens) ne tient plus dans sa grille 3 colonnes sous ~1100px. */
@media (max-width: 1024px) {
  :root { --nav-height: 59px; }
  .nav-inner { padding: 0 var(--sp-6); }
  .nav-logo-img { height: 37px; }
  .nav-menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--clr-ivory);
    border-bottom: 1px solid rgba(200, 155, 75, 0.3);
    padding: var(--sp-4) var(--sp-6);
    gap: var(--sp-4);
  }
  .nav-menu.is-open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-links { flex-direction: column; align-items: flex-start; gap: var(--sp-4); }

  .footer-inner { display: flex; flex-direction: column; align-items: flex-start; padding: var(--sp-6) var(--sp-6); }
  .footer-brand-icon { height: 60px; }
  .footer-links { gap: var(--sp-4); justify-self: auto; }
  .footer-copy { justify-self: auto; text-align: left; }
}

/* — Smartphone — */
@media (max-width: 600px) {
  :root { --nav-height: 47px; }
  .nav-inner { padding: 0 var(--sp-4); }
  .nav-logo-img { height: 26px; }
  .footer-inner { padding: var(--sp-6) var(--sp-4); }
  .footer-brand-icon { height: 50px; }
  .footer-links { gap: var(--sp-3); }
  .footer-credits { padding: 0 var(--sp-4) var(--sp-5); }
  .form-row { grid-template-columns: 1fr; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .nav, .cookie-banner, .footer-credits { display: none; }
}
