/* ==========================================================================
   BH² Group — Fondations : reset, variables, typographie
   ========================================================================== */

:root {
  /* Charte graphique BH² Group */
  --color-violet-deep-1: #2B0F49;
  --color-violet-deep-2: #4A1D74;
  --color-violet-medium: #6B2FA0;
  --color-magenta-1: #C13F91;
  --color-magenta-2: #D65FA6;
  --color-rose-pale: #F0AED4;
  --color-rose-pale-soft: #FBEAF4;
  --color-bg: #FCF9FC;

  /* Neutres (l'essentiel de l'UI reste neutre — la marque est réservée aux accents) */
  --color-ink: #1D1420;
  --color-ink-soft: #4A4351;
  --color-grey-100: #F4F1F5;
  --color-grey-200: #E8E3EB;
  --color-grey-300: #D6CFDB;
  --color-white: #FFFFFF;

  /* Vert WhatsApp assombri : le vert de marque officiel (#25D366) ne passe pas
     le contraste AA avec du texte/icônes blancs (~2:1) ; cette teinte plus
     sombre reste reconnaissable comme "WhatsApp" tout en offrant ~7.7:1. */
  --color-whatsapp: #075E54;
  --color-whatsapp-rgb: 7, 94, 84;

  /* Dégradés de marque */
  --gradient-brand: linear-gradient(135deg, var(--color-violet-medium), var(--color-magenta-1));
  --gradient-header: linear-gradient(180deg, var(--color-violet-deep-1), var(--color-violet-deep-2));

  /* Typographie */
  --font-title: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Rythme d'animation — une seule temporalité dans tout le site */
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 250ms;
  --duration-section: 600ms;

  /* Espacements */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Rayons et ombres */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-rest: 0 2px 10px rgba(43, 15, 73, 0.06);
  --shadow-hover: 0 16px 32px rgba(43, 15, 73, 0.14);

  --container-max: 1320px;
  --header-height: 84px;
  --reassurance-height: 40px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Garantit que l'attribut/la propriété `hidden` masque toujours l'élément,
   même quand une classe lui donne son propre `display` (flex/grid/etc.) —
   sans ça, `display: flex` sur .checkout-form (par ex.) a la même
   spécificité que la règle UA par défaut `[hidden] { display: none }` et,
   étant déclarée après, l'emporte : l'élément reste visible malgré `hidden`. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: var(--color-violet-deep-1);
}

h1 { font-size: clamp(2.4rem, 4.5vw, 3.75rem); }
h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

/* États de focus clavier — traitement intentionnel, jamais juste fonctionnel */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-magenta-1);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.visually-hidden {
  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;
  top: -48px;
  left: var(--space-sm);
  z-index: 1000;
  background: var(--color-violet-deep-1);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  transition: top var(--duration-fast) var(--ease-standard);
}

.skip-link:focus {
  top: var(--space-sm);
}

.no-js-banner {
  background: var(--color-violet-deep-1);
  color: var(--color-rose-pale-soft);
  text-align: center;
  padding: 0.75rem 1rem;
  font-family: sans-serif;
  font-size: 0.9rem;
}

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