/* JM Electric 2026 — Composant : Pre-footer CTA V2
   Bandeau pleine largeur fond slate-900, layout 2 colonnes :
   [LEFT]  eyebrow + titre + desc + bloc téléphone urgence
   [RIGHT] formulaire en verre dépoli (CF7 ou HTML fallback)
*/

.pre-footer--v2 {
    position: relative;
    background: #0f172a;
    color: var(--white);
    overflow: hidden;

    /* Full-bleed : sort des contraintes du .main (max-width + padding latéral) */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);

    /* Collé au footer : annule le padding-bottom du .main */
    margin-bottom: -24px;
}
@media (min-width: 768px) {
    .pre-footer--v2 { margin-bottom: -32px; }
}
.pre-footer-bg-dots {
    position: absolute; inset: 0;
    pointer-events: none;
    opacity: .04;
    background-image: radial-gradient(var(--yellow) 1.5px, transparent 1.5px);
    background-size: 32px 32px;
}
.pre-footer-bg-glow {
    position: absolute;
    bottom: -8rem; right: -8rem;
    width: 28rem; height: 28rem;
    pointer-events: none;
    background: var(--yellow);
    border-radius: 50%;
    filter: blur(140px);
    opacity: .15;
}

.pre-footer-inner {
    position: relative;
    z-index: 1;
    max-width: 72rem;
    margin: 0 auto;
    padding: 64px 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}
@media (min-width: 768px) {
    .pre-footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 48px;
        padding: 80px 24px;
    }
}

/* ---- LEFT : intro ---- */
.pre-footer-eyebrow {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .3em;
    color: var(--yellow);
    margin-bottom: 16px;
}
.pre-footer-title {
    font-family: var(--font-display);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: .92;
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--white);
    margin-bottom: 12px;
}
.pre-footer-title .muted { color: rgba(255,255,255,.50); }
.pre-footer-desc {
    color: rgba(255,255,255,.55);
    font-size: 16px;
    line-height: 1.65;
    max-width: 28rem;
    margin-bottom: 24px;
}

.pre-footer-phone {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
}
.pre-footer-phone-icon {
    background: var(--yellow);
    color: var(--navy);
    padding: 10px;
    border-radius: 12px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pre-footer-phone-icon svg { width: 16px; height: 16px; }
.pre-footer-phone-text { display: flex; flex-direction: column; }
.pre-footer-phone-label {
    display: block;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: rgba(255,255,255,.45);
}
.pre-footer-phone-number {
    display: block;
    font-family: var(--font-display);
    font-weight: 900;
    font-style: italic;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
    color: var(--white);
    transition: color .25s;
}
.pre-footer-phone:hover .pre-footer-phone-number { color: var(--yellow); }

/* ---- RIGHT : formulaire ---- */
.pre-footer-form-wrap { width: 100%; }
.pre-footer-form {
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 24px;
    padding: 28px;
}
@media (min-width: 1024px) { .pre-footer-form { padding: 32px; } }

.pre-footer-form-eyebrow {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--yellow);
    margin-bottom: 8px;
}
.pre-footer-form-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.6rem;
    text-transform: uppercase;
    letter-spacing: .01em;
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 24px;
}

/* CF7 : espacement vertical régulier entre les champs (= gap-3 de la maquette).
   CF7 enveloppe chaque tag dans un <p> (wpautop) → on neutralise leurs marges
   et on pose un gap unique sur le <form>. */
.pre-footer-form--shortcode form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pre-footer-form--shortcode form > p { margin: 0; }

.pre-footer .form-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pre-footer .form-fields input,
.pre-footer .form-fields select,
.pre-footer-form--shortcode input[type="text"],
.pre-footer-form--shortcode input[type="email"],
.pre-footer-form--shortcode input[type="tel"],
.pre-footer-form--shortcode input[type="url"],
.pre-footer-form--shortcode input[type="number"],
.pre-footer-form--shortcode select,
.pre-footer-form--shortcode textarea {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15.5px;
    color: var(--white);
    transition: background .2s, border-color .2s;
    width: 100%;
    font-family: inherit;
}
.pre-footer .form-fields input::placeholder,
.pre-footer-form--shortcode input::placeholder,
.pre-footer-form--shortcode textarea::placeholder {
    color: rgba(255,255,255,.40);
}
.pre-footer .form-fields input:focus,
.pre-footer .form-fields select:focus,
.pre-footer-form--shortcode input:focus,
.pre-footer-form--shortcode select:focus,
.pre-footer-form--shortcode textarea:focus {
    outline: none;
    border-color: rgba(255,210,51,.60);
    background: rgba(255,255,255,.08);
}
.pre-footer .form-fields select option { color: var(--navy); }
.pre-footer .form-fields select:invalid { color: rgba(255,255,255,.40); }
.pre-footer .form-fields select.has-value { color: var(--white); }

.pre-footer .form-submit,
.pre-footer-form--shortcode input[type="submit"],
.pre-footer-form--shortcode button[type="submit"] {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--yellow);
    color: var(--navy);
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: 16px;
    border-radius: 12px;
    border: 0;
    cursor: pointer;
    transition: background .2s;
    width: 100%;
}
.pre-footer .form-submit:hover,
.pre-footer-form--shortcode input[type="submit"]:hover,
.pre-footer-form--shortcode button[type="submit"]:hover {
    background: var(--white);
}
.pre-footer .form-submit svg,
.pre-footer-form--shortcode button[type="submit"] svg { width: 14px; height: 14px; }

