@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700;12..96,800&family=IBM+Plex+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

/* ============================================================
   Kaptio — Design System

   Personnalisation client : surcharger uniquement le bloc :root
   dans une balise <style> dans le HTML client, ou dans un fichier
   theme-client.css chargé après ce fichier.

   Convention variable : --catégorie-nom[-variante]
   ============================================================ */

/* ============================================================
   TOKENS — valeurs neutres par défaut (noir/blanc, system fonts)
   ============================================================ */
:root {

  /* === Brand-book v1.2 — Palette Kaptio === */
  --color-bg:               #0E0E0E;   /* charbon — fond principal */
  --color-bg-alt:           #F5F0E6;   /* cream — fond sections claires */
  --color-fg:               #F5F0E6;   /* cream — texte sur fond sombre */
  --color-fg-alt:           #0E0E0E;   /* charbon — texte sur fond clair */
  --color-accent:           #DC4B17;   /* flame — accent unique */
  --color-mute:             #7A7368;   /* taupe — texte secondaire */
  --color-line:             rgba(245, 240, 230, 0.12);  /* bordures sur charbon */
  --color-line-alt:         rgba(14, 14, 14, 0.10);     /* bordures sur cream */
  --color-error:            #A8341A;   /* ember — fonctionnel uniquement, jamais décoratif */

  /* === Mapping compatibilité (composants existants) === */
  --color-primary:          var(--color-bg);
  --color-primary-fg:       var(--color-fg);
  --color-accent-hover:     #B83D12;   /* flame assombri pour hover */
  --color-accent-fg:        #F5F0E6;   /* cream sur fond flame */
  --color-surface:          #1A1916;   /* charbon légèrement éclairci — cartes */
  --color-surface-alt:      #161512;   /* charbon intermédiaire — sections */
  --color-text:             var(--color-fg);
  --color-text-muted:       var(--color-mute);
  --color-text-inverse:     var(--color-fg-alt);
  --color-border:           var(--color-line);
  --color-border-focus:     var(--color-accent);
  --color-success:          #166534;
  --color-success-bg:       rgba(22, 101, 52, 0.15);
  --color-success-border:   rgba(22, 101, 52, 0.30);
  --color-error-bg:         rgba(168, 52, 26, 0.12);
  --color-error-border:     rgba(168, 52, 26, 0.25);


  /* === Typographies — brand-book v1.2 === */
  --font-display:   'Bricolage Grotesque', system-ui, sans-serif;
  --font-body:      'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:      'JetBrains Mono', ui-monospace, monospace;

  /* --- Typographie — échelle de taille (base 16px) --- */
  --text-xs:        0.75rem;     /* 12px */
  --text-sm:        0.8125rem;   /* 13px */
  --text-base:      0.9375rem;   /* 15px */
  --text-md:        1rem;        /* 16px */
  --text-lg:        1.125rem;    /* 18px */
  --text-xl:        1.25rem;     /* 20px */
  --text-2xl:       1.5rem;      /* 24px */
  --text-3xl:       1.875rem;    /* 30px */
  --text-4xl:       2.25rem;     /* 36px */
  --text-5xl:       3rem;        /* 48px */

  /* --- Typographie — tailles de titres (surchargeables indépendamment) --- */
  --text-h1:        var(--text-4xl);
  --text-h2:        var(--text-3xl);
  --text-h3:        var(--text-2xl);
  --text-h4:        var(--text-xl);
  --text-h5:        var(--text-lg);
  --text-h6:        var(--text-md);

  /* --- Typographie — graisses --- */
  --font-weight-normal:     400;
  --font-weight-medium:     500;
  --font-weight-semibold:   600;
  --font-weight-bold:       700;
  --font-weight-extrabold:  800;

  /* --- Typographie — interlignage --- */
  --leading-none:     1;
  --leading-tight:    1.2;
  --leading-snug:     1.35;
  --leading-normal:   1.6;
  --leading-relaxed:  1.75;

  /* --- Typographie — espacement lettres --- */
  --tracking-tight:   -0.04em;   /* brand-book v1.2 (wordmark + titres hero) */
  --tracking-normal:  0;
  --tracking-wide:    0.04em;
  --tracking-wider:   0.08em;
  --tracking-widest:  0.14em;
  --tracking-label:   0.12em;    /* labels uppercase brand-book */


  /* --- Échelle d'espacement (base 4px) --- */
  --space-1:    0.25rem;   /*  4px */
  --space-2:    0.5rem;    /*  8px */
  --space-3:    0.75rem;   /* 12px */
  --space-4:    1rem;      /* 16px */
  --space-5:    1.25rem;   /* 20px */
  --space-6:    1.5rem;    /* 24px */
  --space-8:    2rem;      /* 32px */
  --space-10:   2.5rem;    /* 40px */
  --space-12:   3rem;      /* 48px */
  --space-16:   4rem;      /* 64px */
  --space-20:   5rem;      /* 80px */
  --space-24:   6rem;      /* 96px */

  /* === Échelle typographique brand-book v1.2 (pour index.html / L1-07+) === */
  --fs-hero:      clamp(3rem, 9vw, 8rem);
  --fs-h1:        clamp(2.25rem, 5vw, 4rem);
  --fs-h2:        clamp(1.75rem, 3.5vw, 2.5rem);
  --fs-h3:        1.5rem;
  --fs-body-lg:   1.125rem;
  --fs-body:      1.0625rem;
  --fs-body-sm:   0.9375rem;
  --fs-label:     0.75rem;

  /* === Espacements brand-book v1.2 === */
  --space-section: clamp(4rem, 10vw, 8rem);
  --space-block:   clamp(2rem, 5vw, 4rem);
  --space-item:    1rem;

  /* === Éléments signature brand-book v1.2 === */
  --radius-pill:  999px;
  --line-width:   1px;

  /* --- Padding vertical des sections --- */
  --section-py:         var(--space-20);
  --section-py-sm:      var(--space-12);

  /* --- Largeurs conteneurs --- */
  --container-xs:   480px;
  --container-sm:   640px;
  --container-md:   768px;
  --container-lg:   1024px;
  --container-xl:   1200px;


  /* --- Échelle de rayons --- */
  --radius-none:    0;
  --radius-sm:      4px;
  --radius-md:      8px;
  --radius-lg:      12px;
  --radius-xl:      16px;
  --radius-2xl:     24px;
  --radius-full:    9999px;

  /* --- Rayons par composant (surchargeables) --- */
  --radius-card:    var(--radius-xl);
  --radius-input:   var(--radius-md);
  --radius-btn:     var(--radius-md);
  --radius-badge:   var(--radius-full);
  --radius-section: var(--radius-none);   /* coins arrondis des sections */


  /* --- Ombres --- */
  --shadow-none:    none;
  --shadow-sm:      0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:      0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.05);
  --shadow-lg:      0 4px 8px rgba(0,0,0,0.07), 0 12px 40px rgba(0,0,0,0.08);
  --shadow-xl:      0 8px 16px rgba(0,0,0,0.08), 0 24px 64px rgba(0,0,0,0.12);

  /* --- Ombres par composant (surchargeables) --- */
  --shadow-card:    var(--shadow-md);
  --shadow-btn:     var(--shadow-none);


  /* --- Motion --- */
  /*   0 = désactivé, 1 = activé                           */
  /*   motion.js lit cette variable pour s'activer ou non  */
  --motion-enabled:       1;
  --motion-duration-fast:  150ms;
  --motion-duration-base:  250ms;
  --motion-duration-slow:  400ms;
  --motion-easing:         cubic-bezier(0.4, 0, 0.2, 1);
  --motion-easing-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --motion-easing-out:     cubic-bezier(0, 0, 0.2, 1);
}


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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}


