/* ============================================================
   OtoMaths — style.css
   Charte graphique principale
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Couleurs principales */
  --navy:        #0D2B5E;
  --navy-deep:   #081729;
  --navy-mid:    #1A3A6E;
  --blue:        #1A6BB0;
  --green:       #2ECC71;
  --green-dark:  #1DA559;
  --green-hover: #25B560;

  /* Neutres */
  --bg:          #F4F6F9;
  --white:       #ffffff;
  --border:      #E2E8F0;
  --border-light:#EEF1F6;
  --text:        #0D2B5E;
  --text-mid:    #7A8BA8;
  --text-light:  #9AAABB;
  --text-muted:  #B0BDC8;

  /* Alertes */
  --amber:       #C47D0E;
  --amber-bg:    #FEF3DC;
  --red:         #B83232;
  --red-bg:      #FDE8E8;

  /* Typographie */
  --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Rayons */
  --r-sm:        8px;
  --r-md:        12px;
  --r-lg:        14px;
  --r-xl:        16px;
  --r-2xl:       20px;

  /* Ombres */
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:   0 4px 16px rgba(13,43,94,0.08);
  --shadow-lg:   0 8px 24px rgba(13,43,94,0.12);

  /* Transitions */
  --t-fast:      0.12s ease;
  --t-med:       0.2s ease;
}

html {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  font-size: 125%; /* zoom global — tout scale proportionnellement */
}

body {
  min-height: 100vh;
}

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

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

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
}

input, select, textarea {
  font-family: var(--font);
}


/* ── NAVIGATION ───────────────────────────────────────────── */
.nav-wrap {
  padding: 14px 2rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: 50px;
  background: var(--navy);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.3px;
  text-decoration: none;
}

.nav-logo span {
  color: var(--green);
}

.nav-logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: var(--white);
  flex-shrink: 0;
}

/* Liens nav */
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 5px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
}

.nav-links a:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.07);
}

.nav-links a.active {
  color: var(--white);
  font-weight: 600;
  background: rgba(255,255,255,0.12);
}

/* Boutons nav */
.nav-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-ghost {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  padding: 6px 16px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  transition: border-color var(--t-fast), color var(--t-fast);
}

.btn-ghost:hover {
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}

/* Bouton hamburger mobile */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
}

.nav-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(255,255,255,0.7);
  border-radius: 2px;
  transition: all var(--t-med);
}

/* Menu mobile */
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 1.25rem;
  background: var(--navy);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  margin-top: 2px;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
}

.nav-mobile a:hover,
.nav-mobile a.active {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.nav-mobile .nav-mobile-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
}


/* ── BOUTONS GLOBAUX ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
}

.btn-primary:hover {
  background: #0A2050;
}

.btn-green {
  background: var(--green);
  color: var(--white);
}

.btn-green:hover {
  background: var(--green-hover);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--navy);
}

.btn-lg {
  padding: 12px 28px;
  font-size: 14px;
  border-radius: 10px;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-full {
  width: 100%;
}


/* ── UTILITAIRES ──────────────────────────────────────────── */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 6px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-bottom: 4px;
}

.section-sub {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  padding: 1.1rem 1.25rem;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 8px;
  border-radius: 5px;
}

.badge-green  { background: #D6F5E7; color: var(--green-dark); }
.badge-blue   { background: #E8EDF5; color: var(--blue); }
.badge-amber  { background: var(--amber-bg); color: var(--amber); }
.badge-red    { background: var(--red-bg); color: var(--red); }
.badge-grey   { background: var(--border-light); color: var(--text-muted); }
.badge-navy   { background: var(--navy); color: var(--white); }

/* Dividers */
.divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}


/* ── FOOTER ───────────────────────────────────────────────── */
.footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.footer a {
  color: var(--blue);
  cursor: pointer;
}

.footer a:hover {
  text-decoration: underline;
}


/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links,
  .nav-right {
    display: none;
  }

  .nav-burger {
    display: flex;
  }

  .nav-wrap {
    padding: 10px 1rem 0;
  }

  .container,
  .container-wide {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .nav-wrap {
    padding: 8px 0.75rem 0;
  }
}

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.35s ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
