/* ==========================================================================
   Dibioti Academy · VTC.AGENCY — socle de design partagé par toutes les pages
   Une seule palette, un seul menu, les mêmes règles d'accessibilité.
   Les styles propres à une page restent dans la page.
   ========================================================================== */

:root {
  /* Palette */
  --paper: #FBF5EE;          /* fond des pages */
  --paper-2: #F4ECDF;        /* fond secondaire (champs, lignes survolées) */
  --card: #FFFFFF;           /* cartes et fenêtres */
  --ink: #241B2F;            /* texte principal */
  --plum-2: #3A2C46;         /* bandeaux sombres */
  --muted: #6E6379;          /* texte secondaire */
  --line: #E4D9CC;           /* filets et bordures */
  --coral: #E1543F;          /* accent décoratif (points, mises en avant) */
  --coral-deep: #B93F2E;     /* actions principales (boutons, liens d'action) */
  --coral-hover: #9C3527;
  --coral-tint: #FFF6F3;     /* fond d'un choix sélectionné */
  --error-bg: #FAECE7;       /* fond des messages d'erreur */
  --teal: #2F6E68;           /* confiance, rassurance, focus clavier */
  --teal-bg: #E7F1EF;
  --gold: #8C6A1D;
  --ok: #3DDC97;             /* pastille « en ligne » */
  --on-dark: #F0EAE0;        /* texte sur fond sombre */
  --on-dark-muted: #C8BFCF;
  --shadow: rgba(36, 27, 47, 0.10);

  /* Typographie */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  color-scheme: light;
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Accessibilité : focus clavier visible, lien d'évitement, texte pour lecteurs d'écran */
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -64px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px;
  font: 500 14px var(--font-body); text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

/* ==========================================================================
   Menu (bureau : une ligne · mobile et tablette : bouton « Menu » qui déplie)
   ========================================================================== */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 245, 238, 0.92);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  line-height: 1.6; font-family: var(--font-body);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 16px 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 8px; box-sizing: border-box;
}
.logo {
  font-family: var(--font-display); font-weight: 700; font-size: 19px;
  letter-spacing: -0.2px; margin-right: auto; color: inherit; text-decoration: none;
}
.logo span { color: var(--coral); }

.nav-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 8px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.nav-links li { margin: 0; font-size: 16px; } /* à l'abri des règles « li » propres à chaque page */
.nav-links a, .nav-links button {
  background: none; border: none; font-family: var(--font-body); font-size: 14px;
  color: var(--muted); padding: 8px 14px; border-radius: 20px; cursor: pointer;
  transition: all .15s; text-decoration: none; display: inline-block;
}
.nav-links a:hover, .nav-links button:hover { color: var(--ink); background: var(--teal-bg); }
.nav-links a.active, .nav-links button.active,
.nav-links a[aria-current="page"] {
  color: var(--ink); background: var(--card); box-shadow: 0 0 0 1px var(--line); font-weight: 500;
}
.nav-cta {
  background: var(--coral-deep); color: #fff; border: none; padding: 10px 20px;
  border-radius: 24px; font-family: var(--font-body); font-size: 14px; font-weight: 500;
  cursor: pointer; text-decoration: none; display: inline-block;
}
.nav-cta:hover { background: var(--coral-hover); }
#nav-auth { display: flex; align-items: center; gap: 8px; }

.nav-toggle { display: none; }

@media (max-width: 1080px) {
  html.js .nav-inner { flex-wrap: nowrap; padding: 8px 16px; min-height: 60px; gap: 8px; }
  html.js .logo { font-size: 17px; white-space: nowrap; padding-block: 12px; margin-block: -12px; }

  html.js .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
    min-height: 44px; min-width: 108px; justify-content: center; padding: 0 14px; border-radius: 22px;
    border: 1px solid var(--line); background: var(--card); color: var(--ink);
    font: 500 15px var(--font-body); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 16px; height: 2px; background: currentColor;
    border-radius: 2px; content: ""; transition: transform .2s, top .2s;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before { position: absolute; top: -5px; left: 0; }
  .nav-toggle-bars::after { position: absolute; top: 5px; left: 0; }
  nav.is-open .nav-toggle-bars { background: transparent; }
  nav.is-open .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
  nav.is-open .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

  html.js .nav-panel { display: none; }
  html.js nav.is-open .nav-panel {
    display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px;
    position: absolute; left: 0; right: 0; top: 100%;
    padding: 12px 16px 20px; background: var(--paper);
    border-bottom: 1px solid var(--line); box-shadow: 0 16px 24px var(--shadow);
    max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto;
  }
  .nav-links { flex-direction: column; gap: 2px; }
  .nav-links a, .nav-links button {
    display: flex; align-items: center; width: 100%; min-height: 48px;
    padding: 12px 14px; border-radius: 12px; font-size: 16px; text-align: left;
  }
  .nav-cta {
    display: flex; align-items: center; justify-content: center;
    min-height: 48px; width: 100%; font-size: 16px;
  }
  #nav-auth { width: 100%; }
  #nav-auth .nav-cta { flex: 1; }
  #nav-auth > span { flex: 1; }
}

/* Petits téléphones : le logo passe sur deux lignes plutôt que de faire déborder la page */
@media (max-width: 480px) {
  html.js .logo { font-size: 15px; white-space: normal; line-height: 1.2; min-width: 0; }
}
@media (max-width: 380px) {
  html.js .logo { font-size: 14px; }
}

@media (min-width: 1081px) {
  .nav-toggle { display: none !important; }
}

/* ==========================================================================
   Confort au toucher (téléphone et tablette)
   - zones de toucher d'au moins 44 px, sans déplacer la mise en page
   - champs à 16 px : évite le zoom automatique de l'iPhone au clic
   ========================================================================== */
@media (max-width: 720px) {
  footer a, .footer-note a, .back { padding-block: 12px; margin-block: -12px; }
  .lex-btn, .fab, .order-btn { min-height: 44px; }
  summary { padding-block: 11px; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { min-height: 44px; font-size: 16px; }
  #sb-auth-modal input { font-size: 16px !important; }
}