/* ============================================================
   TYPOGRAPHIE
   ============================================================ */
h1, .h1 { font-family: var(--font-display); font-size: var(--text-h1); font-weight: var(--font-weight-bold); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
h2, .h2 { font-family: var(--font-display); font-size: var(--text-h2); font-weight: var(--font-weight-bold); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
h3, .h3 { font-family: var(--font-display); font-size: var(--text-h3); font-weight: var(--font-weight-semibold); line-height: var(--leading-snug); }
h4, .h4 { font-family: var(--font-display); font-size: var(--text-h4); font-weight: var(--font-weight-semibold); line-height: var(--leading-snug); }
h5, .h5 { font-family: var(--font-display); font-size: var(--text-h5); font-weight: var(--font-weight-medium); }
h6, .h6 { font-family: var(--font-display); font-size: var(--text-h6); font-weight: var(--font-weight-medium); }

p { line-height: var(--leading-normal); }

.text-muted { color: var(--color-text-muted); }


/* ============================================================
   LAYOUT — Conteneurs et grilles
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-lg);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--sm  { max-width: var(--container-sm); }
.container--md  { max-width: var(--container-md); }
.container--xl  { max-width: var(--container-xl); }

.section {
  padding: var(--section-py) 0;
}

.section--alt {
  background: var(--color-surface-alt);
}

.section--primary {
  background: var(--color-primary);
  color: var(--color-primary-fg);
}

/* Grille générique */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .container { padding: 0 var(--space-4); }
  .section { padding: var(--section-py-sm) 0; }
}

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


/* ============================================================
   COMPOSANTS — Carte
   ============================================================ */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-8) var(--space-6);
}

