/* ═══════════════════════════════════════════════════════════════
   DESIGN SYSTEM — ACPV Annuaire de Varces
   Basé sur le framework Educarisk / cplabs.fr

   PERSONNALISATION COULEURS :
   Modifier uniquement le bloc :root ci-dessous
═══════════════════════════════════════════════════════════════ */

:root {
  /* ── COULEURS ACPV ──────────────────────────────────────── */
  --accent:       #c9a227;   /* or ACPV — boutons, liens actifs */
  --accent-dark:  #a88520;
  --accent-light: #f5d26a;
  --dark:         #0d2137;   /* bleu nuit — navbar, footer, hero */
  --dark-2:       #1a3a5c;
  --dark-3:       #25507a;

  /* ── ALIASES pour templates admin (ne pas supprimer) ────── */
  --blue-950: #070f1a;
  --blue-900: #0d2137;
  --blue-800: #1a3a5c;
  --blue-700: #25507a;
  --blue-600: #2e6496;
  --gold-600: #a88520;
  --gold-500: #c9a227;
  --gold-400: #e6bc3a;
  --gold-300: #f5d26a;
  --acpv-blue:  var(--blue-900);
  --acpv-blue2: var(--blue-800);
  --acpv-gold:  var(--gold-500);
  --acpv-gold2: var(--gold-400);
  --acpv-light: #f0f4f8;
  --surface-0: #eef2f7;
  --surface-1: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --text-1: #0d1f2d;
  --text-2: #3d5166;
  --text-3: #64748b;
  --text-4: #94a3b8;
  --border-0: rgba(0,0,0,.04);
  --border-1: rgba(0,0,0,.07);
  --border-2: rgba(0,0,0,.11);
  --border-gold: rgba(201,162,39,.4);
  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 2px 8px rgba(13,33,55,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(13,33,55,.09), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 36px rgba(13,33,55,.13), 0 4px 8px rgba(0,0,0,.06);
  --shadow-xl: 0 24px 48px rgba(13,33,55,.18), 0 8px 16px rgba(0,0,0,.08);
  --shadow-gold: 0 0 0 3px rgba(201,162,39,.22), 0 4px 20px rgba(201,162,39,.18);
  --shadow-member: 0 0 0 2px var(--gold-500), 0 8px 28px rgba(201,162,39,.28);
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   22px;
  --r-2xl:  32px;
  --r-pill: 999px;
  --ease:        cubic-bezier(.4, 0, .2, 1);
  --ease-out:    cubic-bezier(0, 0, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-1: 120ms var(--ease);
  --t-2: 220ms var(--ease);
  --t-3: 350ms var(--ease-out);

  /* ── COULEURS SYSTÈME ───────────────────────────────────── */
  --text:      #1e1e1e;
  --text-soft: #4a5568;
  --border:    #e2e8f0;
  --surface:   #f8fafc;
  --white:     #ffffff;
}

/* ── Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--surface-0);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
}

button, input, select, textarea, .btn, .form-control, .form-select {
  font-family: 'Inter', system-ui, sans-serif;
}

/* ── Navbar ──────────────────────────────────────────────── */
#main-nav {
  position: sticky;
  top: 0;
  z-index: 1040;
  padding: .55rem 0;
  background: var(--dark);
  border-bottom: 2px solid rgba(201,162,39,.2);
  transition: background var(--t-2), box-shadow var(--t-2), border-color var(--t-2);
}
#main-nav.is-scrolled {
  background: rgba(13,33,55,.96);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom-color: rgba(201,162,39,.3);
  box-shadow: 0 4px 28px rgba(0,0,0,.32);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  text-decoration: none;
  color: #fff !important;
}
.brand-mark { flex-shrink: 0; display: block; }
.brand-word {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -.8px;
  color: #fff;
  line-height: 1;
}
.brand-tag {
  font-size: .6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: rgba(255,255,255,.45);
  line-height: 1.25;
}
.navbar-brand:hover .brand-word { color: var(--brand-p, #0057FF); }

.nav-cta {
  background: var(--brand-p, #0057FF);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
}
.nav-cta:hover {
  background: var(--brand-pd, #0041C2);
  border-color: transparent;
  color: #fff;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: .32rem .8rem;
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.5;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.78);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--t-2);
  font-family: inherit;
}
.nav-btn:hover {
  border-color: rgba(255,255,255,.38);
  color: #fff;
  background: rgba(255,255,255,.08);
}
.nav-btn-gold {
  border-color: rgba(201,162,39,.45);
  color: var(--gold-400);
}
.nav-btn-gold:hover {
  background: rgba(201,162,39,.12);
  border-color: var(--gold-500);
  color: var(--gold-300);
}
.nav-btn-danger {
  border-color: rgba(220,53,69,.35);
  color: rgba(239,100,110,.85);
}
.nav-btn-danger:hover {
  background: rgba(220,53,69,.1);
  border-color: rgba(220,53,69,.65);
  color: #ff6b75;
}

.nav-dropdown .dropdown-toggle::after { margin-left: 5px; }
.nav-dropdown .dropdown-menu {
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: .4rem;
  min-width: 210px;
  background: var(--surface-1);
  margin-top: 6px;
}
.nav-dropdown .dropdown-item {
  border-radius: var(--r-sm);
  font-size: .84rem;
  padding: .42rem .7rem;
  color: var(--text-2);
  transition: background var(--t-1), color var(--t-1);
}
.nav-dropdown .dropdown-item:hover { background: var(--surface-3); color: var(--text-1); }
.nav-dropdown .dropdown-header {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-4);
  padding: .35rem .7rem .15rem;
}
.nav-dropdown .dropdown-divider { margin: .3rem .4rem; border-color: var(--border-0); }

.navbar-toggler {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--r-sm);
  padding: .28rem .46rem;
  background: transparent;
}
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon { filter: invert(1) opacity(.8); }

