/* ============================================================
   APPELS À L'ACTION — PAGES DE VENTE
   ------------------------------------------------------------
   Feuille partagée, sur le modèle de process.css : un seul
   endroit à modifier pour toutes les pages de vente.

   Pages de vente « solutions » (pages-vente/) :
     forage.html · piscine.html · eaux-usees.html
   Pages de vente « produits » (racine) :
     generateur-chlore-small.html
     generateur-chlore-medium-skid.html
     unite-conteneurisee-kt-as.html
     kdf-process-media.html

   Quatre points de conversion, du plus doux au plus direct :
     1. hero        — bouton renforcé + ligne de réassurance
     2. .cta-band   — bandeau sombre, posé juste après le
                      comparatif, quand le problème vient
                      d'être énoncé
     3. .cta-rail   — relance claire après le déroulé du
                      processus, sur fond clair
     4. .svc-cta    — bandeau final enrichi (badge, preuves,
                      contact secondaire)

   Tous les boutons gardent la classe .btn et l'URL
   ?objet=devis : tracker.js les compte automatiquement comme
   des clics CTA, et main.js préremplit le formulaire.
   ============================================================ */

/* ------------------------------------------------------------
   BOUTON D'ACTION RENFORCÉ
   Le .btn du site est calibré pour la navigation ; sur une page
   de vente, l'action principale doit peser visuellement plus
   lourd que tout ce qui l'entoure.
   ------------------------------------------------------------ */

.btn-cta {
    padding: 1.05rem 2.3rem;
    font-size: var(--text-base);
    letter-spacing: 0.02em;
}

.btn-cta .btn-arrow {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    transition: transform 250ms var(--ease-smooth);
}

.btn-cta:hover .btn-arrow,
.btn-cta:focus-visible .btn-arrow {
    transform: translateX(4px);
}

/* ------------------------------------------------------------
   SIGNAL D'ACTION — HALO + REFLET
   ------------------------------------------------------------
   « Clignoter » sans clignoter : deux gestes lents, jamais une
   coupure d'opacité. Le halo respire en continu (3,6 s) et un
   reflet traverse le bouton une fois toutes les 7 s.

   Les quatre points de conversion sont déphasés (--cta-phase) :
   c'est le battement synchrone de toute une page qui fait
   « bannière publicitaire », pas le mouvement lui-même.

   Tout s'arrête au survol et au focus — l'utilisateur a vu le
   bouton, l'animation n'a plus rien à dire — et le halo cède la
   place à l'ombre de survol de .btn-primary.
   ------------------------------------------------------------ */

.btn-primary.btn-cta {
    position: relative;
    overflow: hidden;
    /* Contient le z-index négatif du reflet : sans ça, il passerait
       derrière le fond de la section. */
    isolation: isolate;
    animation: cta-pulse 3.6s var(--ease-soft) var(--cta-phase, 0s) infinite;
}

/* Le reflet est en z-index -1 : au-dessus du dégradé du bouton,
   sous le libellé, qui reste donc parfaitement lisible. */
.btn-primary.btn-cta::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: -55%;
    bottom: -55%;
    left: -40%;
    width: 34%;
    background: linear-gradient(
        100deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.45) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
    animation: cta-sheen 7s var(--ease-soft) var(--cta-phase, 0s) infinite;
}

@keyframes cta-pulse {
    0%, 100% { box-shadow: 0 4px 22px rgba(45, 180, 237, 0.28); }
    50%      { box-shadow: 0 6px 32px rgba(45, 180, 237, 0.62); }
}

/* Le reflet ne traverse que sur le premier quart du cycle : le
   reste du temps il attend hors champ, invisible. */
@keyframes cta-sheen {
    0%        { transform: translateX(0) skewX(-18deg); opacity: 0; }
    4%        { opacity: 1; }
    22%       { opacity: 1; }
    26%, 100% { transform: translateX(420%) skewX(-18deg); opacity: 0; }
}

/* Le téléphone est une action de second rang : il respire par sa
   bordure, sans halo ni reflet, pour ne pas concurrencer le devis. */
.btn-outline.btn-cta {
    animation: cta-outline-pulse 3.6s var(--ease-soft) var(--cta-phase, 0s) infinite;
}

@keyframes cta-outline-pulse {
    0%, 100% { border-color: rgba(255, 255, 255, 0.65); }
    50%      { border-color: rgba(99, 206, 245, 0.95); }
}

/* Déphasage par point de conversion. Deux boutons ne sont presque
   jamais visibles ensemble, sauf dans le bandeau final : le
   téléphone y respire 1,2 s après le devis, jamais avec lui. */
.prd-hero-cta   .btn-cta { --cta-phase: 0s; }
.cta-band-actions .btn-cta { --cta-phase: -1.2s; }
.cta-rail-inner   .btn-cta { --cta-phase: -2.4s; }
.svc-cta-buttons .btn-primary.btn-cta { --cta-phase: -0.6s; }
.svc-cta-buttons .btn-outline.btn-cta { --cta-phase: -1.8s; }

