/* ============================================================
   STYLE.CSS — Styles partagés AMI
   Référence visuelle : index.html
   ============================================================ */

/* ============================
   VARIABLES & RESET
============================ */
:root {
  --color-primary:      #2a5c6e;
  --color-primary-dark: #1c3e4a;
  --color-gold:         #c8a050;
  --color-gold-light:   #e8c87a;
  --color-cream:        #f7f2ec;
  --color-cream-dark:   #ede7de;
  --color-text:         #2d2d2d;
  --color-text-light:   #5c5c5c;
  --color-white:        #ffffff;
  --color-accent:       #7a9e7e;
  --font-sans: 'Nunito', 'Arial Rounded MT Bold', Arial, sans-serif;
  --radius: 6px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.14);
  --transition: all 0.3s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); color: var(--color-text); background: var(--color-white); line-height: 1.7; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ============================
   TYPOGRAPHY
============================ */
h1, h2, h3, h4 { font-family: var(--font-sans); line-height: 1.2; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.gold { color: var(--color-gold); }
.lead { font-size: 1.15rem; color: var(--color-text-light); line-height: 1.8; }
.lead--white { color: rgba(255,255,255,0.82); }
.serif-italic { font-style: italic; }

/* ============================
   LAYOUT UTILITIES
============================ */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--sm { padding: 56px 0; }
.section--cream { background: var(--color-cream); }
.section--dark { background: var(--color-primary-dark); color: var(--color-white); }
.section--pro { background: #132b35; color: var(--color-white); }
.section--primary { background: var(--color-primary); color: var(--color-white); }

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.section-label--light { color: var(--color-gold-light); }
.section-label--left { justify-content: flex-start; }
.section-label::before, .section-label::after {
  content: ''; flex: none; width: 28px; height: 1px; background: currentColor; opacity: 0.5;
}
.section-label--left::before { display: none; }

.section-heading { margin-bottom: 24px; }
.section-heading + .lead { margin-bottom: 48px; }

.divider { display: block; width: 48px; height: 2px; background: var(--color-gold); margin: 20px auto 32px; }
.divider--left { margin-left: 0; margin-right: auto; }
.text-center { text-align: center; }
.text-white { color: var(--color-white); }
.text-gold { color: var(--color-gold-light); }

.grid { display: grid; gap: 32px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* ============================
   BUTTONS
============================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn--primary { background: var(--color-gold); color: var(--color-primary-dark); border-color: var(--color-gold); }
.btn--primary:hover { background: var(--color-gold-light); border-color: var(--color-gold-light); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,160,80,0.4); }
.btn--outline { background: transparent; color: var(--color-white); border-color: rgba(255,255,255,0.6); }
.btn--outline:hover { background: rgba(255,255,255,0.1); border-color: var(--color-white); transform: translateY(-2px); }
.btn--outline-dark { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn--outline-dark:hover { background: var(--color-primary); color: var(--color-white); transform: translateY(-2px); }
.btn--lg { padding: 18px 36px; font-size: 1.05rem; }

/* ============================
   NAVBAR
============================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: var(--transition);
}
.navbar--scrolled {
  background: var(--color-white);
  padding: 12px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.navbar__logo {
  height: 40px;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  transition: var(--transition);
}
.navbar--scrolled .navbar__logo {
  filter: brightness(0) saturate(100%) invert(27%) sepia(40%) saturate(650%) hue-rotate(155deg) brightness(90%) contrast(95%);
}

/* Brand avec sous-label (financeur) */
.navbar__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.navbar__brand-sub {
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold-light);
  transition: var(--transition);
}
.navbar--scrolled .navbar__brand-sub { color: var(--color-text-light); }

/* Liens de navigation */
.navbar__nav {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.navbar__nav a {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.85);
  transition: var(--transition);
}
.navbar--scrolled .navbar__nav a { color: var(--color-text); }
.navbar__nav a:hover { color: var(--color-gold-light); }
.navbar--scrolled .navbar__nav a:hover { color: var(--color-primary); }

/* Groupe d'actions */
.navbar__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Lien "Espace financeurs" (index) */
.navbar__financeur {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  transition: var(--transition);
}
.navbar--scrolled .navbar__financeur { color: var(--color-text-light); }
.navbar__financeur:hover { color: var(--color-gold-light) !important; }

/* Lien "← Site principal" (financeur) */
.navbar__back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  transition: var(--transition);
}
.navbar--scrolled .navbar__back { color: var(--color-text-light); }
.navbar__back:hover { color: var(--color-gold-light) !important; }

.navbar__cta { padding: 10px 22px; font-size: 0.875rem; }

/* Bouton hamburger */
.navbar__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: rgba(255,255,255,0.85);
  transition: var(--transition);
  line-height: 1;
  position: relative;
  z-index: 101;
}
.navbar--scrolled .navbar__toggle { color: var(--color-text); }
.navbar__toggle i { font-size: 1.6rem; display: block; }

/* ============================
   RESPONSIVE NAVBAR (mobile)
============================ */
@media (max-width: 768px) {
  .navbar__toggle { display: block; }

  .navbar__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-primary-dark);
    flex-direction: column;
    gap: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    padding-bottom: 16px;
  }
  .navbar__nav.is-open { display: flex; }

  .navbar__nav li { width: 100%; }
  .navbar__nav a {
    display: block;
    padding: 14px 24px;
    font-size: 1rem;
    color: rgba(255,255,255,0.9) !important;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .navbar__nav a:hover {
    color: var(--color-gold-light) !important;
    background: rgba(255,255,255,0.05);
  }

  .navbar__financeur,
  .navbar__back { display: none; }
}

/* ============================
   RESPONSIVE GÉNÉRAL
============================ */
@media (max-width: 480px) {
  .section { padding: 64px 0; }
  .section--sm { padding: 40px 0; }
}
