/* =============================================================
   HABITATCENTER — Formulaire de contact (layout 2 colonnes)
   Charte graphique : vert #81D742 | bleu #06669C | dark #303745
   Fonts : Poppins (titres) · Lato (corps)
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Lato:wght@400;700&display=swap');

/* ── Variables ─────────────────────────────── */
.hc-form-wrapper {
    --hc-green:       #81D742;
    --hc-green-dark:  #6abf34;
    --hc-blue:        #06669C;
    --hc-blue-dark:   #054f7a;
    --hc-dark:        #303745;
    --hc-gray:        #6b7280;
    --hc-light:       #f8fafc;
    --hc-border:      #e5e7eb;
    --hc-red:         #ef4444;
    --hc-radius:      16px;
    --hc-radius-sm:   8px;
    --hc-shadow:      0 8px 40px rgba(6, 102, 156, 0.14);
    --hc-transition:  .22s ease;
    font-family: 'Lato', sans-serif;
}

/* ── Wrapper principal : 2 colonnes ────────── */
.hc-form-wrapper {
    max-width: 1060px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 400px 1fr;
    border-radius: var(--hc-radius);
    box-shadow: var(--hc-shadow);
    overflow: hidden;
    border: 1px solid var(--hc-border);
    background: #fff;
}

/* ══════════════════════════════════════════════
   COLONNE GAUCHE — Sidebar argumentaire
   ══════════════════════════════════════════════ */
.hc-form-sidebar {
    background: linear-gradient(160deg, var(--hc-blue) 0%, #043b5c 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hc-form-sidebar::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 260px; height: 260px;
    background: rgba(129, 215, 66, 0.1);
    border-radius: 50%;
}

.hc-form-sidebar::after {
    content: '';
    position: absolute;
    bottom: -100px; left: -60px;
    width: 300px; height: 300px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.hc-sidebar-inner {
    position: relative;
    z-index: 1;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Logo badge */
.hc-form-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    background: var(--hc-green);
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(129, 215, 66, 0.4);
}

.hc-form-logo-badge svg {
    color: #fff;
}

/* Titre sidebar */
.hc-sidebar-titre {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.02em;
}

.hc-sidebar-baseline {
    font-size: 14px;
    opacity: 0.75;
    margin: 4px 0 0;
    font-weight: 400;
}

/* Dividers */
.hc-sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 24px 0;
}

/* ── Liste des avantages ─────────────────────── */
.hc-advantages {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hc-advantages li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.hc-adv-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    background: rgba(129, 215, 66, 0.18);
    border-radius: 10px;
    margin-top: 2px;
}

.hc-adv-icon svg {
    color: var(--hc-green);
}

.hc-advantages li strong {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.hc-advantages li span {
    font-size: 13px;
    opacity: 0.72;
    line-height: 1.5;
}

/* ── Stats ────────────────────────────────────── */
.hc-sidebar-stats {
    display: flex;
    gap: 24px;
}

.hc-stat {
    display: flex;
    flex-direction: column;
}

.hc-stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--hc-green);
    line-height: 1.1;
}

.hc-stat-label {
    font-size: 12px;
    opacity: 0.65;
    margin-top: 2px;
}


/* ══════════════════════════════════════════════
   COLONNE DROITE — Formulaire
   ══════════════════════════════════════════════ */
.hc-form-main {
    display: flex;
    flex-direction: column;
    background: #fff;
}

/* ── En-tête du formulaire ──────────────────── */
.hc-form-header {
    padding: 32px 36px 0;
}

.hc-form-titre {
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--hc-dark);
}

.hc-form-sous-titre {
    font-size: 14px;
    margin: 0;
    color: var(--hc-gray);
    line-height: 1.5;
}

/* ── Corps du formulaire ─────────────────────── */
.hc-form-body {
    padding: 24px 36px 32px;
    flex: 1;
}

.hc-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Lignes ──────────────────────────────────── */
.hc-form-row {
    margin-bottom: 18px;
}

.hc-form-row--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ── Groupes ─────────────────────────────────── */
.hc-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* ── Labels ──────────────────────────────────── */
.hc-form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--hc-dark);
    letter-spacing: 0.02em;
}

.hc-form-group label svg {
    color: var(--hc-blue);
    flex-shrink: 0;
}

.hc-required {
    color: var(--hc-red);
    margin-left: 2px;
}

/* ── Inputs ──────────────────────────────────── */
.hc-input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--hc-border);
    border-radius: var(--hc-radius-sm);
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    color: var(--hc-dark);
    background: var(--hc-light);
    transition: border-color var(--hc-transition), box-shadow var(--hc-transition), background var(--hc-transition);
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.hc-input::placeholder { color: #b0b7c3; }

.hc-input:focus {
    border-color: var(--hc-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(6, 102, 156, 0.12);
}

.hc-input.hc-input--error {
    border-color: var(--hc-red);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.hc-input.hc-input--valid {
    border-color: var(--hc-green);
}

/* ── Textarea ────────────────────────────────── */
.hc-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* ── Messages d'erreur ───────────────────────── */
.hc-error {
    display: none;
    font-size: 12px;
    color: var(--hc-red);
    font-weight: 500;
    margin-top: 2px;
    align-items: center;
    gap: 4px;
}

.hc-error.hc-error--visible {
    display: flex;
}

/* ── RGPD ────────────────────────────────────── */
.hc-form-rgpd-row {
    margin-bottom: 22px;
}

.hc-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.hc-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.hc-checkbox-custom {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--hc-border);
    border-radius: 4px;
    background: var(--hc-light);
    transition: border-color var(--hc-transition), background var(--hc-transition);
    position: relative;
    margin-top: 1px;
}

.hc-checkbox-label input:checked ~ .hc-checkbox-custom {
    background: var(--hc-green);
    border-color: var(--hc-green);
}

.hc-checkbox-label input:checked ~ .hc-checkbox-custom::after {
    content: '';
    position: absolute;
    top: 3px; left: 6px;
    width: 5px; height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.hc-checkbox-text {
    font-size: 12px;
    color: var(--hc-gray);
    line-height: 1.5;
}

.hc-checkbox-text a {
    color: var(--hc-blue);
    text-decoration: underline;
}

/* ── Bouton submit ───────────────────────────── */
.hc-form-submit-row {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.hc-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--hc-green) 0%, #6abf34 100%);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: transform var(--hc-transition), box-shadow var(--hc-transition), background var(--hc-transition);
    box-shadow: 0 4px 18px rgba(129, 215, 66, 0.4);
    letter-spacing: 0.01em;
    width: 100%;
}

.hc-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(129, 215, 66, 0.5);
    background: linear-gradient(135deg, #8de04d 0%, #77d039 100%);
}

.hc-btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

.hc-btn-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

@keyframes hc-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.hc-spinner svg {
    animation: hc-spin 0.8s linear infinite;
}

/* ── Message résultat ────────────────────────── */
.hc-form-message {
    border-radius: var(--hc-radius-sm);
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-top: 4px;
    line-height: 1.5;
}

.hc-form-message--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.hc-form-message--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}


/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 900px) {
    .hc-form-wrapper {
        grid-template-columns: 1fr;
        max-width: 580px;
    }

    .hc-sidebar-inner {
        padding: 28px 24px;
    }

    .hc-sidebar-stats {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .hc-form-header {
        padding: 24px 20px 0;
    }

    .hc-form-body {
        padding: 20px;
    }

    .hc-form-row--2col {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hc-form-titre {
        font-size: 19px;
    }

    .hc-sidebar-titre {
        font-size: 20px;
    }
}