/* Au survol / focus, l'animation disparaît complètement pour que
   les règles de survol du bouton reprennent la main. */
.btn-cta:hover,
.btn-cta:focus-visible {
    animation: none;
}

.btn-primary.btn-cta:hover::after,
.btn-primary.btn-cta:focus-visible::after {
    animation: none;
    opacity: 0;
}

/* Barre flottante mobile : elle est à l'écran en permanence, donc
   halo plus lent et plus discret que sur les boutons de section,
   et pas de reflet. Un rythme rapide ici serait vite pénible. */
.mobile-floating-cta__primary {
    animation: cta-pulse-soft 4.6s var(--ease-soft) infinite;
}

@keyframes cta-pulse-soft {
    0%, 100% { box-shadow: 0 0 0 0 rgba(45, 180, 237, 0); }
    50%      { box-shadow: 0 0 0 4px rgba(45, 180, 237, 0.30); }
}

.mobile-floating-cta__primary:active { animation: none; }

/* `.is-pulsing` reste sur le bouton du hero de toutes les pages de
   vente : la règle est désormais portée par .btn-primary.btn-cta, la
   classe n'a plus d'effet propre mais ne gêne pas. */

/* ------------------------------------------------------------
   LIGNE DE RÉASSURANCE SOUS LES BOUTONS DU HERO
   ------------------------------------------------------------ */

.prd-hero-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .5rem 1.1rem;
    margin: var(--space-4) 0 0;
    padding: 0;
    list-style: none;
    color: rgba(255, 255, 255, 0.92);
    font-family: var(--font-heading);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-shadow: 0 1px 8px rgba(13, 24, 57, 0.5);
}

.prd-hero-trust li {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.prd-hero-trust li::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--sky);
    flex: 0 0 5px;
}

/* ------------------------------------------------------------
   BANDEAU D'INTERPELLATION (.cta-band)
   Placé après le comparatif problème / solution : le lecteur
   vient de voir ce qu'il risque, c'est le moment où l'action
   coûte le moins à décider.
   ------------------------------------------------------------ */

.cta-band {
    position: relative;
    padding: clamp(2.4rem, 5vw, 3.5rem) var(--space-4);
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 48%, var(--navy-mid) 100%);
    border-top: 3px solid var(--sky);
    color: var(--white);
    overflow: hidden;
}

.cta-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 88% 15%, rgba(45, 180, 237, 0.30) 0%, transparent 52%),
        radial-gradient(circle at 5% 100%, rgba(99, 206, 245, 0.16) 0%, transparent 45%);
    pointer-events: none;
}

.cta-band-inner {
    position: relative;
    z-index: 1;
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    /* La colonne d'action est plafonnée : laissée en `auto`, elle
       s'étirait à la largeur de la note et diluait le bouton. */
    grid-template-columns: minmax(0, 1fr) minmax(260px, 365px);
    gap: clamp(1.6rem, 4vw, 3.2rem);
    align-items: center;
}

/* Accroche d'urgence — le point clignotant fait le travail que
   ferait un compte à rebours, sans promettre de délai faux. */
.cta-band-kicker {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(45, 180, 237, 0.16);
    border: 1px solid rgba(99, 206, 245, 0.45);
    color: var(--accent-light);
    padding: .4rem 1rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: var(--space-2);
}

.cta-band-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sky-light);
    box-shadow: 0 0 0 0 rgba(99, 206, 245, 0.75);
    animation: cta-dot 2.4s var(--ease-out) infinite;
}

@keyframes cta-dot {
    0%   { box-shadow: 0 0 0 0 rgba(99, 206, 245, 0.70); }
    70%  { box-shadow: 0 0 0 9px rgba(99, 206, 245, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 206, 245, 0); }
}

.cta-band h2 {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: clamp(1.45rem, 3.1vw, 2.15rem);
    font-weight: 800;
    line-height: var(--leading-tight);
    margin: 0 0 var(--space-2);
}

.cta-band h2 em {
    font-style: normal;
    color: var(--sky-light);
}

.cta-band p {
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--text-lg);
    line-height: var(--leading-normal);
    margin: 0;
    max-width: 60ch;
}

.cta-band-trust {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.4rem;
    margin: var(--space-3) 0 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-heading);
    font-size: .8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.cta-band-trust li {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.cta-band-trust svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    color: var(--sky-light);
}

.cta-band-actions {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.cta-band-actions .btn {
    width: 100%;
}

/* Le téléphone reste une action de second rang : visible pour
   qui veut parler tout de suite, sans concurrencer le devis. */
.cta-band-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    color: rgba(255, 255, 255, 0.94);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: .02em;
    text-decoration: none;
    padding: .35rem;
    border-radius: var(--radius-md);
    transition: color 200ms var(--ease-smooth);
}

.cta-band-phone svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: var(--sky-light);
}

.cta-band-phone:hover { color: var(--sky-light); }

.cta-band-note {
    margin: 0;
    text-align: center;
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.62);
}

