/* ==========================================================================
   Pulse — pulse-cie.com
   Feuille de style unique. Aucune dépendance, aucune requête externe.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --bg:           #06080B;
  --bg-elev:      #0C1016;
  --ink:          #E9EDF3;
  --ink-soft:     rgba(233, 237, 243, .82);
  --ink-muted:    #8A93A3;
  --accent:       #22E0C8;
  --accent-dim:   #12796C;
  --line:         rgba(233, 237, 243, .10);
  --line-strong:  rgba(233, 237, 243, .20);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter,
          "Helvetica Neue", Arial, sans-serif;

  --measure: 68ch;
  --pad-x: clamp(1.25rem, 5vw, 3rem);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  /* Les anneaux atteignent 2,6× leur boîte : sans ceci ils créent une barre de
     défilement horizontale sur les écrans étroits. Ils sont transparents à cette
     amplitude, la coupe au bord de la fenêtre est invisible. */
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  transition: color .18s var(--ease);
}
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: .5rem; left: .5rem;
  z-index: 200;
  padding: .5rem .9rem;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* --------------------------------------------------------------------------
   3. Coquille de page
   -------------------------------------------------------------------------- */
.shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding-inline: var(--pad-x);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }

.brand__dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-beat 2.6s var(--ease) infinite;
}

.brand__name {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .34em;
  text-transform: uppercase;
}

.site-header__aside {
  margin: 0;
  font-size: .8125rem;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   4. Pied de page
   -------------------------------------------------------------------------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 2rem;
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--line);
  font-size: .8125rem;
  color: var(--ink-muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.25rem;
}

.site-footer p { margin: 0; }

.site-footer a,
.site-footer .linkish {
  color: var(--ink-muted);
  text-decoration: none;
}
.site-footer a:hover,
.site-footer .linkish:hover { color: var(--accent); }

.linkish {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  transition: color .18s var(--ease);
}

/* --------------------------------------------------------------------------
   5. Le motif Pulse — respiration + lub-dub
   -------------------------------------------------------------------------- */
