/* Thème « Lumière » : toutes les pages (site public, espace client, administration).
   Chargé après tailwind.css et espace.css : il remplace la palette indigo par le bleu Phare, met les cartes sur un
   fond clair avec des halos bleus flous, et donne les titres en Bricolage Grotesque. Style demandé par Clément
   (références « Crunchy » et « LOOO ») : les règles maison « pas de dégradé ni de verre » sont levées ici. */

@font-face {
  font-family: "Bricolage"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/static/vendor/bricolage/BricolageGrotesque.ttf") format("truetype");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/vendor/inter/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/vendor/inter/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0;
}

:root {
  --l-fond: #eef0f8; --l-carte: #fbfbfd; --l-encre: #14123a; --l-encre-2: #45436a; --l-doux: #e6e9f6;
  --l-bleu: #2f3fe0; --l-bleu-fonce: #2331b8; --l-halo: #2f45f2; --l-teinte: #e8ebff;
  --l-ombre: 0 1px 2px rgba(20, 18, 58, .04), 0 14px 36px -16px rgba(20, 18, 58, .16);
  --l-titre: "Bricolage", "Inter", system-ui, sans-serif;
  /* Les variables de l'espace client (espace.css) prennent les couleurs Lumière */
  --nuit: var(--l-encre); --indigo: var(--l-bleu-fonce); --indigo-vif: var(--l-bleu); --brume: var(--l-teinte);
  --encre: var(--l-encre); --encre-2: var(--l-encre-2); --fond: var(--l-fond); --surface: var(--l-carte);
  --trait: #e3e5f0; --piste: #e3e6f3;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--l-encre);
  -webkit-font-smoothing: antialiased;
  /* Deux halos fixes, très doux : la même lumière que la page d'accueil, sans coût d'animation */
  background:
    radial-gradient(48rem 40rem at 100% -6rem, rgba(47, 69, 242, .16), transparent 70%),
    radial-gradient(36rem 30rem at -8rem 70%, rgba(85, 102, 255, .10), transparent 70%),
    var(--l-fond) !important;
  background-attachment: fixed !important;
}
h1, h2, .sg-titre, .sg-hero-titre { font-family: var(--l-titre); letter-spacing: -.025em; }
h1 { font-weight: 600; }
h2 { font-weight: 600; }
::selection { background: rgba(47, 63, 224, .18); }
:focus-visible { outline: 3px solid var(--l-bleu); outline-offset: 2px; }

/* --- Palette : l'indigo de Tailwind devient le bleu Phare --- */
.text-indigo-950, .text-indigo-900 { color: var(--l-encre); }
.text-indigo-800, .text-indigo-700, .text-indigo-600 { color: var(--l-bleu-fonce); }
.bg-indigo-700, .bg-indigo-600 { background-color: var(--l-bleu); }
.bg-indigo-800, .bg-indigo-900 { background-color: var(--l-encre); }
.hover\:bg-indigo-800:hover, .hover\:bg-indigo-700:hover { background-color: var(--l-bleu-fonce); }
.bg-indigo-50, .bg-indigo-100, .bg-indigo-50\/60, .bg-indigo-50\/50 { background-color: var(--l-teinte); }
.hover\:bg-indigo-50:hover { background-color: var(--l-teinte); }
.border-indigo-300, .border-indigo-200 { border-color: rgba(47, 63, 224, .28); }
.border-indigo-500, .border-indigo-700 { border-color: var(--l-bleu); }
.hover\:text-indigo-800:hover { color: var(--l-bleu); }
.bg-slate-50 { background-color: #f3f4fa; }
.bg-gradient-to-b.from-indigo-50 { background: none; }

/* --- Cartes : fond clair, coins plus ronds, ombre douce à la place du filet gris --- */
.bg-white.border, .bg-white.rounded-2xl, .bg-white.rounded-xl, .carte, .sg-chiffre, .sg-lieu, .sg-carte-liste {
  background-color: var(--l-carte); border-color: rgba(20, 18, 58, .06); box-shadow: var(--l-ombre);
}
.rounded-2xl, .carte { border-radius: 24px; }
.rounded-xl { border-radius: 16px; }
.border-slate-200 { border-color: rgba(20, 18, 58, .07); }
.divide-slate-100 > * + *, .divide-slate-200 > * + * { border-color: rgba(20, 18, 58, .06); }
.bg-slate-100 { background-color: var(--l-doux); }
.hover\:bg-slate-100:hover, .hover\:bg-slate-50:hover { background-color: rgba(20, 18, 58, .05); }
thead.bg-slate-50, th.bg-slate-50, tr.bg-slate-50 { background-color: #f3f4fa; }

/* --- Boutons : capsules, l'encre qui vire au bleu au survol (comme l'accueil) --- */
a.bg-indigo-700, button.bg-indigo-700, a.bg-indigo-600, button.bg-indigo-600, .bouton, .sg-capsule {
  border-radius: 999px; transition: background-color .2s, transform .2s, box-shadow .2s;
}
a.bg-indigo-700:hover, button.bg-indigo-700:hover, .bouton.principal:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(47, 63, 224, .55); }
a.border-indigo-300, button.border-indigo-300 { border-radius: 999px; background-color: rgba(255, 255, 255, .7); }
.bouton.principal { background: var(--l-bleu); }
.bouton.principal:hover { background: var(--l-bleu-fonce); }
.bouton.secondaire { background: var(--l-carte); border-color: rgba(20, 18, 58, .12); }
@media (prefers-reduced-motion: reduce) { a.bg-indigo-700:hover, button.bg-indigo-700:hover, .bouton.principal:hover { transform: none; } }

/* --- Champs de formulaire --- */
input[type=text].border, input[type=email].border, input[type=url].border, input[type=password].border, input[type=number].border,
input[type=date].border, input[type=search].border, input:not([type]).border, select.border, textarea.border {
  border-color: rgba(20, 18, 58, .14); border-radius: 12px; background-color: #fff;
}
input.border:focus, select.border:focus, textarea.border:focus { outline: none; border-color: var(--l-bleu); box-shadow: 0 0 0 4px rgba(47, 63, 224, .14); }

/* --- En-têtes en verre (site public et administration) --- */
.entete-verre { background: rgba(251, 251, 253, .72) !important; backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px);
                border-bottom: 1px solid rgba(20, 18, 58, .06) !important; }
