/**
 * Styles Frontend - HBC Contact Messaging
 * Couleur principale HBC : #03a9f4 (Cyan)
 */

:root {
    --hbc-primary: #03a9f4;
    --hbc-primary-hover: #0288d1;
    --hbc-text-dark: #333333;
    --hbc-text-muted: #666666;
    --hbc-border-color: #cfd8dc;
    --hbc-bg-input: #f8fafc;
    --hbc-error: #e53935;
    --hbc-success: #2e7d32;
    --hbc-radius-pill: 30px;
    --hbc-radius-card: 16px;
    --hbc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.hbc-messaging-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    font-family: var(--hbc-font);
    box-sizing: border-box;
    align-items: stretch;
}

.hbc-messaging-container * {
    box-sizing: border-box;
}

/* Colonnes */
.hbc-form-column {
    flex: 1 1 520px;
    background: #ffffff;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.hbc-map-column {
    flex: 1 1 450px;
    min-height: 480px;
    display: flex;
}

.hbc-messaging-container.hbc-no-map .hbc-form-column {
    flex: 1 1 100%;
    max-width: 700px;
    margin: 0 auto;
}

/* En-tête formulaire */
.hbc-form-header {
    margin-bottom: 25px;
}

.hbc-form-title {
    color: var(--hbc-primary);
    font-size: 28px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.hbc-form-subtitle {
    color: var(--hbc-text-muted);
    font-size: 15px;
    margin: 0;
    line-height: 1.5;
}

/* Groupes de champs */
.hbc-form-group {
    margin-bottom: 18px;
}

.hbc-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--hbc-text-dark);
    margin-bottom: 6px;
}

.hbc-required {
    color: #e53935;
    font-weight: bold;
}

/* Inputs & Conteneurs arrondis comme sur la maquette */
.hbc-input,
.hbc-select,
.hbc-textarea {
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    color: #333;
    background-color: var(--hbc-bg-input);
    border: 1.5px solid var(--hbc-border-color);
    outline: none;
    transition: all 0.25s ease-in-out;
    font-family: inherit;
}

.hbc-input {
    border-radius: var(--hbc-radius-pill);
    height: 48px;
}

.hbc-select {
    border-radius: var(--hbc-radius-pill);
    height: 48px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23666" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
}

.hbc-textarea {
    border-radius: 18px;
    resize: vertical;
    min-height: 110px;
    line-height: 1.5;
}

.hbc-input:focus,
.hbc-select:focus,
.hbc-textarea:focus {
    border-color: var(--hbc-primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.15);
}

.hbc-input::placeholder,
.hbc-textarea::placeholder {
    color: #98a2b3;
    font-weight: 400;
}

/* Erreurs de validation visuelle */
.hbc-input.hbc-invalid,
.hbc-select.hbc-invalid,
.hbc-textarea.hbc-invalid {
    border-color: var(--hbc-error);
    background-color: #fff8f8;
}

/* Bouton d'envoi */
.hbc-form-actions {
    margin-top: 15px;
    display: flex;
}

.hbc-form-actions.hbc-align-left {
    justify-content: flex-start;
}

.hbc-form-actions.hbc-align-center {
    justify-content: center;
}

.hbc-form-actions.hbc-align-right {
    justify-content: flex-end;
}

.hbc-form-actions.hbc-align-justify .hbc-submit-btn {
    width: 100%;
}

.hbc-submit-btn.hbc-btn-small {
    padding: 9px 24px;
    font-size: 13px;
}

.hbc-submit-btn.hbc-btn-medium {
    padding: 13px 38px;
    font-size: 15px;
}

.hbc-submit-btn.hbc-btn-large {
    padding: 16px 48px;
    font-size: 17px;
}

.hbc-submit-btn {
    background-color: var(--hbc-primary);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: var(--hbc-radius-pill);
    padding: 13px 38px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(3, 169, 244, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.hbc-submit-btn:hover {
    background-color: var(--hbc-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(3, 169, 244, 0.4);
}

.hbc-submit-btn:active {
    transform: translateY(0);
}

.hbc-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.hbc-btn-spinner {
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

.hbc-spinner-svg {
    animation: hbc-rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.hbc-spinner-svg .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: hbc-dash 1.5s ease-in-out infinite;
}

@keyframes hbc-rotate {
    100% { transform: rotate(360deg); }
}

@keyframes hbc-dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* Boîte de feedback (succès/erreur) */
.hbc-feedback-box {
    margin: 15px 0;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.hbc-feedback-box.hbc-success {
    background-color: #edf7ed;
    color: #1e4620;
    border: 1px solid #c8e6c9;
}

.hbc-feedback-box.hbc-error {
    background-color: #fdeded;
    color: #5f2120;
    border: 1px solid #ffcdd2;
}

/* reCAPTCHA */
.hbc-recaptcha-wrapper {
    margin: 15px 0;
}

/* Colonne Carte Interactive */
.hbc-map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 480px;
    border-radius: var(--hbc-radius-card);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.hbc-open-maps-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    background: #ffffff;
    color: #1a73e8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.hbc-open-maps-btn:hover {
    background: #f8fafc;
    color: #1557b0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.hbc-map-iframe {
    width: 100%;
    height: 100%;
    min-height: 480px;
    border: 0;
    display: block;
}

/* Responsive */
@media (max-width: 900px) {
    .hbc-messaging-container {
        flex-direction: column;
        gap: 40px;
    }

    .hbc-form-column,
    .hbc-map-column {
        flex: 1 1 100%;
        width: 100%;
    }

    .hbc-map-wrapper {
        min-height: 380px;
    }

    .hbc-map-iframe {
        min-height: 380px;
    }
}
