/*
 * L'identité du front public (A-45) : l'accueil (layout/front.html.twig) et, par wizard.css, les formulaires de demande.
 * Cinq couleurs — Encre, Papier, Brume, Mousse, Surligneur — et deux polices servies par le site (OFL) : Bricolage
 * Grotesque pour les titres et les besoins, Atkinson Hyperlegible Next pour le texte. Le Surligneur montre ce qu'on
 * pointe ou ce qu'on a choisi, et sert d'accent sur fond sombre (sur-titre, fin du titre, chiffres, boutons) : jamais
 * de texte jaune sur blanc. Les couleurs sont posées sur :root : le back-office et la connexion les reprennent (app.css,
 * auth.css — retour de recette R3 de MP-28).
 */
@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../../fonts/bricolage-grotesque/bricolage-grotesque-latin-opsz-normal-OCLNvLs.woff2") format('woff2');
}

@font-face {
    font-family: 'Atkinson Hyperlegible Next';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../../fonts/atkinson-hyperlegible-next/atkinson-hyperlegible-next-latin-400-normal-lEu3FxX.woff2") format('woff2');
}

@font-face {
    font-family: 'Atkinson Hyperlegible Next';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../../fonts/atkinson-hyperlegible-next/atkinson-hyperlegible-next-latin-700-normal-Tax5xkS.woff2") format('woff2');
}

:root {
    --front-ink: #12382b;
    --front-paper: #ffffff;
    --front-mist: #e8eee9;
    --front-moss: #4f6158;
    --front-marker: #ffe45c;
    --front-ink-deep: color-mix(in srgb, var(--front-ink) 80%, #000000);
    --front-on-ink: color-mix(in srgb, var(--front-paper) 78%, var(--front-ink));
    --front-font-display: 'Bricolage Grotesque', 'Atkinson Hyperlegible Next', sans-serif;
    --front-font-text: 'Atkinson Hyperlegible Next', Verdana, sans-serif;
}

/* Les variables de Bootstrap et de Metronic, le temps de ces pages (la primaire et les liens, pour tout le site : app.css) */
.front-page {
    --bs-body-color: var(--front-ink);
    --bs-body-bg: var(--front-paper);
    --bs-body-font-family: var(--front-font-text);
    --bs-app-bg-color: var(--front-paper);
    font-family: var(--front-font-text);
    line-height: 1.6;
    color: var(--front-ink);
}

/* Metronic fixe la taille du texte en !important (13 px, 12 px sous 992 px) : seul un !important plus précis la remonte */
html:has(> body.front-page) {
    font-size: 16px !important;
    scroll-behavior: smooth;
}

body.front-page {
    font-size: 1.125rem !important;
}

@media (prefers-reduced-motion: reduce) {
    html:has(> body.front-page) {
        scroll-behavior: auto;
    }
}

.front-page :focus-visible {
    outline: 3px solid var(--front-ink);
    outline-offset: 3px;
}

/* Une marge latérale qui suit l'écran, plus large que la demi-gouttière des rangées (sinon elles débordent) */
.front-page .container-xxl {
    padding-right: clamp(1.25rem, 4vw, 2.5rem);
    padding-left: clamp(1.25rem, 4vw, 2.5rem);
}

/* Les boutons et les liens du front */
.front-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.625rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.front-btn-outline {
    border-color: var(--front-ink);
    color: var(--front-ink);
}

.front-btn-outline:hover,
.front-btn-outline:focus-visible {
    background-color: var(--front-ink);
    color: var(--front-paper);
}

.front-btn-marker {
    background-color: var(--front-marker);
    color: var(--front-ink);
}

.front-btn-marker:hover,
.front-btn-marker:focus-visible {
    background-color: var(--front-paper);
    color: var(--front-ink);
}

/* Metronic retire tout soulignement au survol, en !important : le trait est dessiné en fond */
.front-link {
    padding-bottom: 2px;
    background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
    color: var(--front-ink);
    font-weight: 700;
}

.front-link:hover {
    color: var(--front-ink);
    background-size: 100% 4px;
}

/* Le haut de page sombre — en-tête et bandeau d'accueil —, sur le modèle de celui de 3juillet (retour de recette R1) :
   l'Encre assombrie, une lueur de Surligneur dans le coin, un grand « ? » en filigrane */
/* Metronic fait du body une colonne flexible de la hauteur de l'écran : sans flex-shrink à 0, un bloc qui coupe ce qui
   déborde (overflow: hidden) s'y laisse écraser */
.front-top {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--front-marker) 13%, transparent), transparent 40%),
        var(--front-ink-deep);
    color: var(--front-paper);
}

.front-top :focus-visible {
    outline-color: var(--front-marker);
}

.front-header {
    position: relative;
    z-index: 2;
    padding: 1.25rem 0;
}

