/* ============================================================
   Service d'Écoute — UNA · Système de design
   Direction : moderne & dynamique · bleu confiance + accent ember
   Titres : Space Grotesk · Corps : Inter
   Signature : ondes d'écoute (soundwave) dans le hero
   ============================================================ */

:root {
    /* Couleurs */
    --ink: #0b1220;
    --ink-soft: #1b2740;
    --primary: #1d4ed8;
    --primary-deep: #172c6b;
    --primary-700: #1e3a8a;
    --sky: #3b82f6;
    --ember: #f97316;
    --ember-deep: #ea580c;

    --canvas: #f4f6fb;
    --surface: #ffffff;
    --muted: #5b6b85;
    --muted-2: #8090aa;
    --line: #e6eaf2;

    /* Type */
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* Rayons & ombres */
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 22px;
    --r-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 8px rgba(15, 23, 42, .05);
    --shadow-md: 0 6px 24px rgba(15, 23, 42, .08), 0 2px 6px rgba(15, 23, 42, .05);
    --shadow-lg: 0 22px 48px rgba(23, 44, 107, .18);
    --shadow-ember: 0 10px 26px rgba(249, 115, 22, .32);

    --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background-color: var(--canvas);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, .display,
.navbar-brand, .btn {
    font-family: var(--font-display);
    letter-spacing: -.02em;
}

::selection { background: rgba(29, 78, 216, .18); }

a { color: var(--primary); }

/* Eyebrow / labels structurels */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--primary);
}
.eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    background: var(--ember);
    border-radius: 2px;
}
.eyebrow.on-dark { color: #bcd0ff; }

.section { padding: 84px 0; }
.section-head { max-width: 640px; }
.section-title {
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    font-weight: 700;
    margin: .6rem 0 .5rem;
}
.section-sub { color: var(--muted); font-size: 1.08rem; margin: 0; }
.text-center .section-head { margin-inline: auto; }

/* ===================== Navbar ===================== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: .85rem 0;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: background .3s var(--ease), border-color .3s var(--ease), padding .3s var(--ease), box-shadow .3s var(--ease);
}
.site-nav.is-scrolled {
    background: rgba(255, 255, 255, .9);
    border-bottom-color: var(--line);
    box-shadow: 0 6px 24px rgba(15, 23, 42, .06);
    padding: .6rem 0;
}
.brand-logo {
    background: #fff;
    border-radius: 10px;
    padding: 4px 6px;
    box-shadow: var(--shadow-sm);
}
.brand-text {
    font-weight: 700;
    font-size: 1.12rem;
    color: var(--ink);
    line-height: 1;
}
.brand-sub { color: var(--primary); }
.site-nav .nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--ink-soft);
    padding: .5rem .9rem;
    border-radius: var(--r-sm);
    transition: color .2s var(--ease), background .2s var(--ease);
}
.site-nav .nav-link:hover { color: var(--primary); background: rgba(29, 78, 216, .07); }
.nav-cta {
    display: inline-flex;
    align-items: center;
    margin-left: .4rem;
    padding: .55rem 1.1rem;
    font-family: var(--font-body);
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: var(--primary);
    border-radius: var(--r-pill);
    box-shadow: 0 6px 16px rgba(29, 78, 216, .28);
    transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.nav-cta:hover { background: var(--primary-700); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(29, 78, 216, .34); }
@media (max-width: 991px) {
    .nav-cta { margin: .5rem 0 0; justify-content: center; }
    .site-nav .navbar-nav { gap: .15rem; padding-top: .5rem; }
}

/* ===================== Boutons ===================== */
.btn {
    border-radius: var(--r-pill);
    font-weight: 600;
    padding: .7rem 1.5rem;
    letter-spacing: -.01em;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.btn-lg { padding: .95rem 2rem; font-size: 1.05rem; }

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(29, 78, 216, .26);
}
.btn-primary:hover, .btn-primary:focus-visible {
    background: var(--primary-700);
    border-color: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(29, 78, 216, .32);
}
.btn-outline-primary {
    border: 1.5px solid var(--line);
    color: var(--primary);
    background: #fff;
}
.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}
/* Accent chaleureux */
.btn-ember {
    background: var(--ember);
    border: none;
    color: #fff;
    box-shadow: var(--shadow-ember);
}
.btn-ember:hover, .btn-ember:focus-visible {
    background: var(--ember-deep);
    color: #fff;
    transform: translateY(-2px);
}
.btn-ghost-light {
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, .5);
    background: rgba(255, 255, 255, .06);
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, .16); color: #fff; border-color: #fff; }