.pre-footer .form-fineprint {
    margin-top: 16px;
    font-size: 10px;
    color: rgba(255,255,255,.35);
    line-height: 1.6;
}

/* État succès (placeholder JS) */
.pre-footer .form-success {
    text-align: center;
    padding: 40px 8px;
}
.pre-footer .form-success-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.pre-footer .form-success-icon svg { width: 24px; height: 24px; }
.pre-footer .form-success h4 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .01em;
    margin-bottom: 8px;
    color: var(--white);
}
.pre-footer .form-success p {
    color: rgba(255,255,255,.65);
    font-size: 15.5px;
    line-height: 1.65;
}

/* CF7 / Gravity Forms : ajustement labels */
.pre-footer-form--shortcode label {
    color: rgba(255,255,255,.65);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .15em;
}
.pre-footer-form--shortcode .wpcf7-not-valid-tip {
    color: #fca5a5;
    font-size: 12px;
    margin-top: 4px;
}
.pre-footer-form--shortcode .wpcf7-response-output {
    border: 1px solid rgba(255,255,255,.20);
    background: rgba(255,255,255,.05);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--white);
    margin-top: 16px;
    font-size: 14px;
}

/* --- CF7 : checkboxes stylées en "pills" (form Particuliers : type de besoin multi-select) ---
   Pour utiliser, dans CF7, mettre une classe sur le wrapper (ex: [checkbox type-besoin class:jme-pills "Option1" "Option2"…])
   ou s'appliquer par défaut à .wpcf7-checkbox dans le pre-footer. */
.pre-footer-form--shortcode .wpcf7-checkbox,
.pre-footer-form--shortcode .jme-pills .wpcf7-checkbox {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.pre-footer-form--shortcode .wpcf7-checkbox .wpcf7-list-item,
.pre-footer-form--shortcode .jme-pills .wpcf7-list-item {
    margin: 0;
    display: inline-block;
}
.pre-footer-form--shortcode .wpcf7-checkbox .wpcf7-list-item label,
.pre-footer-form--shortcode .jme-pills .wpcf7-list-item label {
    display: inline-flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
    padding: 0;
    margin: 0;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255,255,255,.75);
}
/* Cache la checkbox native, on ne montre que le label stylé */
.pre-footer-form--shortcode .wpcf7-checkbox input[type="checkbox"],
.pre-footer-form--shortcode .jme-pills input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
    pointer-events: none;
}
.pre-footer-form--shortcode .wpcf7-checkbox .wpcf7-list-item-label,
.pre-footer-form--shortcode .jme-pills .wpcf7-list-item-label {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.15);
    transition: background .2s, border-color .2s, color .2s;
}
.pre-footer-form--shortcode .wpcf7-checkbox label:hover .wpcf7-list-item-label,
.pre-footer-form--shortcode .jme-pills label:hover .wpcf7-list-item-label {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.30);
}
.pre-footer-form--shortcode .wpcf7-checkbox input[type="checkbox"]:checked + .wpcf7-list-item-label,
.pre-footer-form--shortcode .jme-pills input[type="checkbox"]:checked + .wpcf7-list-item-label {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--navy);
}
/* Accessibilité : focus visible */
.pre-footer-form--shortcode .wpcf7-checkbox input[type="checkbox"]:focus-visible + .wpcf7-list-item-label,
.pre-footer-form--shortcode .jme-pills input[type="checkbox"]:focus-visible + .wpcf7-list-item-label {
    outline: 2px solid var(--yellow);
    outline-offset: 2px;
}

/* CF7 : champ acceptance (consentement RGPD) — retire le margin-left de 1em
   posé par défaut par la feuille de style de Contact Form 7 sur .wpcf7-list-item. */
.pre-footer-form--shortcode .wpcf7-acceptance .wpcf7-list-item {
    margin: 0;
}
/* Un peu d'air au-dessus et en dessous du champ acceptance (en plus du gap du form). */
.pre-footer-form--shortcode form > p:has(.wpcf7-acceptance) {
    margin: 8px 0;
}
/* Label = case + texte côte à côte ; le texte multi-lignes reste aligné
   à droite de la case (ne passe pas dessous). */
.pre-footer-form--shortcode .wpcf7-acceptance label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.pre-footer-form--shortcode .wpcf7-acceptance input[type="checkbox"] {
    flex-shrink: 0;
    margin: 2px 0 0;
}
/* Texte du consentement : petit, gris clair, normal (pas de gras / majuscules /
   letter-spacing hérités de la règle générale `label` du pre-footer). */
.pre-footer-form--shortcode .wpcf7-acceptance label,
.pre-footer-form--shortcode .wpcf7-acceptance .wpcf7-list-item-label {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.6;
    color: rgba(255,255,255,.72);
}

/* Textarea de description (CF7) — même style que les inputs */
.pre-footer-form--shortcode textarea {
    resize: none;
    min-height: 90px;
}

/* Message d'avertissement admin-only (pas de shortcode CF7 configuré) */
.pre-footer-admin-warning {
    background: rgba(255,210,51,.10);
    border: 1px dashed rgba(255,210,51,.40);
    border-radius: 16px;
    padding: 24px;
    color: rgba(255,255,255,.85);
    font-size: 14px;
    line-height: 1.5;
}
.pre-footer-admin-warning strong {
    display: block;
    color: var(--yellow);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .15em;
    margin-bottom: 10px;
}
.pre-footer-admin-warning p { margin: 0 0 6px; }
.pre-footer-admin-warning p:last-child { margin-bottom: 0; }
