/* ============================================================
   HUMEET - main.css
   Variables, reset, typographie, layout global
   Charte graphique : Atlas / Pulse / Brise / Givre / Dark
   ============================================================ */

/* ------------------------------------------------------------
   1. VARIABLES (charte graphique - source de vérité)
   ------------------------------------------------------------ */
:root {
  --atlas: #596DA7;
  --pulse: #F94D69;
  --brise: #A0D3D9;
  --givre: #FAFAFA;
  --dark: #162728;
  --success: #1FBF86; /* vert (hors charte d'origine, demandé pour le comparatif) */

  --gradient-primary: linear-gradient(135deg, #F94D69, #596DA7);
  --gradient-soft: linear-gradient(135deg, rgba(249, 77, 105, 0.08), rgba(89, 109, 167, 0.08));

  --font-black: 'Satoshi', sans-serif;   /* graisse 900 pour les titres */
  --font-medium: 'Satoshi', sans-serif;  /* graisse 500 pour le texte courant */

  --radius-card: 20px;
  --radius-pill: 999px;
  --shadow-premium: 0 20px 60px rgba(89, 109, 167, 0.15);
  --shadow-glass: 0 8px 32px rgba(22, 39, 40, 0.08);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Échelle typographique fluide (mobile-first) */
  --text-hero: clamp(2.25rem, 6vw, 4.25rem);
  --text-h2: clamp(1.75rem, 4vw, 2.75rem);
  --text-h3: clamp(1.25rem, 2.5vw, 1.5rem);
  --text-body: 1.0625rem;
  --text-small: 0.9rem;

  /* Espacements */
  --space-section: clamp(2.75rem, 6vw, 5rem);
  --space-block: clamp(1.5rem, 4vw, 2.5rem);
  --container-max: 1200px;
}

/* ------------------------------------------------------------
   2. RESET
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-medium);
  font-weight: 500;
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--dark);
  background-color: var(--givre);
  overflow-x: clip; /* verrou anti-scroll latéral (décor débordant) */
}

html { overflow-x: clip; }

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

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

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

/* Focus visible - accessibilité clavier (WCAG) */
:focus-visible {
  outline: 3px solid var(--pulse);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ------------------------------------------------------------
   3. TYPOGRAPHIE
   ------------------------------------------------------------ */
h1,
h2,
h3,
h4 {
  font-family: var(--font-black);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--dark);
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

p {
  max-width: 65ch;
}

.text-muted {
  color: rgba(22, 39, 40, 0.65);
}

.text-center {
  text-align: center;
}

.text-center p {
  margin-inline: auto;
}

/* Texte en dégradé - signature visuelle */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Eyebrow : petit libellé au-dessus des titres de section */
.eyebrow {
  display: inline-block;
  font-family: var(--font-black);
  font-weight: 900;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--pulse);
  margin-bottom: 1rem;
}

/* ------------------------------------------------------------
   4. LAYOUT
   ------------------------------------------------------------ */
.container {
  width: min(100% - 2.5rem, var(--container-max));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-section);
  position: relative;
}

.section-header {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--space-block);
}

.section-header p {
  margin-top: 1rem;
  margin-inline: auto;
  color: rgba(22, 39, 40, 0.7);
}

/* Grilles responsives - mobile-first : 1 colonne par défaut */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Fond alterné pour rythmer les sections */
/* Voile translucide : le fond dynamique reste perceptible derrière */
.section--tinted {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(60% 80% at 85% 10%, rgba(160, 211, 217, 0.14), transparent 60%),
    radial-gradient(50% 70% at 10% 90%, rgba(249, 77, 105, 0.06), transparent 60%);
}

/* Base blanche translucide qui se fond en haut et en bas :
   adoucit les "marches" de couleur entre sections voisines */
.section--tinted::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.5);
  -webkit-mask: linear-gradient(
    to bottom,
    transparent 0,
    #000 48px,
    #000 calc(100% - 48px),
    transparent 100%
  );
  mask: linear-gradient(
    to bottom,
    transparent 0,
    #000 48px,
    #000 calc(100% - 48px),
    transparent 100%
  );
}

.section--dark {
  background:
    radial-gradient(70% 90% at 80% 0%, rgba(89, 109, 167, 0.35), transparent 60%),
    var(--dark);
  color: var(--givre);
}

.section--dark h2,
.section--dark h3 {
  color: var(--givre);
}

.section--dark .text-muted,
.section--dark p {
  color: rgba(250, 250, 250, 0.75);
}