:focus-visible { outline: 3px solid rgba(59, 130, 246, .55); outline-offset: 2px; }

/* ===================== Hero ===================== */
.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 120px 0 130px;
    background:
        radial-gradient(1100px 520px at 78% -8%, rgba(249, 115, 22, .22), transparent 60%),
        radial-gradient(900px 600px at 10% 110%, rgba(59, 130, 246, .35), transparent 55%),
        linear-gradient(160deg, var(--primary-deep) 0%, #123 55%, #0a1730 100%);
}
.hero::after {
    /* trame de points discrète */
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .10) 1px, transparent 1.4px);
    background-size: 26px 26px;
    mask-image: radial-gradient(70% 70% at 50% 40%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 40%, transparent 100%);
    pointer-events: none;
}
.hero > .container { position: relative; z-index: 2; }

.hero-logo {
    height: 108px;
    background: rgba(255, 255, 255, .96);
    border-radius: var(--r-md);
    padding: 12px 18px;
    box-shadow: var(--shadow-lg);
}
.hero h1 {
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 4.1rem);
    line-height: 1.03;
    margin: 1.4rem 0 1.1rem;
}
.hero h1 .accent {
    background: linear-gradient(100deg, #fff 0%, #cfe0ff 55%, var(--ember) 130%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero .lead {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, .82);
    max-width: 620px;
    margin-inline: auto;
}
.hero-actions { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* Signature : ondes d'écoute */
.soundwave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 46px;
    margin: 2.2rem auto 0;
}
.soundwave span {
    width: 5px;
    height: 14px;
    border-radius: var(--r-pill);
    background: linear-gradient(180deg, #fff, #9dc0ff);
    opacity: .85;
    animation: listen 1.5s var(--ease) infinite;
}
.soundwave span:nth-child(1) { animation-delay: 0s; }
.soundwave span:nth-child(2) { animation-delay: .12s; }
.soundwave span:nth-child(3) { animation-delay: .24s; background: linear-gradient(180deg, #ffd9b8, var(--ember)); }
.soundwave span:nth-child(4) { animation-delay: .36s; }
.soundwave span:nth-child(5) { animation-delay: .48s; }
.soundwave span:nth-child(6) { animation-delay: .30s; background: linear-gradient(180deg, #ffd9b8, var(--ember)); }
.soundwave span:nth-child(7) { animation-delay: .18s; }
.soundwave span:nth-child(8) { animation-delay: .06s; }
@keyframes listen {
    0%, 100% { height: 12px; opacity: .55; }
    50% { height: 42px; opacity: 1; }
}

/* Valeurs sous le hero */
.value-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: center;
    margin-top: 2rem;
}
.value-pills span {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem 1rem;
    font-size: .92rem;
    font-weight: 500;
    color: #eaf1ff;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--r-pill);
    backdrop-filter: blur(6px);
}
.value-pills .material-icons-outlined { font-size: 18px; color: #ffd9b8; }

/* Slogan défilant */
.slogan-carousel {
    max-width: 620px;
    margin: 2rem auto 0;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 66px;
    backdrop-filter: blur(10px);
}
.slogan-carousel .material-icons-outlined { color: var(--ember); }
.slogan-text {
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 500;
    text-align: center;
    margin: 0;
    animation: fadeInOut 1s var(--ease);
}
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ===================== Cartes ===================== */
.feature-card {
    position: relative;
    background: var(--surface);
    border-radius: var(--r-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
    border: 1px solid var(--line);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.feature-card::before {
    content: "";
    position: absolute;
    left: 0; top: 22px; bottom: 22px;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(var(--primary), var(--sky));
    opacity: 0;
    transition: opacity .3s var(--ease);
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: #d7deec;
}
.feature-card:hover::before { opacity: 1; }
.feature-card h5 { font-weight: 600; margin-bottom: .5rem; color: var(--ink); }
.feature-card p { color: var(--muted); margin-bottom: 1rem; }

.feature-card .icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.feature-card .icon .material-icons-outlined { font-size: 28px; }

.icon-blue { background: #dbeafe; color: var(--primary); }
.icon-amber { background: #fef3c7; color: #d97706; }
.icon-green { background: #dcfce7; color: #16a34a; }
.icon-purple { background: #f3e8ff; color: #9333ea; }
.icon-red { background: #fee2e2; color: #dc2626; }
.icon-orange { background: #ffedd5; color: var(--ember-deep); }

.card-link { text-decoration: none; display: block; height: 100%; }
.card-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .95rem;
    color: var(--primary);
}
.card-cta .material-icons-outlined { font-size: 18px; transition: transform .25s var(--ease); }
.feature-card:hover .card-cta .material-icons-outlined { transform: translateX(4px); }

/* Bande de réassurance */
.reassure {
    background: linear-gradient(135deg, var(--primary-deep), var(--primary));
    color: #fff;
    border-radius: var(--r-lg);
    padding: 48px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.reassure::before {
    content: "";
    position: absolute;
    right: -40px; top: -40px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(249, 115, 22, .5), transparent 70%);
}
.reassure h3 { font-weight: 700; font-size: clamp(1.5rem, 3vw, 2rem); position: relative; }
.reassure p { color: rgba(255, 255, 255, .85); position: relative; margin: 0; }

/* ===================== Formulaire ===================== */
.form-container {
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--line);
    overflow: hidden;
}
.form-header {
    background:
        radial-gradient(600px 200px at 90% -40%, rgba(249, 115, 22, .3), transparent 60%),
        linear-gradient(135deg, var(--primary-deep), var(--primary));
    color: #fff;
    padding: 34px 36px;
}
.form-header h2 { font-weight: 700; margin: 0 0 .35rem; }
.form-body { padding: 34px 36px 40px; }

/* Stepper numéroté avec libellés */
.step-indicator {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 36px;
    position: relative;
    counter-reset: step;
}
.step-indicator::before {
    content: "";
    position: absolute;
    top: 17px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: var(--line);
    z-index: 0;
}
.step {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    text-align: center;
}
.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--line);
    color: var(--muted-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .95rem;
    transition: all .3s var(--ease);
}
.step-dot::before { content: counter(step); }
.step { counter-increment: step; }
.step-label {
    font-size: .78rem;
    font-weight: 500;
    color: var(--muted);
    max-width: 90px;
    line-height: 1.2;
}
.step-dot.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 6px rgba(29, 78, 216, .14);
}
.step-dot.completed {
    background: #eef4ff;
    border-color: var(--primary);
    color: var(--primary);
}
.step-dot.completed::before { content: "check"; font-family: 'Material Icons Outlined'; font-size: 20px; }
.step-dot.active + .step-label { color: var(--primary); font-weight: 600; }

.form-section { display: none; animation: sectionIn .45s var(--ease); }
.form-section.active { display: block; }
@keyframes sectionIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.form-section h4 { font-weight: 600; font-size: 1.3rem; }

.form-label { color: var(--ink-soft); font-size: .96rem; }
.req { color: #dc2626; font-weight: 700; margin-left: 2px; }
.form-legend { color: var(--muted); font-size: .88rem; }
.form-legend .req { font-size: 1rem; }
.form-control, .form-select {
    border-radius: var(--r-sm);
    border: 1.5px solid var(--line);
    padding: .7rem .9rem;
    font-family: var(--font-body);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, .12);
}
.form-text { color: var(--muted); }

/* Radio-cards */
.radio-group { display: flex; flex-wrap: wrap; gap: 12px; }
.radio-card { flex: 1; min-width: 130px; }
.radio-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.radio-card label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 14px 18px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all .2s var(--ease);
    font-weight: 500;
    font-size: .95rem;
    color: var(--ink-soft);
    height: 100%;
    background: #fff;
}
.radio-card label:hover { border-color: var(--sky); background: #f5f9ff; transform: translateY(-1px); }
.radio-card input[type="radio"]:checked + label {
    border-color: var(--primary);
    background: linear-gradient(135deg, #eef4ff, #f7faff);
    color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), 0 8px 18px rgba(29, 78, 216, .12);
}
.radio-card input[type="radio"]:focus-visible + label { outline: 3px solid rgba(59, 130, 246, .5); outline-offset: 2px; }

.alert { border-radius: var(--r-sm); border: none; }
.alert-info { background: #eaf2ff; color: var(--primary-700); }
.alert-danger { background: #fdecec; color: #b42318; }

/* ===================== Confirmation ===================== */
.confirmation-card {
    background: var(--surface);
    border-radius: var(--r-lg);
    padding: 56px 48px;
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid var(--line);
}
.confirmation-icon {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #dcfce7, #bbf7d0);
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 0 0 10px rgba(22, 163, 74, .10);
    animation: pop .5s var(--ease) both;
}
.confirmation-icon .material-icons-outlined { font-size: 48px; }
@keyframes pop {
    0% { transform: scale(.6); opacity: 0; }
    60% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}
.confirmation-card h2 { font-weight: 700; }
.numero-requete {
    background: linear-gradient(135deg, #eef4ff, #f7faff);
    border: 1px dashed var(--primary);
    border-radius: var(--r-md);
    padding: 16px 28px;
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 3px;
}

/* ===================== Textes officiels · détail ===================== */
.doc-header {
    background:
        radial-gradient(500px 180px at 90% -30%, rgba(249, 115, 22, .28), transparent 60%),
        linear-gradient(135deg, var(--primary-deep), var(--primary));
    color: #fff;
    border-radius: var(--r-lg);
    padding: 32px 36px;
    box-shadow: var(--shadow-lg);
}
.doc-back {
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .9rem;
    font-weight: 500;
}
.doc-back:hover { color: #fff; }
.doc-header h2 { font-weight: 700; margin: .4rem 0 0; }
.pdf-viewer-container {
    background: var(--surface);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--line);
    overflow: hidden;
}
.pdf-viewer { width: 100%; height: 80vh; border: none; display: block; }

/* ===================== Footer ===================== */
.site-footer {
    background: linear-gradient(180deg, #0c1830, var(--ink));
    color: #cdd6e6;
    padding: 64px 0 28px;
    margin-top: 90px;
}
.footer-logo { background: #fff; border-radius: 10px; padding: 5px 8px; }
.footer-title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: #fff; }
.footer-org { font-size: .88rem; color: var(--muted-2); }
.footer-note { color: #9fb0cc; max-width: 340px; margin: 0; }
.footer-heading {
    font-family: var(--font-display);
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
    font-size: .95rem;
    letter-spacing: .02em;
}
.footer-link {
    display: block;
    color: #a9b7d1;
    text-decoration: none;
    padding: .3rem 0;
    transition: color .2s var(--ease), transform .2s var(--ease);
}
.footer-link:hover { color: #fff; transform: translateX(3px); }
.footer-values { list-style: none; padding: 0; margin: 0; }
.footer-values li { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; color: #b8c4dc; }
.footer-values .material-icons-outlined { color: var(--ember); font-size: 20px; }
.footer-bottom {
    margin-top: 44px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .10);
    text-align: center;
    color: var(--muted-2);
    font-size: .85rem;
}

/* ===================== Révélation au scroll ===================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
[data-reveal][data-delay="4"] { transition-delay: .32s; }

/* ===================== Responsive ===================== */
@media (max-width: 768px) {
    .section { padding: 56px 0; }
    .hero { padding: 92px 0 96px; }
    .hero-logo { height: 84px; }
    .form-header, .form-body { padding: 24px; }
    .confirmation-card { padding: 40px 24px; }
    .reassure { padding: 32px 24px; }
    .step-label { display: none; }
    .radio-card { min-width: 110px; }
    .pdf-viewer { height: 62vh; }
}

/* ===================== Accessibilité ===================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .soundwave span { height: 26px; }
    [data-reveal] { opacity: 1; transform: none; }
}
