/* Page d'accueil publique de Sama Espace. Aucune dépendance externe. */
:root {
    --nuit: #0b1f44; --nuit-2: #123a7c; --primaire: #1e5bb8; --ciel: #e6effb; --jaune: #facc15;
    --encre: #16202e; --encre-douce: #48566a; --fond: #f6f8fc; --trait: #dde4ee;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 17px; line-height: 1.55; color: var(--encre); background: var(--fond); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--jaune); outline-offset: 3px; border-radius: 6px; }
.evitement { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--nuit); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.evitement:focus { left: 8px; }

.bouton { display: inline-flex; align-items: center; justify-content: center; padding: 13px 24px; border-radius: 12px; font-weight: 650; font-size: 16px; text-decoration: none; border: 2px solid transparent; transition: transform .15s ease, background-color .15s ease; }
.bouton:hover { transform: translateY(-1px); }
.bouton-jaune { background: var(--jaune); color: var(--nuit); }
.bouton-jaune:hover { background: #fde047; }
.bouton-contour { border-color: rgba(255, 255, 255, .55); color: #fff; }
.bouton-contour:hover { background: rgba(255, 255, 255, .12); }
.bouton-clair { background: #fff; color: var(--nuit); padding: 9px 18px; font-size: 15px; }

/* En-tête et hero partagent le même fond nuit */
.tete { position: absolute; inset: 0 0 auto 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px clamp(20px, 5vw, 72px); color: #fff; }
.marque { display: inline-flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 700; text-decoration: none; letter-spacing: -.01em; }
.tete-liens { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.tete-liens a:not(.bouton) { text-decoration: none; opacity: .85; }
.tete-liens a:not(.bouton):hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }

.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 64px);
    padding: clamp(120px, 14vw, 170px) clamp(20px, 5vw, 72px) clamp(90px, 10vw, 130px); color: #fff; overflow: hidden;
    background: radial-gradient(900px 520px at 88% 8%, rgba(96, 165, 250, .42), transparent 62%), linear-gradient(135deg, var(--nuit) 0%, var(--nuit-2) 58%, var(--primaire) 100%); }
.hero h1 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.06; letter-spacing: -.025em; font-weight: 750; max-width: 15em; text-wrap: balance; }
.hero-chapeau { margin-top: 22px; font-size: clamp(17px, 1.5vw, 20px); color: #d6e4fb; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 22px; font-size: 14.5px; color: #b7cdf2; max-width: 36em; }
.hero-visuel { position: relative; min-height: 380px; }
.hero-ecran { position: absolute; width: 82%; border-radius: 18px; box-shadow: 0 30px 70px rgba(4, 13, 33, .5); border: 1px solid rgba(255, 255, 255, .5); }
.hero-ecran-1 { top: 0; right: 0; transform: rotate(2.2deg); }
.hero-ecran-2 { bottom: 0; left: 0; transform: rotate(-3deg); }

/* Une seule séquence d'entrée, au chargement */
@media (prefers-reduced-motion: no-preference) {
    .hero-texte > * { animation: monter .7s cubic-bezier(.2, .7, .2, 1) both; }
    .hero-texte > :nth-child(2) { animation-delay: .08s; }
    .hero-texte > :nth-child(3) { animation-delay: .16s; }
    .hero-texte > :nth-child(4) { animation-delay: .24s; }
    .hero-ecran-1 { animation: poser-1 .9s cubic-bezier(.2, .7, .2, 1) .15s both; }
    .hero-ecran-2 { animation: poser-2 .9s cubic-bezier(.2, .7, .2, 1) .3s both; }
}
@keyframes monter { from { opacity: 0; transform: translateY(18px); } }
@keyframes poser-1 { from { opacity: 0; transform: translateY(40px) rotate(6deg); } }
@keyframes poser-2 { from { opacity: 0; transform: translateY(40px) rotate(-8deg); } }

.bande { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: -46px clamp(20px, 5vw, 72px) 0; position: relative; background: var(--trait); border-radius: 18px; overflow: hidden; box-shadow: 0 18px 44px rgba(11, 31, 68, .12); }
.bande p { background: #fff; padding: 22px 26px; font-size: 15px; color: var(--encre-douce); }
.bande strong { display: block; color: var(--encre); font-size: 16.5px; margin-bottom: 2px; }

.section { padding: clamp(64px, 8vw, 110px) clamp(20px, 5vw, 72px); }
.section h2 { font-size: clamp(28px, 3.2vw, 42px); letter-spacing: -.02em; line-height: 1.12; }
.section-chapeau { margin-top: 12px; color: var(--encre-douce); max-width: 40em; }

.fonctions { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; margin-top: 40px; }
.fonction { background: #fff; border: 1px solid var(--trait); border-radius: 20px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.fonction:hover { transform: translateY(-4px); box-shadow: 0 22px 48px rgba(11, 31, 68, .12); }
.fonction img { width: 100%; aspect-ratio: 600 / 340; object-fit: cover; border-bottom: 1px solid #e9edf3; }
.fonction-texte { padding: 22px 24px 26px; }
.fonction h3 { font-size: 20px; letter-spacing: -.01em; }
.fonction p { margin-top: 8px; color: var(--encre-douce); font-size: 16px; }

.section-nuit { background: var(--nuit); color: #fff; }
.etapes { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.etapes li { padding-top: 22px; border-top: 2px solid rgba(255, 255, 255, .22); }
.etape-numero { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--jaune); color: var(--nuit); font-weight: 750; font-size: 18px; }
.etapes h3 { margin-top: 16px; font-size: 21px; letter-spacing: -.01em; }
.etapes p { margin-top: 8px; color: #c5d6f3; font-size: 16px; }
.appel { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 48px; }

.pied { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 26px clamp(20px, 5vw, 72px); font-size: 14.5px; color: var(--encre-douce); }
.pied a { color: var(--primaire); }

@media (max-width: 900px) {
    .tete-liens a:not(.bouton) { display: none; }
    .hero { grid-template-columns: 1fr; padding-bottom: 96px; }
    .hero-visuel { min-height: 0; aspect-ratio: 600 / 420; max-width: 560px; }
    .bande, .etapes { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .bouton, .fonction { transition: none; } .bouton:hover, .fonction:hover { transform: none; } }