/* ------------------------------------------------------------
   RELANCE APRÈS LE PROCESSUS (.cta-rail)
   Le lecteur sait maintenant comment ça se passe : on lui donne
   la première étape à faire, une seule, gratuite.
   ------------------------------------------------------------ */

.cta-rail {
    background: var(--sky-pale);
    padding: var(--space-8) var(--space-4);
}

.cta-rail-inner {
    max-width: 1040px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-left: 5px solid var(--sky);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    box-shadow: var(--shadow-md);
}

.cta-rail-icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--navy) 0%, var(--navy-mid) 100%);
    color: var(--sky-light);
}

.cta-rail-icon svg { width: 24px; height: 24px; }

.cta-rail-body { flex: 1 1 auto; min-width: 0; }

.cta-rail-body h3 {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--navy);
    line-height: var(--leading-tight);
    margin: 0 0 .35rem;
}

.cta-rail-body p {
    margin: 0;
    color: var(--gray-700);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

.cta-rail-inner .btn { flex: 0 0 auto; }

/* ------------------------------------------------------------
   BANDEAU FINAL (.svc-cta enrichi)
   ------------------------------------------------------------ */

.svc-cta-kicker {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--white);
    padding: .4rem 1.05rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: var(--space-2);
}

.svc-cta-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sky-light);
    flex: 0 0 7px;
}

.svc-cta-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .55rem 1.5rem;
    margin: var(--space-4) 0 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-heading);
    font-size: .82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.svc-cta-trust li {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.svc-cta-trust svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    color: var(--sky-light);
}

/* Porte de sortie pour qui ne veut ni formulaire ni téléphone. */
.svc-cta-alt {
    margin: var(--space-3) 0 0;
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.72);
}

.svc-cta-alt a {
    color: var(--white);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.svc-cta-alt a:hover { color: var(--sky-light); }

/* ------------------------------------------------------------
   ACCROCHE DU HERO (.prd-hero-claim)
   Ligne d'affirmation glissée entre le titre et le sous-titre :
   le titre pose la douleur, l'accroche nomme la solution, le
   sous-titre l'explique.
   ------------------------------------------------------------ */

.prd-hero-claim {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto var(--space-2);
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2.4vw, 1.5rem);
    font-weight: 800;
    line-height: var(--leading-tight);
    color: var(--white);
    text-shadow: 0 2px 12px rgba(13, 24, 57, 0.45);
}

/* Même convention que .cta-band h2 : l'`em` porte le mot clé. */
.prd-hero-claim em {
    font-style: normal;
    color: var(--sky-light);
}

/* ------------------------------------------------------------
   AJUSTEMENTS DE PRÉSENTATION — PAGES DE VENTE
   ------------------------------------------------------------
   `.svc-card-icon` sert aussi sur 23 pages de services : la règle
   est posée ici, dans la feuille chargée par les seules pages de
   vente, pour ne pas recadrer les icônes de tout le site.
   ------------------------------------------------------------ */

.svc-cards .svc-card-icon {
    margin-left: auto;
    margin-right: auto;
}

/* Même raison pour la note sous les tableaux : centrée, elle se
   rattache visuellement au tableau au lieu de flotter au bord de
   la section. Les pages de services, qui ne chargent pas cette
   feuille, gardent leur alignement d'origine. */
.svc-table-note {
    text-align: center;
}

/* ------------------------------------------------------------
   ACCESSIBILITÉ
   ------------------------------------------------------------ */

.cta-band a:focus-visible,
.cta-rail a:focus-visible,
.svc-cta a:focus-visible {
    outline: 3px solid var(--sky-light);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .btn-primary.btn-cta,
    .btn-outline.btn-cta,
    .mobile-floating-cta__primary,
    .cta-band-kicker::before {
        animation: none;
    }
    /* Le reflet est masqué, pas seulement figé : arrêté en pleine
       course il resterait comme une bande claire sur le bouton. */
    .btn-primary.btn-cta::after {
        animation: none;
        opacity: 0;
    }
    .btn-outline.btn-cta { border-color: rgba(255, 255, 255, 0.65); }
    .btn-cta .btn-arrow { transition: none; }
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */

@media (max-width: 900px) {
    .cta-band-inner { grid-template-columns: 1fr; }
    .cta-band-actions { max-width: 420px; }
    .cta-band-note { text-align: left; }

    .cta-rail-inner {
        flex-wrap: wrap;
        row-gap: var(--space-3);
    }
    .cta-rail-body { flex: 1 1 100%; order: 2; }
    .cta-rail-icon { order: 1; }
    .cta-rail-inner .btn { order: 3; width: 100%; }
}

@media (max-width: 600px) {
    .cta-band { padding: var(--space-8) var(--space-3); }
    .cta-band p { font-size: var(--text-base); }
    .cta-band-actions { max-width: none; }
    .cta-rail { padding: var(--space-6) var(--space-3); }
    .cta-rail-inner { padding: var(--space-4); }
    .btn-cta { width: 100%; }
}