.nav-capsule { display: flex; flex-wrap: wrap; gap: 4px; }
.nav-capsule a, .nav-capsule button { border-radius: 999px !important; padding: 6px 11px !important; }
.nav-capsule a.actif { background: var(--l-encre) !important; color: #fff !important; font-weight: 500; }

/* --- Espace client : barre latérale claire, élément actif en bleu --- */
.barre { background: rgba(251, 251, 253, .82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-right: 1px solid rgba(20, 18, 58, .06); }
.menu a { border-radius: 14px; }
.menu a:hover { background: rgba(20, 18, 58, .04); }
.menu a[aria-current="page"] { background: var(--l-carte); color: var(--l-bleu-fonce); box-shadow: var(--l-ombre); }

/* La note de visibilité de la barre latérale : la sphère bleue derrière les lames de verre, en petit */
.note-barre { position: relative; overflow: hidden; isolation: isolate; background: var(--l-encre) !important; color: #fff; border-radius: 20px !important; }
.note-barre::before { content: ""; position: absolute; z-index: -2; width: 150px; height: 150px; right: -40px; top: -50px; border-radius: 50%;
                      background: var(--l-halo); filter: blur(34px); opacity: .9; animation: l-orbite 16s ease-in-out infinite; }
.note-barre::after { content: ""; position: absolute; inset: 0; z-index: -1;
                     background: repeating-linear-gradient(90deg, rgba(255,255,255,.10) 0 1px, rgba(255,255,255,0) 1px 22%, rgba(255,255,255,.04) 22% 33.33%); }
.note-barre .text-\[var\(--indigo\)\] { color: #c9cfff; }
.note-barre .text-\[var\(--nuit\)\] { color: #fff; font-family: var(--l-titre); }
.note-barre .text-slate-500, .note-barre .text-slate-600 { color: #c7c8e6; }

/* --- Le prisme : une sphère bleue floue vue à travers des lames de verre cannelé (accueil, espace client) --- */
.prisme { position: relative; overflow: hidden; border-radius: 22px; background: #f7f7fb; isolation: isolate; }
.prisme .lame { position: absolute; top: 0; bottom: 0; width: calc(100% / 6); left: calc(var(--i) * 100% / 6); overflow: hidden; }
.prisme .scene { position: absolute; top: 0; bottom: 0; width: 600%; left: calc(var(--i) * -100% + var(--d)); }
.prisme .boule { position: absolute; width: 74%; aspect-ratio: 1; left: 14%; top: 50%; margin-top: -37%; border-radius: 50%;
                 background: #1f38f5; filter: blur(26px); animation: l-orbite 16s ease-in-out infinite; }
.prisme .lame::after { content: ""; position: absolute; inset: 0;
                       background: linear-gradient(90deg, rgba(255,255,255,.42), rgba(255,255,255,0) 22%, rgba(255,255,255,0) 78%, rgba(255,255,255,.18)); }
.prisme .dessus { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; }
@keyframes l-orbite {
  0% { transform: translate(0, 0) scale(1); } 25% { transform: translate(-7%, 5%) scale(1.05); }
  50% { transform: translate(5%, 7%) scale(.97); } 75% { transform: translate(8%, -5%) scale(1.03); } 100% { transform: translate(0, 0) scale(1); }
}
/* Espace client : la note posée sur un disque de verre, devant le prisme */
.prisme-note { min-height: 250px; min-width: 380px; }
.prisme-note .dessus { padding: 18px; }
.prisme-note .disque { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 22px 18px; border-radius: 28px;
                       background: rgba(255, 255, 255, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
                       box-shadow: 0 10px 30px -12px rgba(20, 18, 58, .35); }
@media (max-width: 767px) { .prisme-note { min-width: 0; } }
@media (prefers-reduced-motion: reduce) { .prisme .boule, .note-barre::before { animation: none; } }

/* --- Pied de page --- */
.pied-de-page { color: var(--l-encre-2); }

/* Téléphone : le menu public tient sur une ligne, et le tableau des tarifs garde ses libellés visibles en défilant */
.entete-verre nav a { white-space: nowrap; }
@media (max-width: 420px) {
  .entete-verre nav { gap: 10px !important; font-size: 13px; }
  .entete-verre nav a:last-child { padding: 8px 12px !important; }
  .entete-verre nav a[href="/tarifs"] { display: none; }
}
.tableau-tarifs th[scope="row"] { position: sticky; left: 0; background: #fff; z-index: 1; }

/* Espace client sur téléphone : la carte de l'agent passe en colonne, les gains passent sous le libellé */
@media (max-width: 640px) {
  .carte-agent { flex-direction: column; align-items: flex-start; }
  .ligne-gain { flex-wrap: wrap; }
  .ligne-gain > .flex-1 { flex-basis: calc(100% - 44px); }
  .ligne-gain .gain-txt { white-space: normal; margin-left: 36px; }
}
@media (max-width: 640px) {
  /* Dans une ligne qui peut passer à la ligne, le texte garde une largeur lisible : les étiquettes et liens passent dessous */
  .flex-wrap > .flex-1.min-w-0, .flex-wrap > .min-w-0.flex-1 { min-width: min(100%, 13rem); }
}

/* --- Analyse gratuite (/essai/<jeton>) : clair et lumineux comme l'accueil, halos bleus, entrées au défilement --- */
.essai-halo { position: absolute; inset: 0 0 auto 0; height: 140vh; pointer-events: none; z-index: -1; overflow: hidden; }
.essai-halo i { position: absolute; border-radius: 50%; filter: blur(100px); }
.essai-halo i:nth-child(1) { width: 60vw; height: 60vw; right: -16vw; top: -12vh; background: var(--l-halo); opacity: .35; animation: l-orbite 22s ease-in-out infinite; }
.essai-halo i:nth-child(2) { width: 40vw; height: 40vw; left: -14vw; top: 50vh; background: #7b8bff; opacity: .3; animation: l-orbite 28s ease-in-out infinite reverse; }
.bandeau-essai { background: rgba(251, 251, 253, .8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
                 box-shadow: var(--l-ombre); border: 1px solid rgba(47, 63, 224, .14); color: var(--l-encre); }
.appel-essai { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(135deg, var(--l-bleu-fonce), var(--l-bleu) 55%, #6a7bff); }
.appel-essai::before { content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%;
                       background: #9aa6ff; filter: blur(60px); opacity: .55; animation: l-orbite 16s ease-in-out infinite; }
.appel-essai .text-indigo-100, .appel-essai .text-indigo-200 { color: #e3e7ff; }
.appel-essai a.border-indigo-300 { border-color: rgba(255, 255, 255, .55); background-color: rgba(255, 255, 255, .12); color: #fff; }
.essai-score circle:nth-of-type(2) { animation: essai-trace 1.4s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes essai-trace { from { stroke-dasharray: 0 400; } }
.anime .entre { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.anime .entre.vu { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .essai-halo i, .appel-essai::before, .essai-score circle { animation: none; } }