.card--bordered {
  box-shadow: var(--shadow-none);
  border: 1px solid var(--color-border);
}

.card--flat {
  box-shadow: var(--shadow-none);
  background: var(--color-surface-alt);
}


/* ============================================================
   COMPOSANTS — Boutons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  cursor: pointer;
  border: 2px solid transparent;
  box-shadow: var(--shadow-btn);
  transition: background var(--motion-duration-fast) var(--motion-easing),
              color var(--motion-duration-fast) var(--motion-easing),
              border-color var(--motion-duration-fast) var(--motion-easing),
              transform var(--motion-duration-fast) var(--motion-easing);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-accent-fg);
  border-color: var(--color-accent);
}
.btn--primary:not(:disabled):hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn--outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.btn--outline:not(:disabled):hover {
  background: var(--color-accent);
  color: var(--color-accent-fg);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: transparent;
}
.btn--ghost:not(:disabled):hover {
  background: var(--color-surface-alt);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

.btn--full {
  width: 100%;
}


/* ============================================================
   COMPOSANTS — Badge / Label
   ============================================================ */
.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-badge);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.badge--accent {
  background: var(--color-accent);
  color: var(--color-accent-fg);
  border-color: var(--color-accent);
}


/* ============================================================
   SECTION — Entête de section
   ============================================================ */
.section-header {
  text-align: center;
  max-width: var(--container-md);
  margin: 0 auto var(--space-12);
}

.section-header .badge {
  margin-bottom: var(--space-4);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}


/* ============================================================
   SECTION — Hero
   ============================================================ */
[data-section="hero"] {
  padding: var(--space-24) 0 var(--space-20);
  text-align: center;
}

.hero__badge {
  margin-bottom: var(--space-5);
}

.hero__title {
  margin-bottom: var(--space-5);
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
}

.hero__subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 0 auto var(--space-8);
  line-height: var(--leading-relaxed);
}

.hero__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

.hero__media {
  margin-top: var(--space-12);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  max-width: var(--container-md);
  margin-left: auto;
  margin-right: auto;
}

.hero__media-placeholder {
  aspect-ratio: 16/9;
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}


/* ============================================================
   SECTION — Value props
   ============================================================ */
[data-section="value-props"] .vp-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

[data-section="value-props"] h3 {
  margin-bottom: var(--space-2);
}

[data-section="value-props"] p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}


/* ============================================================
   SECTION — Témoignages
   ============================================================ */
.testimonial__quote {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
  position: relative;
}

.testimonial__quote::before {
  content: "\201C";
  font-size: var(--text-5xl);
  line-height: 1;
  color: var(--color-border);
  font-family: Georgia, serif;
  position: absolute;
  top: -0.2em;
  left: -0.1em;
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial__avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
}

.testimonial__name {
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-sm);
}

.testimonial__role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.testimonial__stars {
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
  color: var(--color-accent);
}


/* ============================================================
   SECTION — Galerie
   ============================================================ */
[data-section="gallery"] .gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.gallery-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-alt);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--motion-duration-slow) var(--motion-easing);
}

.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item--tall {
  grid-row: span 2;
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

@media (max-width: 640px) {
  [data-section="gallery"] .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-item--wide { grid-column: span 1; }
  .gallery-item--tall { grid-row: span 1; }
}


/* ============================================================
   SECTION — Formulaire
   ============================================================ */
[data-section="form"] .form-wrap {
  max-width: var(--container-sm);
  margin: 0 auto;
}

[data-section="form"] .card {
  padding: var(--space-10) var(--space-8);
}

.field {
  margin-bottom: var(--space-5);
}

label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
  letter-spacing: 0.01em;
}