/* ------------------------------------------------------------
   5. HERO - base commune à toutes les pages
   ------------------------------------------------------------ */
.hero {
  position: relative;
  padding-top: clamp(6.5rem, 11vw, 8.5rem); /* dégage la navbar fixe */
  padding-bottom: clamp(2rem, 4vw, 3rem);
  overflow: hidden;
}

/* Hero compact : pour les pages où l'on veut accéder vite au
   contenu (tarifs, service client). Moins de respiration verticale. */
.hero--compact {
  padding-top: clamp(6.5rem, 11vw, 8.5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

/* Quand un hero compact précède une section teintée, on fait
   porter le même fond teinté au hero pour effacer la "marche"
   de couleur entre les deux blocs. */
.hero--compact.hero--tinted {
  background:
    radial-gradient(60% 80% at 85% 10%, rgba(160, 211, 217, 0.14), transparent 60%),
    radial-gradient(50% 70% at 10% 90%, rgba(249, 77, 105, 0.06), transparent 60%),
    rgba(255, 255, 255, 0.5);
}

/* La section qui suit immédiatement un hero compact teinté
   ne réaffiche pas son padding haut complet (continuité). */
.hero--compact.hero--tinted + .section--tinted {
  padding-top: clamp(1rem, 3vw, 2rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.hero-content--center {
  margin-inline: auto;
  text-align: center;
}

.hero-content--center p {
  margin-inline: auto;
}

.hero-subtitle {
  margin-top: 1.5rem;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  color: rgba(22, 39, 40, 0.72);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.hero-content--center .hero-ctas {
  justify-content: center;
}

/* ------------------------------------------------------------
   Fond dynamique global - couche fixe derrière tout le site.
   Les blobs dérivent lentement ; le backdrop-filter des éléments
   en liquid glass (navbar, cards, FAQ) réagit à leur passage.
   ------------------------------------------------------------ */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.bg-blob--1 {
  width: 55vmax;
  height: 55vmax;
  top: -22vmax;
  right: -16vmax;
  background: radial-gradient(circle, rgba(249, 77, 105, 0.42), transparent 65%);
}

.bg-blob--2 {
  width: 60vmax;
  height: 60vmax;
  bottom: -28vmax;
  left: -20vmax;
  background: radial-gradient(circle, rgba(89, 109, 167, 0.4), transparent 65%);
}

.bg-blob--3 {
  width: 42vmax;
  height: 42vmax;
  top: 28%;
  left: 32%;
  background: radial-gradient(circle, rgba(160, 211, 217, 0.38), transparent 65%);
}

.bg-blob--4 {
  width: 36vmax;
  height: 36vmax;
  top: 58%;
  right: 8%;
  background: radial-gradient(circle, rgba(249, 77, 105, 0.18), transparent 65%);
}

/* Voile lumineux rotatif très subtil : donne la sensation que la
   lumière tourne lentement autour de la page */
.bg-sheen {
  position: absolute;
  inset: -30%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 255, 255, 0.5) 70deg,
    transparent 140deg,
    rgba(160, 211, 217, 0.25) 220deg,
    transparent 300deg
  );
  mix-blend-mode: soft-light;
  opacity: 0.6;
  will-change: transform;
}

/* Vidéo de fond : couvre l'écran, par-dessus les blobs fallback */
.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Grain texturé : casse les aplats des dégradés, rendu premium */
.bg-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
}

/* Mobile : effets allégés pour préserver les performances */
@media (max-width: 768px) {
  .bg-blob { filter: blur(60px); }
  .bg-blob--4,
  .bg-sheen { display: none; }
}

/* Logo secondaire "um" géant en filigrane (image officielle) */
.um-watermark {
  position: absolute;
  z-index: 1;
  right: -2%;
  bottom: -6%;
  width: clamp(280px, 42vw, 640px);
  height: auto;
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
}

/* ------------------------------------------------------------
   6. UTILITAIRES DIVERS
   ------------------------------------------------------------ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.divider-gradient {
  height: 3px;
  width: 72px;
  border-radius: 3px;
  background: var(--gradient-primary);
  margin: 1.25rem auto 0;
}

/* Section vidéo de l'accueil (header retiré) : remonte la vidéo
   pour que son haut soit visible dès l'arrivée, sous le hero. */
.section--video-top {
  padding-top: clamp(0.5rem, 2vw, 1.5rem);
}

/* Masquage accessible (lecteurs d'écran uniquement) */
.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;
}
