/* Portail clients Fluidpilot — page d'entrée (version 1.3.0). S'appuie sur charte.css (variables --fp-*, composants fp-*).
   Domaines : vert pour Management QSE (.fp-qse), saumon pour Réfrigération & Combustion (.fp-refri) ; marine et bleu communs.
   Jamais de texte bleu, vert ou saumon sur fond clair. Mouvement : transform et opacity seulement, coupé par prefers-reduced-motion. */
#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
#app > main { flex: 1 0 auto; }

/* —— En-tête de page : nuit marine, trame fine, lueurs, lignes de courant —— */
.hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; background-color: var(--fp-marine);
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(150deg, #00406F 0%, var(--fp-marine) 48%, var(--fp-marine-3) 100%);
  background-size: 28px 28px, 28px 28px, 100% 100%; padding: 30px 0 76px; }
.hero-court { padding-bottom: 72px; }
.hero-fond { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.lueur { position: absolute; display: block; border-radius: 50%; will-change: transform; }
.lueur.l1 { width: 620px; height: 620px; right: -260px; top: -330px; background: radial-gradient(circle, rgba(0, 167, 255, .40), rgba(0, 167, 255, 0) 64%); }
.lueur.l2 { width: 520px; height: 520px; left: -260px; bottom: -330px; background: radial-gradient(circle, rgba(0, 210, 116, .22), rgba(0, 210, 116, 0) 64%); }
.lueur.l3 { width: 420px; height: 420px; right: 8%; bottom: -300px; background: radial-gradient(circle, rgba(255, 106, 110, .20), rgba(255, 106, 110, 0) 64%); }
.courants { position: absolute; right: 0; bottom: 0; width: 100%; max-width: 820px; height: 52%; opacity: .75; }
@media (min-width: 720px) { .courants { height: 78%; opacity: 1; } }
.courants path { fill: none; stroke-linecap: round; }
.courants .c1 { stroke: rgba(0, 167, 255, .45); stroke-width: 2; }
.courants .c2 { stroke: rgba(0, 210, 116, .30); stroke-width: 1.5; }
.courants .c3 { stroke: rgba(255, 106, 110, .38); stroke-width: 2; }
.courants .flux { stroke-width: 3; stroke-dasharray: 0 1; }
.courants .flux.c1 { stroke: rgba(0, 167, 255, .95); } .courants .flux.c2 { stroke: rgba(0, 210, 116, .85); } .courants .flux.c3 { stroke: rgba(255, 106, 110, .9); }

.hero-dedans { position: relative; }
.hero-sur { display: flex; align-items: center; gap: 10px; font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: rgba(255, 255, 255, .82); margin-bottom: 14px; }
/* Trois carrés : bleu commun, vert et saumon des deux domaines. */
.hero-sur::before { content: ""; width: 34px; height: 10px; flex: none; background: linear-gradient(90deg, var(--fp-bleu) 0 10px, transparent 10px 12px, var(--fp-vert) 12px 22px, transparent 22px 24px, var(--fp-saumon) 24px 34px); }
.hero-titre { color: #fff !important; font-size: clamp(33px, 8.8vw, 66px); font-weight: 800; line-height: 1.04 !important; letter-spacing: -.028em !important; margin: 0 0 14px !important; text-wrap: balance; }
.hero-court .hero-titre { font-size: clamp(28px, 6.6vw, 46px); }
.hero-titre .fp-points { margin-left: 12px; vertical-align: middle; }
.mot { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 .02em .14em; margin-bottom: -.14em; }
.mot-in { display: inline-block; }
.chapo { max-width: 620px; font-size: 15.5px; line-height: 1.6; color: rgba(255, 255, 255, .92); }
@media (min-width: 720px) { .hero { padding: 52px 0 112px; } .hero-court { padding-bottom: 104px; } .chapo { font-size: 18px; } .hero-sur { margin-bottom: 18px; } }

.hero-bas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 24px; }
.compte { display: inline-flex; align-items: center; gap: 12px; padding: 7px 18px 7px 7px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); max-width: 100%; }
.compte-n { flex: none; display: grid; place-items: center; min-width: 46px; height: 46px; padding: 0 8px; background: #fff; color: var(--fp-marine); font-size: 26px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; box-shadow: 0 8px 20px rgba(0, 0, 0, .22); }
.compte > span { font-size: 14px; font-weight: 600; line-height: 1.4; color: #fff; }
.vide-compte { align-items: flex-start; padding: 12px 16px 12px 12px; max-width: 680px; }
.vide-compte > span:last-child { font-weight: 500; color: rgba(255, 255, 255, .94); }
.compte > .compte-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--fp-marine); }
.compte-ic svg { width: 17px; height: 17px; }
.raccourcis { display: flex; flex-wrap: wrap; gap: 8px; }
.raccourci { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 14px 6px 7px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .22); color: #fff; text-decoration: none; font-size: 13.5px; font-weight: 600; transition: background-color var(--fp-t1) ease, border-color var(--fp-t1) ease, transform var(--fp-t2) var(--fp-sortie); }
.raccourci img { width: 28px; height: 28px; display: block; transition: transform var(--fp-t3) var(--fp-ressort); }
.raccourci:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .45); }