label .required {
  color: var(--color-accent);
  margin-left: 2px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-input);
  font-size: var(--text-base);
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color var(--motion-duration-fast) var(--motion-easing),
              box-shadow var(--motion-duration-fast) var(--motion-easing);
  appearance: none;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 12%, transparent);
}

textarea {
  resize: vertical;
  min-height: 110px;
  line-height: var(--leading-normal);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: var(--space-10);
  cursor: pointer;
}

.field-custom { display: none; }
.field-custom.visible { display: block; }

.btn-submit {
  width: 100%;
  padding: var(--space-4) var(--space-6);
  background: var(--color-accent);
  color: var(--color-accent-fg);
  border: none;
  border-radius: var(--radius-btn);
  font-size: var(--text-lg);
  font-family: var(--font-body);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  margin-top: var(--space-2);
  transition: background var(--motion-duration-fast) var(--motion-easing),
              transform var(--motion-duration-fast) var(--motion-easing);
}
.btn-submit:hover:not(:disabled) { background: var(--color-accent-hover); }
.btn-submit:active:not(:disabled) { transform: scale(0.99); }
.btn-submit:disabled { opacity: 0.55; cursor: not-allowed; }

.msg {
  display: none;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  margin-top: var(--space-4);
  text-align: center;
}
.msg.success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success-border);
}
.msg.error {
  background: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid var(--color-error-border);
}

.rgpd {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-5);
  line-height: var(--leading-relaxed);
}

@media (max-width: 640px) {
  [data-section="form"] .card { padding: var(--space-6) var(--space-5); }
}


/* ============================================================
   SECTION — FAQ (accordéon)
   ============================================================ */
[data-section="faq"] .faq-list {
  max-width: var(--container-md);
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  gap: var(--space-4);
}

.faq-question__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  transition: transform var(--motion-duration-base) var(--motion-easing),
              background var(--motion-duration-fast) var(--motion-easing);
}

.faq-item.open .faq-question__icon {
  transform: rotate(45deg);
  background: var(--color-accent);
  color: var(--color-accent-fg);
  border-color: var(--color-accent);
}

.faq-answer {
  display: none;
  padding-bottom: var(--space-5);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  font-size: var(--text-base);
}

.faq-item.open .faq-answer {
  display: block;
}


/* ============================================================
   SECTION — Footer
   ============================================================ */
