/* =========================================================
   COVALTRIS — Thème « Aurora »
   Couche chargée après style.css et pages.css : elle remplace
   la palette monochrome par un bleu nuit + dégradé indigo/violet/cyan,
   colore le fond animé et ajoute des micro-animations.
   Pour revenir à l'ancien style : retirer la ligne theme.css des pages.
   ========================================================= */

@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

:root {
  --color-canvas: #f4f5fb;
  --color-paper: #ffffff;
  --color-surface-alt: #f8f9fd;
  --color-ink: #0b1026;
  --color-ink-soft: #151b3a;
  --color-mid-gray: #5b6280;
  --color-hairline: #e3e6f2;
  --color-ember: #6d4aff;

  --c-indigo: #4f46e5;
  --c-violet: #8b5cf6;
  --c-cyan: #06b6d4;
  --c-pink: #ec4899;
  --grad: linear-gradient(110deg, var(--c-indigo) 0%, var(--c-violet) 45%, var(--c-cyan) 100%);
  --glow: 0 10px 30px -10px rgba(79, 70, 229, .55);
  --shadow-card: 0 0 0 1px rgba(30, 41, 99, .05), 0 1px 3px rgba(30, 41, 99, .08), 0 1px 2px -1px rgba(30, 41, 99, .08);
}

::selection { background: var(--c-indigo); color: #fff; }

/* ---------- Fond : aurore colorée + trame pointillée teintée ---------- */
/* Fond uni cyan clair (2/12/2026, demande de Killian) : les taches colorées (aurore) sont retirées */
:root { --color-page: #e6f9fc; }
body { background: var(--color-page); }
.bgfx__blob { display: none; }
.bgfx__dots { --dot: rgba(79, 70, 229, .16); }
.bgfx__spot { --dot: rgba(109, 74, 255, .85); }
.bgfx__grain { opacity: .05; }
.gl { background: rgba(79, 70, 229, .12); }

@keyframes aurora-breathe {
  0%, 100% { scale: 1; }
  50% { scale: 1.18; }
}

/* ---------- Titres : mots en dégradé animé ---------- */
h1 .muted, h2 .muted, .cta__title .muted {
  background: linear-gradient(110deg, var(--c-indigo), var(--c-violet), var(--c-cyan), var(--c-violet), var(--c-indigo));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: grad-flow 8s linear infinite;
}
.ember { color: var(--c-violet); }
@keyframes grad-flow { to { background-position: 300% 0; } }

/* Variante quand le mot est découpé en lettres (.c) par l'animation d'entrée */
@property --shift { syntax: '<length>'; initial-value: 0px; inherits: true; }
.muted.is-split {
  position: relative; background: none; color: inherit; -webkit-text-fill-color: currentColor;
  animation: grad-shift 8s linear infinite;
}
.muted.is-split .c, .muted.is-split .wi {
  background-image: linear-gradient(110deg, var(--c-indigo), var(--c-violet), var(--c-cyan), var(--c-violet), var(--c-indigo));
  background-size: calc(var(--mw, 300px) * 3) 100%; background-repeat: repeat-x;
  background-position: calc(var(--shift) - var(--ox, 0px)) 0;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
@keyframes grad-shift { to { --shift: calc(var(--mw, 300px) * 3); } }

/* Repères (eyebrow) : petit carré en dégradé qui pulse */
.eyebrow::before { background: var(--grad); box-shadow: 0 0 0 0 rgba(109, 74, 255, .5); animation: pulse-dot 2.6s ease-out infinite; }
.dot--ember { background: var(--grad); }
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(109, 74, 255, .45); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(109, 74, 255, 0); }
}

/* ---------- Boutons ---------- */
.btn { overflow: hidden; }
.btn--primary {
  background: linear-gradient(110deg, var(--c-indigo), var(--c-violet) 50%, var(--c-indigo));
  background-size: 200% 100%; background-position: 0 0;
  color: #fff; box-shadow: var(--glow);
  transition: background-position .8s var(--ease), box-shadow .4s var(--ease), color .35s var(--ease);
}
.btn--primary:hover { background: linear-gradient(110deg, var(--c-indigo), var(--c-violet) 50%, var(--c-indigo)); background-size: 200% 100%; background-position: 100% 0; box-shadow: 0 14px 36px -10px rgba(109, 74, 255, .7); }
/* reflet lumineux qui traverse le bouton au survol */
.btn--primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%);
  translate: -120% 0; transition: translate .9s var(--ease);
}
.btn--primary:hover::after { translate: 120% 0; }
.btn--primary > * { position: relative; z-index: 1; }
.btn--ghost:hover { background: #e9ebf7; }
.btn--outline:hover { border-color: rgba(109, 74, 255, .35); }

/* ---------- Badge du hero : bordure dégradée qui tourne ---------- */
.hero__badge {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--color-paper), var(--color-paper)) padding-box,
    conic-gradient(from var(--ang), var(--c-indigo), var(--c-cyan), var(--c-violet), var(--c-pink), var(--c-indigo)) border-box;
  animation: spin-ang 6s linear infinite;
}
@keyframes spin-ang { to { --ang: 360deg; } }