/* ── Flash messages ──────────────────────────────────────── */
.flash-wrap .alert {
  border-radius: 0;
  border: none;
  border-left: 3px solid;
  font-size: .86rem;
  padding: .7rem 1rem .7rem 1.1rem;
  margin: 0;
}
.flash-wrap .alert-success { border-left-color: #22c55e; background: #f0fdf4; color: #15803d; }
.flash-wrap .alert-warning  { border-left-color: var(--gold-500); background: #fffbeb; color: #92400e; }
.flash-wrap .alert-danger   { border-left-color: #ef4444; background: #fef2f2; color: #991b1b; }
.flash-wrap .alert-info     { border-left-color: #3b82f6; background: #eff6ff; color: #1e40af; }

/* ── Composants publics ──────────────────────────────────── */
.section      { padding: 5rem 0; }
.section-alt  { background: var(--surface); }
.section-dark { background: var(--dark); color: var(--white); }

.section-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .6rem;
  display: block;
}
.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  color: var(--text-1);
  line-height: 1.15;
  letter-spacing: -.3px;
}
.section-title.light { color: var(--white); }
.section-sub { font-size: .95rem; color: var(--text-soft); line-height: 1.75; }
.section-sub.light { color: rgba(255,255,255,.6); }

.page-hero {
  background: var(--dark);
  color: var(--white);
  padding: 3.5rem 0 3rem;
  border-bottom: 2px solid rgba(201,162,39,.2);
}
.page-hero h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; margin: 0 0 .4rem; letter-spacing: -.3px; }
.page-hero p  { color: rgba(255,255,255,.6); margin: 0; font-size: .9rem; }

.card-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 2rem;
  height: 100%;
  transition: box-shadow var(--t-2), transform var(--t-2);
}
.card-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.temoignage {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 2rem;
  border-left: 3px solid var(--accent);
}

/* ── Boutons publics ─────────────────────────────────────── */
.btn-accent {
  background: var(--accent);
  color: var(--dark);
  font-weight: 700;
  padding: .75rem 1.75rem;
  border: none;
  border-radius: var(--r-sm);
  font-size: .875rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background var(--t-2), transform var(--t-2);
}
.btn-accent:hover { background: var(--accent-dark); color: var(--dark); transform: translateY(-1px); }

/* ── Formulaires ─────────────────────────────────────────── */
.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,162,39,.15);
}

/* ── Composants ACPV spécifiques ─────────────────────────── */
.badge-acpv {
  background: var(--gold-500);
  color: #000;
  font-size: .68rem;
  padding: 2px 7px;
  border-radius: var(--r-xs);
  font-weight: 700;
  vertical-align: middle;
  letter-spacing: .2px;
}
.btn-acpv {
  background: var(--blue-900);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-weight: 500;
  transition: background var(--t-2);
}
.btn-acpv:hover { background: var(--blue-800); color: #fff; }

/* ── Alertes Bootstrap override ──────────────────────────── */
.alert { border-radius: var(--r-sm); font-size: .875rem; }
.alert-success { background: #f0fdf4; color: #14532d; border-color: #bbf7d0; }
.alert-danger  { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-info    { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.4);
  padding: 2.5rem 0 1.75rem;
  border-top: 1px solid rgba(255,255,255,.05);
  font-size: .8rem;
}
.footer-brand {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: .25rem;
}
.footer-brand span { color: var(--accent); }
.footer-tagline { font-size: .75rem; color: rgba(255,255,255,.3); margin-bottom: 1.25rem; }
.footer-links a {
  color: rgba(255,255,255,.45);
  text-decoration: none;
  font-size: .82rem;
  transition: color var(--t-2);
  display: inline-block;
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.05);
  margin-top: 2rem;
  padding-top: 1.1rem;
  font-size: .72rem;
  color: rgba(255,255,255,.2);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

/* ── Admin : distinguer champs vides (à saisir) des champs remplis ── */

/* Placeholder : italique + gris clair pour ne pas confondre avec une vraie valeur */
.form-control::placeholder,
textarea.form-control::placeholder {
  color: #a0aec0;
  font-style: italic;
  opacity: 1;
}

/* Champ VIDE (placeholder visible) : bordure orange + fond très légèrement teinté */
.form-control:placeholder-shown {
  border-left: 3px solid #f59e0b;
  background-color: #fffbf0;
}

/* Champ REMPLI (placeholder masqué) : bordure verte + fond neutre */
.form-control:not(:placeholder-shown) {
  border-left: 3px solid #22c55e;
  background-color: #f9fafb;
}

/* Textarea : même logique */
textarea.form-control:placeholder-shown {
  border-left: 3px solid #f59e0b;
  background-color: #fffbf0;
}
textarea.form-control:not(:placeholder-shown) {
  border-left: 3px solid #22c55e;
  background-color: #f9fafb;
}