[data-section="footer"] {
  padding: var(--space-12) 0;
  background: var(--color-primary);
  color: var(--color-primary-fg);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.footer__brand {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
}

.footer__links {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.footer__links a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  transition: color var(--motion-duration-fast) var(--motion-easing);
}
.footer__links a:hover { color: rgba(255,255,255,1); }

.footer__legal {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
  text-align: center;
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer__powered {
  opacity: 0.3;
  font-size: var(--text-xs);
  transition: opacity var(--motion-duration-fast) var(--motion-easing);
}
.footer__powered:hover { opacity: 0.7; }

@media (max-width: 640px) {
  .footer__inner { flex-direction: column; align-items: flex-start; }
}


/* ============================================================
   NIVEAU PLAIN — Hover CSS pur (zéro JS requis)
   Transitions subtiles, performantes, universelles.
   ============================================================ */

/* Card lift */
.card[data-hover="lift"] {
  transition: transform var(--motion-duration-base) var(--motion-easing),
              box-shadow var(--motion-duration-base) var(--motion-easing);
}
.card[data-hover="lift"]:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Galerie image zoom */
.gallery-item {
  overflow: hidden;
}
.gallery-item img {
  transition: transform var(--motion-duration-slow) var(--motion-easing);
}
.gallery-item:hover img {
  transform: scale(1.04);
}

/* FAQ icône (rotation CSS — fonctionnel même sans JS) */
.faq-question__icon {
  transition: transform var(--motion-duration-base) var(--motion-easing),
              background var(--motion-duration-fast) var(--motion-easing),
              color var(--motion-duration-fast) var(--motion-easing);
}


/* ============================================================
   NIVEAU PREMIUM — Hooks pour premium.js + GSAP
   body.premium est ajouté manuellement dans le HTML client.
   GSAP override les transitions CSS ci-dessus.
   ============================================================ */

/* Désactiver les transitions CSS sur les éléments animés par GSAP
   pour éviter le conflit CSS/GSAP */
body.premium .card[data-hover="lift"] {
  transition: none;
}
body.premium .gallery-item img {
  transition: none;
}
body.premium .btn-submit,
body.premium .btn--primary {
  transition: background var(--motion-duration-fast) var(--motion-easing);
}

/* État initial des éléments scroll-reveal au niveau premium.
   GSAP gère opacity/transform — on se contente de cacher
   pendant le chargement pour éviter le flash. */
body.premium [data-reveal] {
  opacity: 0;
}

/* Dès que GSAP est prêt, il enlève opacity:0 via clearProps.
   En cas d'échec CDN, fallback : rendre visible après 2s. */
body.premium.gsap-ready [data-reveal] {
  /* GSAP applique les styles via JS — cette règle ne sert
     qu'à documenter l'état attendu */
}


/* ============================================================
   RESPECT prefers-reduced-motion (tous niveaux)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  /* Annuler toutes les transitions CSS */
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  /* S'assurer que les éléments data-reveal sont visibles */
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Annuler les hover transforms */
  .card[data-hover="lift"]:hover,
  .gallery-item:hover img {
    transform: none;
  }
}


/* ============================================================
   COMPOSANTS FORMULAIRE — Système prestations v2
   ============================================================ */

/* ── Fieldset (groupe de champs) ──────────────────────────── */
.fieldset {
  border: none;
  padding: 0;
  margin: 0 0 var(--space-6) 0;
}

.fieldset__legend {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  letter-spacing: 0.01em;
  margin-bottom: var(--space-4);
  padding: 0;
  width: 100%;
}

.legend-hint {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ── Ligne à deux colonnes ────────────────────────────────── */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
}

/* ── Honeypot (invisible pour les humains) ────────────────── */
.field--hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ── Champ optionnel ──────────────────────────────────────── */
.field-optional {
  font-weight: var(--font-weight-normal);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

/* ── Prestation — item principal ──────────────────────────── */
.prestation-item {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  overflow: hidden;
  transition: border-color var(--motion-duration-fast) var(--motion-easing);
}

.prestation-item:has(.prestation-check:checked) {
  border-color: var(--color-accent);
}

/* ── Prestation — label / checkbox principal ──────────────── */
.prestation-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  margin: 0;
  font-weight: var(--font-weight-normal);
  letter-spacing: 0;
  transition: background var(--motion-duration-fast) var(--motion-easing);
}

.prestation-label:hover {
  background: var(--color-surface-alt);
}

.prestation-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
  margin: 0;
}

.prestation-label__text {
  font-size: var(--text-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

/* ── Prestation — blocs conditionnels révélés ─────────────── */
.prestation-blocs {
  border-top: 1.5px solid var(--color-border);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface-alt);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.prestation-blocs[hidden] {
  display: none;
}

/* ── Bloc — sous-question ─────────────────────────────────── */
.bloc__question {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-3);
  line-height: var(--leading-snug);
}

.bloc__question .required {
  color: var(--color-accent);
  margin-left: 2px;
}

/* ── Radio group ──────────────────────────────────────────── */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.radio-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-normal);
  letter-spacing: 0;
  color: var(--color-text);
  transition: border-color var(--motion-duration-fast) var(--motion-easing),
              background   var(--motion-duration-fast) var(--motion-easing),
              color        var(--motion-duration-fast) var(--motion-easing);
  user-select: none;
  margin: 0;
}

.radio-label:hover {
  border-color: var(--color-accent);
}

.radio-label input[type="radio"] {
  display: none; /* Le style est géré via le label pill */
}

.radio-label:has(input[type="radio"]:checked) {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-fg);
}

/* ── RGPD — checkbox consentement ────────────────────────── */
.field--rgpd {
  margin-top: var(--space-4);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  margin: 0;
  font-weight: var(--font-weight-normal);
  letter-spacing: 0;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.checkbox-label span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

/* ── Fallback : navigateurs sans :has() ──────────────────── */
@supports not selector(:has(a, b)) {
  .prestation-item {
    border-color: var(--color-border);
  }
  .radio-label input[type="radio"]:checked + * {
    /* Non applicable — structure différente. Couleur par JS si besoin. */
  }
}
