/* ==========================================================================
   SELANCE — style.css : variables, polices, reset, typographie, structure, en-tête, pied de page
   Ordre de chargement : style.css → components.css → pages.css → responsive.css
   ========================================================================== */

@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/poppins-700.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 200 800; font-style: normal; font-display: swap; src: url("../fonts/plus-jakarta-sans.woff2") format("woff2"); }

:root {
    /* Palette de marque */
    --selance-teal: #0B5E7A;
    --selance-turquoise: #00B4C6;
    --selance-coral: #FF6B7D;
    --selance-light: #F7F9FB;
    --selance-dark: #1F2937;

    /* Dérivées pensées pour l'accessibilité (contrastes AA sur fond clair) */
    --teal-900: #073B4E;
    --teal-800: #094A62;
    --teal-100: #E3F2F6;
    --teal-050: #F0F8FA;
    --turquoise-700: #00899A;          /* turquoise utilisable pour du texte / icônes */
    --coral-strong: #D93D54;           /* corail utilisable pour du texte ou un bouton à texte blanc */
    --coral-soft: #FFE9EC;
    --ink: var(--selance-dark);
    --ink-soft: #4B5563;
    --line: #DCE7EC;
    --white: #FFFFFF;

    /* Typographie */
    --font-title: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-text: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

    /* Échelle */
    --fs-body: 1.0625rem;
    --fs-small: .9375rem;
    --fs-h1: clamp(2rem, 1.2rem + 3.4vw, 3.5rem);
    --fs-h2: clamp(1.5rem, 1.15rem + 1.4vw, 2.25rem);
    --fs-h3: clamp(1.125rem, 1.05rem + .4vw, 1.3125rem);

    --radius: 18px;
    --radius-sm: 12px;
    --radius-pill: 999px;
    --shadow-sm: 0 2px 8px rgba(11, 94, 122, .08);
    --shadow: 0 10px 30px rgba(11, 94, 122, .12);
    --shadow-lg: 0 24px 60px rgba(7, 59, 78, .18);

    --container: 1200px;
    --gutter: clamp(1rem, 4vw, 2rem);
    --header-h: 76px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    font-family: var(--font-text);
    font-size: var(--fs-body);
    line-height: 1.65;
    color: var(--ink);
    background: var(--selance-light);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 600; line-height: 1.2; margin: 0 0 .6em; color: var(--selance-teal); letter-spacing: -.01em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
ul[class], ol[class] { list-style: none; }
a { color: var(--selance-teal); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { color: var(--teal-900); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
small { font-size: var(--fs-small); }

/* Focus toujours visible */
:focus-visible {
    outline: 3px solid var(--selance-turquoise);
    outline-offset: 3px;
    border-radius: 6px;
}
.site-footer :focus-visible, .hero :focus-visible, .page-hero :focus-visible, .feature-card :focus-visible, .cta-band :focus-visible { outline-color: #FFFFFF; }

/* Utilitaires */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 1000; background: var(--selance-teal); color: #fff;
    padding: .75rem 1.25rem; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 1rem; color: #fff; }
.muted { color: var(--ink-soft); }
.icon { width: 1.5rem; height: 1.5rem; flex: none; }
.icon--sm { width: 1.125rem; height: 1.125rem; }
.hp { position: absolute; left: -9999px; }
.accent { color: var(--coral-strong); }

/* ---------------------------------------------------------------- En-tête */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid transparent;
    transition: box-shadow .25s, border-color .25s;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); border-color: var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.site-logo { display: inline-flex; align-items: center; flex: none; border-radius: 8px; }
.site-logo__full { width: 150px; height: auto; }
.site-logo__compact { display: none; }
.site-header__actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }

.primary-nav { margin-inline: auto; }
.primary-nav__list { display: flex; align-items: center; gap: .15rem; list-style: none; }
.primary-nav a {
    display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .8rem;
    font-family: var(--font-title); font-weight: 500; font-size: .9rem; color: var(--selance-dark);
    text-decoration: none; border-radius: var(--radius-pill); position: relative; white-space: nowrap;
}
.primary-nav a:hover { color: var(--selance-teal); background: var(--teal-050); }
.primary-nav a.is-active { color: var(--selance-teal); }
.primary-nav a.is-active::after {
    content: ""; position: absolute; left: .8rem; right: .8rem; bottom: 4px; height: 3px; border-radius: 3px; background: var(--selance-coral);
}

.icon-btn {
    display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: var(--selance-teal); transition: background .2s;
}
.icon-btn:hover { background: var(--teal-100); }
.icon-btn--round { border: 1.5px solid var(--selance-teal); background: #fff; }
.icon-btn--round:hover { background: var(--selance-teal); color: #fff; }
.nav-toggle { display: none; }
.nav-toggle .icon--close { display: none; }
.nav-toggle[aria-expanded="true"] .icon--open { display: none; }
.nav-toggle[aria-expanded="true"] .icon--close { display: block; }

.header-search { border-top: 1px solid var(--line); background: #fff; padding-block: 1rem; }
.js .header-search { display: none; }
.js .header-search.is-open { display: block; animation: fade-down .2s var(--ease); }
@keyframes fade-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- Pied de page */
.site-footer { background: var(--teal-900); color: #D6EAF0; margin-top: 4rem; }
.site-footer a { color: #D6EAF0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 2.5rem; padding-block: 3.5rem 2.5rem; }
.site-footer__brand img { width: 220px; height: auto; margin-bottom: 1rem; }
.site-footer__brand p { max-width: 24rem; color: #B7D5DE; font-size: var(--fs-small); }
.site-footer__col h2 { font-family: var(--font-title); font-size: 1rem; color: #fff; margin-bottom: 1rem; font-weight: 600; }
.site-footer__col ul { list-style: none; display: grid; gap: .1rem; }
.site-footer__col li a { display: inline-block; padding: .25rem 0; min-height: 32px; font-size: var(--fs-small); }
.site-footer__newsletter-title { margin-top: 1.75rem; }
.site-footer__small { font-size: var(--fs-small); color: #B7D5DE; margin-bottom: .75rem; }
.social { display: flex; gap: .5rem; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .35); }
.social a:hover { background: #fff; color: var(--teal-900); text-decoration: none; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .14); font-size: .875rem; }
.site-footer__bottom .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; padding-block: 1rem; }
.site-footer__bottom p { margin: 0; }
.site-footer__bottom ul { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; list-style: none; }
.site-footer__bottom a { display: inline-block; padding: .35rem 0; min-height: 32px; }

.to-top {
    position: fixed; right: 1rem; bottom: 1rem; z-index: 90; width: 48px; height: 48px; border-radius: 50%; border: 0;
    background: var(--selance-teal); color: #fff; box-shadow: var(--shadow); display: grid; place-items: center;
    opacity: 0; pointer-events: none; transition: opacity .25s;
}
.to-top .icon { transform: rotate(-90deg); }
.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--teal-900); }

/* ---------------------------------------------------------------- Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