.pulse {
  position: relative;
  width: clamp(160px, 30vmin, 260px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin-inline: auto;
}

.pulse__halo,
.pulse__ring,
.pulse__core {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
}

/* Le souffle : lent, ample, jamais tout à fait au repos. */
.pulse__halo {
  inset: 0;
  background: radial-gradient(circle at 50% 50%,
    rgba(34, 224, 200, .38) 0%,
    rgba(34, 224, 200, .13) 38%,
    rgba(34, 224, 200, 0) 70%);
  filter: blur(6px);
  animation: pulse-breathe 4.2s var(--ease) infinite alternate;
}

/* Les deux ondes, décalées de 160 ms : c'est ce décalage qui fait le battement. */
.pulse__ring {
  inset: 0;
  border: 1px solid rgba(34, 224, 200, .55);
  opacity: 0;
  animation: pulse-emit 2.6s var(--ease) infinite;
}
.pulse__ring--b { animation-delay: .16s; }

.pulse__core {
  width: 17%;
  aspect-ratio: 1;
  background: radial-gradient(circle at 42% 38%,
    #F0FFFC 0%, var(--accent) 55%, var(--accent-dim) 100%);
  box-shadow:
    0 0 24px rgba(34, 224, 200, .55),
    0 0 72px rgba(34, 224, 200, .28);
  animation: pulse-beat 2.6s var(--ease) infinite;
}

@keyframes pulse-breathe {
  from { transform: scale(1);    opacity: .5;  }
  to   { transform: scale(1.09); opacity: .85; }
}

@keyframes pulse-emit {
  0%   { transform: scale(.55); opacity: 0;   }
  8%   {                        opacity: .55; }
  70%  {                        opacity: 0;   }
  100% { transform: scale(2.6); opacity: 0;   }
}

@keyframes pulse-beat {
  0%, 100% { transform: scale(1);    }
  6%       { transform: scale(1.14); }
  13%      { transform: scale(1);    }
  19%      { transform: scale(1.09); }
  27%      { transform: scale(1);    }
}

@keyframes dot-beat {
  0%, 100% { box-shadow: 0 0 0 0   rgba(34, 224, 200, .50); }
  6%       { box-shadow: 0 0 0 5px rgba(34, 224, 200, .22); }
  14%      { box-shadow: 0 0 0 0   rgba(34, 224, 200, .50); }
  20%      { box-shadow: 0 0 0 4px rgba(34, 224, 200, .18); }
  32%      { box-shadow: 0 0 0 0   rgba(34, 224, 200, 0);   }
}

/* --------------------------------------------------------------------------
   6. Accueil
   -------------------------------------------------------------------------- */
/* L'accueil n'a pas d'en-tête : le titre porte l'identité. */
.shell--home { grid-template-rows: 1fr auto; }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(1.4rem, 4vh, 2.5rem);
  padding-block: clamp(1.25rem, 4vh, 3rem);
}

.hero__head {
  display: grid;
  gap: .9rem;
}

.hero__title {
  margin: 0;
  font-size: clamp(2.5rem, 11vw, 5.5rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: .22em;
  /* compense l'espace ajouté après la dernière lettre par le letter-spacing */
  text-indent: .22em;
}

.hero__lede {
  margin: 0;
  max-width: 42ch;
  color: var(--ink-muted);
  font-size: clamp(1rem, 2.4vw, 1.125rem);
  text-wrap: balance;
}

.hero__tag {
  margin: 0;
  font-size: .75rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero__contact {
  font-size: .9375rem;
  letter-spacing: .02em;
}

/* --------------------------------------------------------------------------
   7. Pages de documents
   -------------------------------------------------------------------------- */
.doc {
  max-width: var(--measure);
  margin-inline: auto;
  padding-block: clamp(1.5rem, 5vh, 3.5rem) clamp(2rem, 6vh, 4rem);
}

.doc h1 {
  margin: 0 0 .4rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.015em;
}

.doc__meta {
  margin: 0 0 2.5rem;
  color: var(--ink-muted);
  font-size: .8125rem;
}

.doc h2 {
  margin: 2.75rem 0 .75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: .01em;
}

.doc h3 {
  margin: 1.75rem 0 .4rem;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ink);
}

.doc p,
.doc li { color: var(--ink-soft); }
.doc p  { margin: 0 0 1rem; }

.doc ul,
.doc ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.doc li { margin-block: .35rem; }

.doc strong { color: var(--ink); font-weight: 600; }

/* Étiquette « Consommateur » accolée à un titre de section */
.badge {
  display: inline-block;
  margin-left: .5rem;
  padding: .15rem .5rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--accent);
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* Bloc d'identité (mentions légales, hébergeur) */
.facts {
  display: grid;
  grid-template-columns: minmax(0, 15rem) 1fr;
  gap: 0 1.5rem;
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.facts dt {
  padding-block: .3rem;
  color: var(--ink-muted);
  font-size: .875rem;
}
.facts dd {
  margin: 0;
  padding-block: .3rem;
  color: var(--ink-soft);
}
@media (max-width: 36rem) {
  .facts { grid-template-columns: 1fr; }
  .facts dt { padding-bottom: 0; }
  .facts dd { padding-top: 0; padding-bottom: .75rem; }
  .facts dd:last-child { padding-bottom: 0; }
}

/* Encadré */
.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 0 8px 8px 0;
}
.callout > :first-child { margin-top: 0; }
.callout > :last-child  { margin-bottom: 0; }

.callout--todo { border-left-color: #E0A122; }

/* Tableaux */
.table-wrap {
  margin: 1.25rem 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: .9375rem;
}
th, td {
  padding: .7rem .9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
tr:last-child td { border-bottom: 0; }
th {
  color: var(--ink-muted);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  background: var(--bg-elev);
}
td { color: var(--ink-soft); }

code {
  padding: .1em .4em;
  background: rgba(34, 224, 200, .08);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .875em;
}

/* --------------------------------------------------------------------------
   8. Boutons
   -------------------------------------------------------------------------- */
.btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .6rem 1.1rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease);
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #04120F;
  font-weight: 600;
}
.btn--primary:hover {
  background: #4BEBD6;
  border-color: #4BEBD6;
  color: #04120F;
}

/* --------------------------------------------------------------------------
   9. Bandeau de consentement
   -------------------------------------------------------------------------- */
.cc {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 90;
  padding: 0 var(--pad-x) clamp(1rem, 3vh, 1.5rem);
}
.cc[hidden] { display: none; }

.cc__panel {
  max-width: 46rem;
  margin-inline: auto;
  padding: clamp(1.15rem, 3vw, 1.6rem);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
}

.cc__title {
  margin: 0 0 .4rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

.cc__text {
  margin: 0 0 1.1rem;
  font-size: .875rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.cc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.cc__actions .btn { flex: 1 1 auto; }
@media (min-width: 40rem) {
  .cc__actions { justify-content: flex-end; }
  .cc__actions .btn { flex: 0 0 auto; }
  /* « Personnaliser » à gauche, les deux choix équivalents à droite */
  .cc__actions .btn:first-child { margin-right: auto; }
}

/* Fenêtre de préférences (dialog natif : focus piégé et Échap gérés par le navigateur) */
.ccd {
  width: min(34rem, calc(100vw - 2rem));
  max-height: min(85vh, 44rem);
  padding: 0;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--ink);
  overflow: hidden;
}
.ccd::backdrop {
  background: rgba(3, 5, 8, .72);
  backdrop-filter: blur(3px);
}

.ccd__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.ccd__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.ccd__close {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.ccd__close:hover { color: var(--ink); border-color: var(--line-strong); }

.ccd__body {
  padding: .5rem 1.25rem;
  max-height: 50vh;
  overflow-y: auto;
}

.ccd__foot {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  padding: 1.1rem 1.25rem;
  border-top: 1px solid var(--line);
}
.ccd__foot .btn { flex: 1 1 auto; }

.cat { padding-block: 1rem; border-bottom: 1px solid var(--line); }
.cat:last-child { border-bottom: 0; }

.cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .3rem;
}
.cat__name {
  font-size: .9375rem;
  font-weight: 600;
}
.cat__lock {
  flex: none;
  font-size: .6875rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}
.cat__desc {
  margin: 0;
  font-size: .8125rem;
  line-height: 1.55;
  color: var(--ink-muted);
}
.cat__desc strong { color: var(--ink-soft); }

/* Interrupteur */
.switch {
  flex: none;
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.switch__track {
  display: block;
  width: 40px;
  height: 23px;
  border-radius: 999px;
  background: rgba(233, 237, 243, .14);
  border: 1px solid var(--line-strong);
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.switch__track::after {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  margin: 3px;
  border-radius: 50%;
  background: var(--ink-muted);
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.switch input:checked + .switch__track {
  background: rgba(34, 224, 200, .22);
  border-color: var(--accent);
}
.switch input:checked + .switch__track::after {
  transform: translateX(17px);
  background: var(--accent);
}
.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   10. Mouvement réduit — on coupe tout, l'orbe reste lisible
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .pulse__halo { opacity: .7; }
  .pulse__ring { opacity: .26; }
  .pulse__ring--b { transform: scale(1.75); opacity: .13; }
  .brand__dot { box-shadow: 0 0 0 4px rgba(34, 224, 200, .18); }
}