/* —— Barre de marque : bouton de sortie —— */
.sortie .fp-btn__ic { width: 19px; height: 19px; }
@media (max-width: 359px) { .sortie span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

/* —— Corps : les cartes chevauchent le bas de l'en-tête —— */
.corps { position: relative; z-index: 1; margin-top: -48px; padding-bottom: 48px; }
@media (min-width: 720px) { .corps { margin-top: -64px; padding-bottom: 64px; } }
.domaines { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 980px) { .domaines { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: stretch; } }

.domaine { display: flex; flex-direction: column; padding: 26px 18px 18px; border-radius: var(--fp-r-xl); box-shadow: var(--fp-ombre-2); background: linear-gradient(180deg, var(--fp-teinte) 0, rgba(255, 255, 255, 0) 170px), #fff; scroll-margin-top: 88px; }
@media (min-width: 720px) { .domaine { padding: 34px 32px 30px; } }
.domaine > *:not(.d-blocs) { position: relative; }
.d-blocs { position: absolute; top: 4px; right: -34px; width: 150px; height: auto; opacity: .6; pointer-events: none; }
@media (min-width: 720px) { .d-blocs { width: 196px; top: 10px; right: -40px; } }
.d-blocs rect { fill: none; stroke: var(--fp-accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; transition: transform .9s var(--fp-sortie); }
.d-blocs .b3 { fill: var(--fp-teinte); }
.d-tete { display: flex; align-items: center; gap: 16px; }
.d-symbole { flex: none; display: block; width: 58px; height: 58px; box-shadow: 0 10px 24px rgba(0, 52, 94, .22); transition: transform var(--fp-t3) var(--fp-ressort), box-shadow var(--fp-t3) var(--fp-sortie); }
.d-picto { flex: none; width: 58px; height: 58px; display: grid; place-items: center; background: var(--fp-marine); color: #fff; }
.d-picto svg { width: 42px; height: 42px; } .d-picto .trait-a, .d-picto .trait-b { stroke: var(--fp-accent); }
@media (min-width: 720px) { .d-symbole, .d-picto { width: 68px; height: 68px; } }
.d-noms { min-width: 0; }
.d-noms .fp-sur { margin-bottom: 5px; }
/* Téléphone : le symbole seul sur la première ligne (les blocs décoratifs à sa droite), le nom du domaine dessous, en pleine largeur. */
@media (max-width: 559px) { .d-tete { flex-wrap: wrap; gap: 18px; } .d-noms { flex: 1 1 100%; } .d-noms .fp-sur { font-size: 11px; letter-spacing: .12em; } }
@media (min-width: 560px) { .d-tete { padding-right: 120px; } }
@media (min-width: 980px) { .d-tete { padding-right: 56px; } .d-blocs { width: 150px; right: -34px; top: 4px; } }
.domaine h2 { font-size: clamp(23px, 2.6vw, 30px); text-wrap: balance; }
.d-phrase { margin: 16px 0 20px !important; font-size: 15.5px; line-height: 1.6; color: var(--fp-doux); max-width: 54ch; }

/* —— Espaces —— */
.espaces { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; flex: 1 1 auto; grid-auto-rows: 1fr; }
.espace { display: flex; }
.espace article { flex: 1 1 auto; display: flex; flex-direction: column; position: relative; background: #fff; border: 1px solid var(--fp-trait); border-radius: 16px; padding: 18px; transition: transform var(--fp-t2) var(--fp-sortie), box-shadow var(--fp-t2) var(--fp-sortie), border-color var(--fp-t1) ease; }
@media (min-width: 720px) { .espace article { padding: 20px 22px; } }
.e-tete { display: flex; align-items: flex-start; gap: 14px; }
.e-picto { flex: none; width: 52px; height: 52px; display: grid; place-items: center; background: var(--fp-marine-pale); color: var(--fp-marine); transition: transform var(--fp-t3) var(--fp-ressort); }
.e-picto svg { width: 36px; height: 36px; overflow: visible; }
/* Pictogramme à la manière du symbole du domaine : vert sur marine (QSE), marine sur saumon (Réfrigération & Combustion). */
.fp-qse .e-picto { background: var(--fp-marine); color: #fff; } .fp-qse .e-picto .trait-a { stroke: var(--fp-vert); }
.fp-refri .e-picto { background: var(--fp-saumon); color: var(--fp-marine); } .fp-refri .e-picto .plein-a { fill: #fff; }
.e-picto .plein-a { fill: #fff; }
.atome { transform-box: fill-box; transform-origin: center; }
.e-noms { min-width: 0; padding-top: 2px; }
.e-noms h3 { font-size: 20px; line-height: 1.2; letter-spacing: -.01em; }
.e-dev { margin-top: 4px !important; font-size: 13px; line-height: 1.45; color: var(--fp-doux); }
.e-phrase { margin: 14px 0 16px !important; font-size: 15px; line-height: 1.55; color: var(--fp-encre); }
.e-pied { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--fp-trait); }
.note { flex: 1 1 220px; font-size: 13.5px; line-height: 1.5; color: var(--fp-doux); }
.fp-etat .aiguille { transform-box: view-box; transform-origin: 12px 12px; transition: transform 1.2s var(--fp-sortie); }
.entrer { flex: 0 0 auto; }
@media (max-width: 519px) { .entrer { flex: 1 1 100%; justify-content: space-between; } .reessayer { flex: 1 1 100%; } }
.reessayer .tourne { transition: transform var(--fp-t3) var(--fp-sortie); }

/* États */
.etat-ouvert article { border-color: var(--fp-trait-2); box-shadow: var(--fp-ombre-1); }
.etat-ferme article, .etat-prochaine article { background: #FAFBFD; border-style: dashed; border-color: var(--fp-trait-2); }
.etat-ferme .e-picto, .etat-prochaine .e-picto { opacity: .72; }
.etat-indisponible article { border-color: var(--fp-trait-2); box-shadow: inset 4px 0 0 var(--fp-marine); }

/* —— Écrans simples (connexion, erreur) et attente —— */
.carte-simple { max-width: 620px; padding: 28px 22px; box-shadow: var(--fp-ombre-2); }
@media (min-width: 720px) { .carte-simple { padding: 36px; } }
.cs-ic { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--fp-ciel); color: var(--fp-marine); margin-bottom: 16px; box-shadow: inset 0 0 0 1px rgba(0, 167, 255, .35); }
.cs-ic svg { width: 32px; height: 32px; }
.carte-simple h2 { font-size: 25px; } .carte-simple p { color: var(--fp-doux); margin: 10px 0 22px !important; }
.domaine-attente { padding: 26px 18px 18px; border-radius: var(--fp-r-xl); box-shadow: var(--fp-ombre-2); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 720px) { .domaine-attente { padding: 34px 32px 30px; } }
.domaine-attente i { display: block; }
.sq-symbole { width: 58px; height: 58px; flex: none; border-radius: 0; } .sq-l1 { width: 160px; height: 12px; margin-bottom: 10px; } .sq-l2 { width: 220px; max-width: 100%; height: 24px; }
.sq-l3 { width: 92%; height: 14px; } .sq-l4 { width: 70%; height: 14px; } .sq-carte { height: 168px; border-radius: 16px; margin-top: 6px; }
.domaine-attente .d-noms { flex: 1; min-width: 0; }

/* —— Pied de page : marine, logo officiel pour fond sombre —— */
.pied { background: var(--fp-marine); color: rgba(255, 255, 255, .86); padding: 26px 0 calc(28px + env(safe-area-inset-bottom, 0px)); }
.pied-dedans { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.pied-logo { display: block; height: 40px; width: auto; aspect-ratio: 237.171 / 72.127; }
.pied-texte { font-size: 13.5px; line-height: 1.55; } .pied-texte b { color: #fff; font-weight: 700; }

/* —— Mouvement —— */
@keyframes ac-derive-1 { to { transform: translate3d(-70px, 46px, 0) scale(1.12); } }
@keyframes ac-derive-2 { to { transform: translate3d(60px, -40px, 0) scale(1.08); } }
@keyframes ac-derive-3 { to { transform: translate3d(-50px, -30px, 0) scale(1.15); } }
@keyframes ac-flux { from { stroke-dasharray: .07 .93; stroke-dashoffset: .07; } to { stroke-dasharray: .07 .93; stroke-dashoffset: -1; } }
@keyframes ac-mot { from { transform: translate3d(0, 108%, 0); } to { transform: none; } }
@keyframes ac-trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ac-bloc { from { opacity: 0; transform: translate3d(14px, -8px, 0); } to { opacity: 1; transform: none; } }
@keyframes ac-atome { 0% { transform: scale(0); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: no-preference) {
  /* En-tête vivant mais calme : les lueurs dérivent lentement, et un peu de « fluide » parcourt les lignes à l'arrivée, puis tout se pose. */
  .lueur.l1 { animation: ac-derive-1 26s ease-in-out 2 alternate; } .lueur.l2 { animation: ac-derive-2 31s ease-in-out 2 alternate; } .lueur.l3 { animation: ac-derive-3 23s ease-in-out 2 alternate; }
  .courants .flux { animation: ac-flux 7s cubic-bezier(.45, 0, .25, 1) 3 backwards; } .courants .flux.c2 { animation-delay: 1.1s; } .courants .flux.c3 { animation-delay: 2.2s; }
  .hero-entre .mot-in { animation: ac-mot .9s var(--fp-sortie) backwards; animation-delay: calc(.12s + var(--fp-i, 0) * 90ms); }
  .entree .compte-n { animation: fp-pop .7s var(--fp-ressort) backwards; animation-delay: .55s; }
  .entree .raccourci { animation: fp-monte .6s var(--fp-sortie) backwards; animation-delay: .6s; } .entree .raccourci + .raccourci { animation-delay: .68s; }
  .entree .d-symbole { animation: fp-pop .8s var(--fp-ressort) backwards; animation-delay: calc(var(--fp-i, 0) * 70ms + .18s); }
  .entree .d-blocs rect { animation: ac-bloc .9s var(--fp-sortie) backwards; animation-delay: calc(var(--fp-i, 0) * 70ms + .35s); }
  .entree .d-blocs .b2 { animation-delay: calc(var(--fp-i, 0) * 70ms + .45s); } .entree .d-blocs .b3 { animation-delay: calc(var(--fp-i, 0) * 70ms + .55s); } .entree .d-blocs .b4 { animation-delay: calc(var(--fp-i, 0) * 70ms + .65s); }
  .entree .e-picto [pathLength] { stroke-dasharray: 1; animation: ac-trace 1.1s var(--fp-sortie) backwards; animation-delay: calc(var(--fp-i, 0) * 70ms + .45s); }
  .entree .atome { animation: ac-atome .55s var(--fp-ressort) backwards; } .entree .a0 { animation-delay: .7s; } .entree .a1 { animation-delay: .85s; } .entree .a2 { animation-delay: .95s; } .entree .a3 { animation-delay: 1.05s; }
  .entree .fp-etat { animation: fp-pop .6s var(--fp-ressort) backwards; animation-delay: calc(var(--fp-i, 0) * 70ms + .6s); }
  .entree .fp-etat .coche { stroke-dasharray: 1; animation: ac-trace .5s ease-out backwards; animation-delay: calc(var(--fp-i, 0) * 70ms + .95s); }
  /* Survol : profondeur, léger déplacement, symbole qui s'anime, blocs qui glissent. */
  .domaine:hover .d-symbole { transform: translateY(-3px) rotate(-4deg) scale(1.05); box-shadow: 0 16px 30px rgba(0, 52, 94, .28); }
  .domaine:hover .d-blocs .b1 { transform: translate(-8px, 4px); } .domaine:hover .d-blocs .b2 { transform: translate(6px, -3px); } .domaine:hover .d-blocs .b3 { transform: translate(-4px, -6px); } .domaine:hover .d-blocs .b4 { transform: translate(8px, 2px); }
  .etat-ouvert article:hover { transform: translateY(-2px); border-color: var(--fp-marine); box-shadow: 0 10px 26px rgba(0, 52, 94, .14); }
  .etat-ouvert article:hover .e-picto { transform: rotate(-6deg) scale(1.06); }
  .etat-prochaine article:hover .aiguille { transform: rotate(360deg); }
  .reessayer:hover .tourne { transform: rotate(-200deg); }
  .raccourci:hover { transform: translateY(-1px); } .raccourci:hover img { transform: rotate(-8deg) scale(1.08); }
  .espace article:active { transform: scale(.99); }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; }
@media print { .hero-fond, .fp-toast, .sortie, .raccourcis { display: none; } .hero { background: #fff; color: var(--fp-marine); } .hero-titre, .chapo { color: var(--fp-marine) !important; } .corps { margin-top: 0; } }