/* ---------- Cartes : halo qui suit la souris + légère élévation ---------- */
.card, .plan, .eng, .svc {
  background-image: radial-gradient(420px circle at var(--cx, -999px) var(--cy, -999px), rgba(109, 74, 255, .09), transparent 45%);
  transition: box-shadow .5s var(--ease), border-color .5s var(--ease), translate .5s var(--ease);
}
.card:hover, .plan:hover, .eng:hover {
  translate: 0 -4px;
  border-color: rgba(109, 74, 255, .28);
  box-shadow: var(--shadow-card), 0 24px 48px -24px rgba(79, 70, 229, .35);
}
.eng:hover .eng__ic, .svc:hover .svc__l, .svc:hover .svc__go { background: var(--grad); border-color: transparent; }
.chip__ic--ink, .flow__ic, .cmp__check, .pt--yes .pt__ic { background: var(--grad); }
.chip__meter > * { background: var(--grad) !important; }
.chart span:last-child, .chart span.is-hi { background: var(--grad); }

/* Puces flottantes du hero : lévitation douce */
.chip { animation: float-y 6s ease-in-out infinite; }
.chip--b { animation-delay: -2s; }
.chip--c { animation-delay: -4s; }
@keyframes float-y { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ---------- Panneaux sombres : bleu nuit avec lueurs ---------- */
.vision__panel, .plan--dark, .curtain {
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(99, 102, 241, .38), transparent 70%),
    radial-gradient(50% 45% at 95% 100%, rgba(6, 182, 212, .25), transparent 70%),
    radial-gradient(40% 40% at 70% 30%, rgba(168, 85, 247, .18), transparent 70%),
    var(--color-ink);
  background-size: 140% 140%, 140% 140%, 140% 140%, auto;
  animation: panel-drift 20s ease-in-out infinite alternate;
}
.plan--dark { border-color: rgba(139, 92, 246, .45); }
@keyframes panel-drift {
  from { background-position: 0% 0%, 100% 100%, 50% 50%, 0 0; }
  to { background-position: 30% 20%, 70% 80%, 20% 70%, 0 0; }
}
.exp__line span { background: var(--grad); }
.exp__phase.is-on .exp__dot { background: var(--c-cyan); border-color: var(--c-cyan); box-shadow: 0 0 0 5px rgba(6, 182, 212, .18), 0 0 18px rgba(6, 182, 212, .6); }

/* ---------- Navigation ---------- */
.nav__pill { background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; border: 1px solid transparent; }
.lang a.is-on { color: var(--c-indigo); }

/* ---------- Pied de page : liseré dégradé ---------- */
.footer { position: relative; background: #d9f4f9; }
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--grad); opacity: .7; }

