/* Page d'accueil — espacecommercial.fr (2026) */
:root { --bleu-nuit: #1f2d3d; --jaune: #f2b134; --bleu: #0d6efd; --gris: #f6f7f9; }

/* styles.css impose « main { display: flex ; height: 100vh ; overflow-x: auto } » (mise en page en colonnes du reste
   du site) : l'accueil, lui, est un empilement vertical classique. */
main#accueil, #accueil { display: block !important; flex-wrap: initial !important; height: auto !important; min-height: 0 !important; overflow: visible !important; color: #1f2d3d; }
#accueil > * { flex-shrink: 1; min-height: 0; }
#accueil .bloc { padding: 4.5rem 0; }
#accueil .bloc-clair { background: var(--gris); }
#accueil .bloc-sombre { background: var(--bleu-nuit); color: #fff; }
#accueil .titre-bloc { font-weight: 700; margin-bottom: 2.25rem; text-align: center; position: relative; }
#accueil .titre-bloc::after { content: ""; display: block; width: 64px; height: 4px; background: var(--jaune); border-radius: 2px; margin: .75rem auto 0; }
#accueil .titre-bloc.text-start::after { margin-left: 0; }

/* ---------- héros : dégradé animé + formes flottantes */
.heros { position: relative; overflow: hidden; padding: 5rem 0 4rem; color: #fff;
  background: linear-gradient(120deg, #1f2d3d 0%, #243b5a 35%, #0d6efd 70%, #f2b134 130%); background-size: 220% 220%; animation: glisse-degrade 18s ease-in-out infinite; }
.heros .surtitre { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: var(--jaune); font-weight: 700; margin-bottom: .75rem; }
.heros h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 800; line-height: 1.05; margin-bottom: .5rem; }
.heros .sous-titre { font-size: clamp(1.25rem, 2.4vw, 1.75rem); font-weight: 400; opacity: .95; }
.heros .accent { color: var(--jaune); font-weight: 700; }
.heros .chapo { font-size: 1.1rem; max-width: 42rem; opacity: .92; margin-top: 1.25rem; }
.heros-formes { position: absolute; inset: 0; pointer-events: none; }
.heros-formes .forme { position: absolute; border-radius: 50%; opacity: .18; filter: blur(2px); animation: flotte 12s ease-in-out infinite; }
.heros-formes .forme-1 { width: 320px; height: 320px; background: #fff; top: -120px; right: 10%; }
.heros-formes .forme-2 { width: 180px; height: 180px; background: var(--jaune); bottom: -60px; left: 12%; animation-duration: 15s; animation-delay: -4s; }
.heros-formes .forme-3 { width: 120px; height: 120px; background: #4dabf7; top: 30%; left: 40%; animation-duration: 10s; animation-delay: -7s; border-radius: 28%; }
.heros-formes .forme-4 { width: 90px; height: 90px; background: #fff; bottom: 18%; right: 32%; animation-duration: 13s; animation-delay: -2s; border-radius: 28%; }
@keyframes glisse-degrade { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes flotte { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-28px) rotate(8deg); } }

.btn-cta { background: var(--jaune); color: var(--bleu-nuit); font-weight: 700; border: 0; border-radius: 999px; padding: .85rem 1.6rem; transition: transform .2s ease, box-shadow .2s ease; }
.btn-cta:hover, .btn-cta:focus { background: #ffc54d; color: var(--bleu-nuit); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .18); }
.btn-cta-clair { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; padding: .85rem 1.6rem; font-weight: 600; backdrop-filter: blur(4px); transition: transform .2s ease, background .2s ease; }
.btn-cta-clair:hover, .btn-cta-clair:focus { background: rgba(255, 255, 255, .26); color: #fff; transform: translateY(-2px); }

.chiffres li { display: flex; flex-direction: column; min-width: 7rem; }
.chiffres .compteur { font-size: 2.1rem; font-weight: 800; line-height: 1; color: var(--jaune); font-variant-numeric: tabular-nums; }
.chiffres small { opacity: .9; margin-top: .25rem; }

.carte-connexion { background: #fff; color: var(--bleu-nuit); border-radius: 14px; padding: .7rem .8rem .65rem; box-shadow: 0 16px 40px rgba(0, 0, 0, .28); max-width: 250px; margin-left: auto; font-size: .8rem; animation: apparait-carte .7s ease .15s both; }
@keyframes apparait-carte { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.carte-connexion h3 { font-size: .88rem; margin-bottom: .35rem !important; }
.carte-connexion .illustration-connexion { margin: -.4rem auto .2rem; max-width: 125px; }
.carte-connexion .formulaire-compact { gap: .35rem !important; }
.carte-connexion .formulaire-compact .form-control { padding: .28rem .6rem; font-size: .8rem; }
.carte-connexion .formulaire-compact .btn, .carte-connexion .btn { padding: .28rem .7rem; font-size: .82rem; }
.carte-connexion .small { font-size: .7rem; flex-wrap: wrap; gap: .15rem .5rem; }
.carte-connexion .small a { white-space: nowrap; }
.carte-connexion .mt-3 { margin-top: .5rem !important; }
.carte-connexion .tres-petit { font-size: .66rem; line-height: 1.3; }
/* ordinateur : carte dans l'angle supérieur droit de l'écran, alignée sur le haut du texte ; téléphone : sous le texte, centrée */
@media (min-width: 992px) { .heros .carte-connexion { position: absolute; top: var(--bs-gutter-y, 3rem); right: calc((100% - 100vw) / 2 + 1.75rem); width: 250px; z-index: 2; } }
/* téléphone : les rangées à grandes gouttières ne doivent pas élargir la page (défilement horizontal) */
#accueil .bloc { overflow-x: hidden; overflow-x: clip; }
@media (max-width: 991.98px) { .carte-connexion { margin-right: auto; } }
.carte-connexion .bulle-1 { animation: bulle 5s ease-in-out infinite; transform-origin: 216px 90px; }
.carte-connexion .bulle-2 { animation: bulle 5s ease-in-out infinite; animation-delay: -2.5s; transform-origin: 270px 140px; }
@keyframes bulle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* ---------- cartes filières, étapes, nouveautés */
.carte-filiere { background: #fff; border: 1px solid #e6ebf2; border-radius: 20px; padding: 2rem; height: 100%; transition: transform .25s ease, box-shadow .25s ease; }
.carte-filiere:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(31, 45, 61, .12); }
.carte-filiere h3 { font-size: 1.35rem; font-weight: 700; margin: 1rem 0 .75rem; }
.carte-illustration { background: var(--gris); border-radius: 14px; display: inline-flex; padding: .75rem 1rem; }
.badge-filiere { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em; background: var(--jaune); color: var(--bleu-nuit); border-radius: 999px; padding: .2rem .65rem; vertical-align: middle; margin-left: .4rem; }
.liste-coches { list-style: none; padding: 0; margin: 1rem 0 1.25rem; }
.liste-coches li { position: relative; padding-left: 1.75rem; margin-bottom: .45rem; }
.liste-coches li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--jaune);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zm3.7 6.2-4.3 4.3a.9.9 0 0 1-1.3 0L4.3 8.7a.9.9 0 1 1 1.3-1.3L7 8.6l3.6-3.6a.9.9 0 1 1 1.3 1.3z'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zm3.7 6.2-4.3 4.3a.9.9 0 0 1-1.3 0L4.3 8.7a.9.9 0 1 1 1.3-1.3L7 8.6l3.6-3.6a.9.9 0 1 1 1.3 1.3z'/></svg>") center / contain no-repeat; }
.bloc-sombre .liste-coches li::before { background: var(--jaune); }
.lien-fleche { font-weight: 700; text-decoration: none; color: var(--bleu); }
.lien-fleche::after { content: " \2192"; transition: margin-left .2s ease; }
.lien-fleche:hover::after { margin-left: .35rem; }

.etape { background: #fff; border-radius: 20px; padding: 2.25rem 1.75rem; height: 100%; border: 1px solid #e6ebf2; }
.etape .numero { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--bleu-nuit); color: var(--jaune); font-weight: 800; font-size: 1.3rem; margin-bottom: 1rem; }
.etape h3 { font-size: 1.2rem; font-weight: 700; }

.nouveaute { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 1.4rem; height: 100%; display: flex; flex-direction: column; gap: .5rem; transition: background .25s ease; }
.nouveaute:hover { background: rgba(255, 255, 255, .13); }
.nouveaute strong { color: var(--jaune); font-size: 1.05rem; }
.nouveaute span { font-size: .95rem; opacity: .9; }

.ligne-note { opacity: 0; animation: apparait-ligne .8s ease forwards; }
@keyframes apparait-ligne { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }

/* ---------- apparition au défilement */
.apparait { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.apparait.visible { opacity: 1; transform: none; }
.apparait.retard-1 { transition-delay: .15s; } .apparait.retard-2 { transition-delay: .3s; } .apparait.retard-3 { transition-delay: .45s; }

@media (prefers-reduced-motion: reduce) {
  .heros, .heros-formes .forme, .carte-connexion, .carte-connexion .bulle-1, .carte-connexion .bulle-2, .ligne-note { animation: none !important; }
  .apparait { opacity: 1; transform: none; transition: none; }
  .carte-filiere, .btn-cta, .btn-cta-clair { transition: none; }
}
@media (max-width: 575.98px) { .heros { padding: 3.5rem 0 3rem; } .chiffres { gap: 1.25rem !important; } .chiffres .compteur { font-size: 1.7rem; } }