.front-logo {
    color: var(--front-ink);
    font-family: var(--front-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.front-logo:hover {
    color: var(--front-ink);
}

/* Le « .com » du nom, au Surligneur : le logo du front est toujours sur fond sombre (bandeau, pied, panneau du formulaire) */
.front-logo-tld {
    color: var(--front-marker);
}

.front-top .front-logo,
.front-top .front-logo:hover,
.front-top .front-link,
.front-top .front-link:hover {
    color: var(--front-paper);
}

.front-nav {
    gap: 2rem;
}

.front-nav a {
    color: var(--front-on-ink);
    font-weight: 700;
}

.front-nav a:hover {
    color: var(--front-marker);
}

.front-hero {
    position: relative;
    z-index: 1;
    padding: 2.5rem 0 4rem;
}

.front-hero-glyph {
    position: absolute;
    top: 50%;
    right: -0.04em;
    color: color-mix(in srgb, var(--front-paper) 5%, transparent);
    font-family: var(--front-font-display);
    font-size: clamp(22rem, 42vw, 48rem);
    font-weight: 800;
    line-height: 0.8;
    pointer-events: none;
    user-select: none;
    transform: translateY(-50%);
}

.front-eyebrow {
    margin: 0 0 1rem;
    color: var(--front-marker);
    font-weight: 700;
}

.front-hero-title {
    max-width: 15em;
    margin: 0 0 1.5rem;
    color: var(--front-paper);
    font-family: var(--front-font-display);
    font-size: clamp(2.25rem, 1.3rem + 3.6vw, 4rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.front-accent {
    color: var(--front-marker);
}

.front-hero-lead {
    max-width: 36em;
    margin: 0 0 2rem;
    color: var(--front-on-ink);
    font-size: 1.125rem;
}

.front-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.front-btn-lg {
    min-height: 3.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1.0625rem;
}

.front-btn-ghost {
    border-color: color-mix(in srgb, var(--front-paper) 55%, transparent);
    color: var(--front-paper);
}

.front-btn-ghost:hover,
.front-btn-ghost:focus-visible {
    border-color: var(--front-paper);
    background-color: color-mix(in srgb, var(--front-paper) 10%, transparent);
    color: var(--front-paper);
}

/* Des chiffres vrais seulement : le nombre de besoins proposés vient de la base */
.front-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 3rem;
    margin: 3rem 0 0;
}

.front-stat dt {
    color: var(--front-marker);
    font-family: var(--front-font-display);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.front-stat dd {
    margin: 0.25rem 0 0;
    color: var(--front-on-ink);
    font-size: 0.9375rem;
}

.front-flashes {
    padding-top: 1rem;
}

.front-flashes .alert:last-child {
    margin-bottom: 0 !important;
}

/* Les besoins, en cartes : une par secteur actif */
.front-section-lead {
    max-width: 40em;
    margin: -1.5rem 0 2.5rem;
    color: var(--front-moss);
}

.front-needs {
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    list-style: none;
}

.front-need-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.75rem;
    border: 1px solid var(--front-mist);
    border-radius: 1rem;
    background-color: var(--front-paper);
    color: var(--front-ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.front-need-link:hover,
.front-need-link:focus-visible {
    border-color: var(--front-ink);
    box-shadow: 0 1rem 2rem color-mix(in srgb, var(--front-ink) 12%, transparent);
    color: var(--front-ink);
    transform: translateY(-3px);
}

.front-need-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1.25rem;
    border-radius: 0.875rem;
    background-color: var(--front-mist);
    color: var(--front-ink);
    transition: background-color 0.2s ease;
}

/* keenicons prend la couleur atténuée de Metronic : l'icône suit l'Encre */
.front-need-icon .ki-duotone {
    color: var(--front-ink);
}

.front-need-name {
    align-self: flex-start;
    margin-bottom: 0.5rem;
    background-image: linear-gradient(var(--front-marker), var(--front-marker));
    background-repeat: no-repeat;
    background-position: 0 88%;
    background-size: 0 0.4em;
    font-family: var(--front-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    transition: background-size 0.25s ease-out;
}

/* Le Surligneur passe sur le besoin qu'on pointe, à la souris, au doigt ou au clavier (RM-36) */
.front-need-link:hover .front-need-icon,
.front-need-link:focus-visible .front-need-icon {
    background-color: var(--front-marker);
}

.front-need-link:hover .front-need-name,
.front-need-link:focus-visible .front-need-name,
.front-need-link:active .front-need-name {
    background-size: 100% 0.4em;
}

.front-need-text {
    flex-grow: 1;
    margin-bottom: 1.25rem;
    color: var(--front-moss);
    font-size: 1rem;
    line-height: 1.5;
}

.front-need-cta {
    align-self: flex-start;
    padding-bottom: 2px;
    background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
    .front-need-link,
    .front-need-name {
        transition: none;
    }

    .front-need-link:hover,
    .front-need-link:focus-visible {
        transform: none;
    }
}

/* Les bandes de la page */
.front-band {
    padding: 4rem 0;
}

.front-band-mist {
    background-color: var(--front-mist);
}

.front-band-ink {
    background-color: var(--front-ink);
    color: var(--front-paper);
}

.front-band-ink :focus-visible {
    outline-color: var(--front-marker);
}

.front-h2 {
    max-width: 22em;
    margin: 0 0 2.5rem;
    color: var(--front-ink);
    font-family: var(--front-font-display);
    font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.25rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

/* Les étapes d'une demande : une ligne verticale sur téléphone, horizontale sur grand écran */
.front-steps {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.front-step {
    position: relative;
    padding: 0 0 2rem 2.5rem;
}

.front-step::before {
    position: absolute;
    top: 0.5rem;
    bottom: -0.5rem;
    left: 0.4375rem;
    border-left: 2px solid var(--front-ink);
    content: "";
}

.front-step::after {
    position: absolute;
    top: 0.375rem;
    left: 0;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: var(--front-ink);
    content: "";
}

.front-step:last-child::before {
    content: none;
}

.front-step-title {
    margin: 0 0 0.375rem;
    color: var(--front-ink);
    font-family: var(--front-font-display);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.front-step-text {
    max-width: 22em;
    margin: 0;
    color: var(--front-moss);
    font-size: 1rem;
    line-height: 1.5;
}

.front-after-account {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 0.5rem;
}

.front-after-account p {
    margin: 0;
}

/* Les questions fréquentes : la marque + / − dit seulement si la réponse est ouverte */
.front-faq {
    border-top: 2px solid var(--front-mist);
}

.front-faq:last-child {
    border-bottom: 2px solid var(--front-mist);
}

.front-faq summary {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.5rem;
    padding: 1.25rem 0;
    color: var(--front-ink);
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.front-faq summary::-webkit-details-marker {
    display: none;
}

.front-faq summary::after {
    flex-shrink: 0;
    font-family: var(--front-font-display);
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1;
    content: "+";
}

.front-faq[open] summary::after {
    content: "−";
}

.front-faq p {
    max-width: 36em;
    margin: 0;
    padding: 0 0 1.5rem;
    color: var(--front-moss);
}

/* Le bandeau des professionnels */
.front-pro-title {
    max-width: 18em;
    margin: 0 0 1rem;
    color: var(--front-paper);
    font-family: var(--front-font-display);
    font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.front-pro-text {
    max-width: 34em;
    margin: 0 0 2rem;
    color: var(--front-on-ink);
}

.front-pro-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 2rem;
}

.front-band-ink .front-link,
.front-band-ink .front-link:hover {
    color: var(--front-paper);
}

/* Le pied, dans la continuité du bandeau */
.front-footer {
    padding: 3rem 0 1.5rem;
    border-top: 1px solid color-mix(in srgb, var(--front-paper) 15%, var(--front-ink));
    background-color: var(--front-ink);
    color: var(--front-on-ink);
    font-size: 1rem;
}

.front-footer :focus-visible {
    outline-color: var(--front-marker);
}

.front-footer .front-logo,
.front-footer .front-logo:hover {
    color: var(--front-paper);
}

.front-footer-text {
    max-width: 24em;
    margin: 0.75rem 0 0;
}

.front-footer-title {
    margin: 0 0 0.75rem;
    color: var(--front-paper);
    font-weight: 700;
}

.front-footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.front-footer-links li + li {
    margin-top: 0.5rem;
}

.front-footer-links a {
    color: var(--front-on-ink);
}

.front-footer-links a:hover {
    color: var(--front-paper);
}

.front-footer-bottom {
    margin: 2.5rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid color-mix(in srgb, var(--front-paper) 15%, var(--front-ink));
    font-size: 0.9375rem;
}

@media (min-width: 992px) {
    .front-header {
        padding: 1.75rem 0;
    }

    .front-hero {
        padding: 4.5rem 0 6rem;
    }

    .front-band {
        padding: 6rem 0;
    }

    /* Les étapes passent à l'horizontale : une seule ligne, lue de gauche à droite */
    .front-steps {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        column-gap: 0;
        margin-bottom: 2.5rem;
    }

    .front-step {
        padding: 2.5rem 2rem 0 0;
    }

    .front-step::before {
        top: 0.4375rem;
        right: 0;
        bottom: auto;
        left: 0;
        border-top: 2px solid var(--front-ink);
        border-left: 0;
    }

    .front-step::after {
        top: 0;
    }
}