/* ---------- Section « Grands comptes » (page Services) ---------- */
.ent-grid { margin-top: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ent { position: relative; padding: 28px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.ent::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--grad); opacity: .35; transition: opacity .5s var(--ease); }
.ent:hover::before { opacity: 1; }
.ent__top { display: flex; align-items: center; justify-content: space-between; }
.ent__n { font-size: 12px; color: var(--color-mid-gray); }
.ent__st {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px;
  font-size: 11px; font-weight: 500; letter-spacing: .03em; color: var(--c-violet);
  background: rgba(139, 92, 246, .08); border: 1px dashed rgba(139, 92, 246, .45);
}
.ent__st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse-dot 2.6s ease-out infinite; }
.ent[data-status="live"] .ent__st { color: #0e7490; background: rgba(6, 182, 212, .1); border: 1px solid rgba(6, 182, 212, .45); }
.ent h3 { font-size: 20px; letter-spacing: -.02em; font-weight: 600; line-height: 1.2; }
.ent p { color: var(--color-mid-gray); font-size: 15px; line-height: 1.55; }
.ent__tags { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.ent__tags span { font-size: 12px; padding: 4px 10px; border-radius: 10px; background: var(--color-canvas); color: var(--color-ink-soft); }
.ent__note { margin-top: 28px; text-align: center; color: var(--color-mid-gray); font-size: 15px; }
.ent__note a { color: var(--c-indigo); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 960px) { .ent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ent-grid { grid-template-columns: 1fr; } }

/* ---------- Offre « Audit flash gratuit » (Tarifs) ---------- */
.flash {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px); padding: clamp(28px, 4vw, 48px); align-items: center;
  border: 1px solid transparent;
  background: linear-gradient(var(--color-paper), var(--color-paper)) padding-box, var(--grad) border-box;
}
.flash::after { content: ""; position: absolute; right: -120px; top: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(6, 182, 212, .16), transparent 70%); pointer-events: none; }
.flash__tag { display: inline-block; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--c-indigo); background: rgba(79, 70, 229, .08); padding: 6px 12px; border-radius: 12px; }
.flash__title { margin-top: 14px; font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -.035em; font-weight: 600; line-height: 1.05; }
.flash__p { margin-top: 14px; color: var(--color-mid-gray); font-size: 16px; line-height: 1.6; max-width: 60ch; }
.flash__list { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; list-style: none; padding: 0; }
.flash__list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.flash__list .i { flex: none; width: 18px; height: 18px; margin-top: 2px; stroke: var(--c-indigo); }
.flash__side { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; padding: 28px; border-radius: 20px; background: var(--color-surface-alt); border: 1px solid var(--color-hairline); }
.flash__price { display: flex; align-items: baseline; gap: 10px; }
.flash__amount { font-size: 56px; font-weight: 600; letter-spacing: -.05em; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.flash__per { color: var(--color-mid-gray); font-size: 15px; }
.flash__side .btn { justify-content: center; }
.flash__note { font-size: 13px; color: var(--color-mid-gray); line-height: 1.5; }
@media (max-width: 860px) { .flash { grid-template-columns: 1fr; } .flash__list { grid-template-columns: 1fr; } }

/* ---------- Lien « Espace client » du menu ---------- */
.nav__login { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px; font-size: 14px; font-weight: 500; color: var(--color-ink); border: 1px solid var(--color-hairline); background: rgba(255, 255, 255, .7); transition: border-color .3s var(--ease), color .3s var(--ease); white-space: nowrap; }
.nav__login:hover { border-color: rgba(109, 74, 255, .4); color: var(--c-indigo); }
.nav__login svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1080px) { .nav__login { display: none; } }

/* ---------- Page Espace client ---------- */
.space-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.space { padding: clamp(28px, 3.5vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.space__ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.space__ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.space h2 { font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -.03em; font-weight: 600; }
.space p { color: var(--color-mid-gray); font-size: 15px; line-height: 1.6; }
.space ul { list-style: none; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.space li { display: flex; gap: 10px; }
.space li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 9px; border-radius: 50%; background: var(--grad); }
.space__actions { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 10px; }
.space__status { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; padding: 16px 20px; border-radius: 16px; background: rgba(139, 92, 246, .07); border: 1px dashed rgba(139, 92, 246, .45); font-size: 15px; line-height: 1.5; }
.space__status b { color: var(--c-violet); }
.space__status[hidden] { display: none; }
@media (max-width: 860px) { .space-grid { grid-template-columns: 1fr; } }

/* Champ piège anti-robots du formulaire : invisible pour les humains */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Barre de progression de lecture (créée par theme.js) ---------- */
.scrollbar {
  position: fixed; left: 0; top: 0; z-index: 9999; height: 3px; width: 100%;
  background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
  box-shadow: 0 0 12px rgba(109, 74, 255, .6);
}

/* ---------- Accessibilité : on coupe les animations si demandé ---------- */
@media (prefers-reduced-motion: reduce) {
  .bgfx__blob, h1 .muted, h2 .muted, .cta__title .muted, .muted.is-split, .eyebrow::before, .hero__badge, .chip,
  .vision__panel, .plan--dark, .curtain { animation: none !important; }
  .btn--primary::after { display: none; }
  .card:hover, .plan:hover, .eng:hover { translate: none; }
}
