/* ================================================================
   Page de contact oPaddock (/contact.php)
   Préfixe : ct-
   ----------------------------------------------------------------
   Complète style_legal.css (masthead + carte centrale, réutilisés
   tels quels). Reprend les tokens du design system (docs/DESIGN_SYSTEM.html) :
   rayons « plug », ombres douces, hauteurs tactiles >= 48px, focus
   var(--primary) + halo. Aucune couleur en dur (CLAUDE.md §1) : les
   variables de thème viennent de :root (style_header.css).
   ================================================================ */

/* Tokens locaux, préfixés ct- pour ne JAMAIS entrer en collision avec
   les variables de thème globales (pas de re-déclaration de --primary,
   qui créerait une référence circulaire — cf. CLAUDE.md §1). */
.ct-main {
    --ct-line: var(--slate-200);
    --ct-muted: var(--slate-500);
    --ct-text: var(--slate-800);
    --ct-r-sm: 14px;
    --ct-r-lg: 22px;
    --ct-dur: .22s;
    --ct-ease: cubic-bezier(.22, 1, .36, 1);
}

/* ── Bouton principal : ouvre la modale ── */
.ct-cta-wrap {
    display: flex;
    justify-content: center;
    margin: 28px 0 36px;
}
.ct-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 52px;
    padding: .85rem 1.9rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 26px -8px rgba(var(--primary-rgb), .5);
    transition: transform var(--ct-dur) var(--ct-ease),
                box-shadow var(--ct-dur) var(--ct-ease),
                filter var(--ct-dur) var(--ct-ease);
}
.ct-cta i { font-size: 1.15rem; }
.ct-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px -10px rgba(var(--primary-rgb), .58);
    filter: brightness(1.04);
}
.ct-cta:active { transform: translateY(0); }
.ct-cta:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .28), 0 10px 26px -8px rgba(var(--primary-rgb), .5);
}

/* ── Cartes d'information (email, délai, aide) ── */
.ct-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
    gap: 16px;
    margin: 0 0 8px;
}
.ct-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--ct-line);
    border-radius: var(--ct-r-lg);
    box-shadow: 0 4px 14px -6px rgba(16, 24, 40, .12);
    transition: transform var(--ct-dur) var(--ct-ease),
                box-shadow var(--ct-dur) var(--ct-ease),
                border-color var(--ct-dur) var(--ct-ease);
}
.ct-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-300);
    box-shadow: 0 14px 36px -16px rgba(16, 24, 40, .2);
}
/* Badge d'icône en dégradé du thème (pattern « badge d'icône » du design system) */
.ct-card-ic {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.15rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 6px 16px -6px rgba(var(--primary-rgb), .55);
}
.ct-card-body { min-width: 0; }
.ct-card-title {
    margin: 0 0 4px;
    font-size: .95rem;
    font-weight: 700;
    color: var(--ct-text);
}
.ct-card-title a { color: inherit; text-decoration: none; }
.ct-card-title a:hover { color: var(--primary-dark); }
.ct-card-text {
    margin: 0;
    font-size: .88rem;
    line-height: 1.5;
    color: var(--ct-muted);
    overflow-wrap: anywhere;
}
.ct-card-text a {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
}
.ct-card-text a:hover { text-decoration: underline; }

/* ── Modale : formulaire ── */
.ct-modal-sub {
    margin: 0 0 20px;
    font-size: .9rem;
    line-height: 1.55;
    color: var(--slate-500);
}
.ct-form { display: block; }
.ct-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 560px) {
    .ct-grid-2 { grid-template-columns: 1fr; }
}
.ct-field { margin-bottom: 16px; min-width: 0; }
.ct-label {
    display: block;
    margin-bottom: 7px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--slate-700);
}

/* Champs : hauteur tactile >= 48px, bordure 1.5px, focus thème + halo (design system) */
.ct-f {
    width: 100%;
    min-height: 48px;
    padding: .6rem .95rem;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--ct-r-sm, 14px);
    background: #fff;
    color: var(--slate-800);
    font-family: inherit;
    font-size: .92rem;
    font-weight: 500;
    line-height: 1.4;
    outline: none;
    transition: border-color .22s cubic-bezier(.22, 1, .36, 1),
                box-shadow .22s cubic-bezier(.22, 1, .36, 1);
}
.ct-f::placeholder { color: var(--slate-400); font-weight: 400; }
.ct-f:hover { border-color: var(--primary-300); }
.ct-f:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .13);
}
.ct-textarea {
    min-height: 128px;
    padding: .75rem .95rem;
    resize: vertical;
    line-height: 1.55;
}

/* État d'erreur : bordure + halo rouge, message sous le champ */
.ct-f.is-err {
    border-color: var(--red-500);
    /* color-mix plutôt qu'un rgba() en dur : le halo suit la variable de thème
       (--red-500 n'a pas de triplet RGB dédié) — cf. CLAUDE.md §1. */
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--red-500) 14%, transparent);
}
.ct-err {
    display: none;
    margin: 6px 0 0;
    font-size: .78rem;
    font-weight: 500;
    color: var(--red-500);
}
.ct-err.is-on { display: block; }

/* Bouton d'envoi : état « chargement » pendant la requête */
#ctSendBtn.is-loading {
    opacity: .72;
    cursor: progress;
    pointer-events: none;
}

/* ── Honeypot anti-bot ──
   Masqué SANS display:none ni visibility:hidden : certains bots ignorent les
   champs ainsi cachés. On le sort du viewport tout en le laissant « réel ». */
.ct-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ── Accessibilité : mouvement réduit ── */
@media (prefers-reduced-motion: reduce) {
    .ct-cta,
    .ct-card,
    .ct-f {
        transition: none;
    }
    .ct-cta:hover,
    .ct-card:hover { transform: none; }
}
