/**
 * HubSpot Form Section Styles
 *
 * Premium design for the footer contact form
 * @package NormandieSeminaire
 */

/* ===================================
   HUBSPOT SECTION
   =================================== */

.hubspot-section {
    position: relative;
    padding: 5rem 0 6rem;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.hubspot-section__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hubspot-section__pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(139, 21, 56, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 60%);
    animation: patternPulse 15s ease-in-out infinite;
}

@keyframes patternPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Decorative elements */
.hubspot-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 21, 56, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hubspot-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ===================================
   CONTENT LAYOUT
   =================================== */

.hubspot-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 991px) {
    .hubspot-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* ===================================
   TEXT CONTENT
   =================================== */

.hubspot-content__text {
    color: var(--color-blanc);
}

.hubspot-section__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-or-normand);
    margin-bottom: 1.5rem;
}

.hubspot-section__badge svg {
    width: 16px;
    height: 16px;
}

.hubspot-section__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hubspot-section__subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

/* Features list */
.hubspot-section__features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hubspot-section__features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
}

.hubspot-section__features svg {
    width: 20px;
    height: 20px;
    color: var(--color-or-normand);
    flex-shrink: 0;
}

/* Trust section */
.hubspot-section__trust {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hubspot-section__trust p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.75rem;
}

.hubspot-section__phone {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-blanc);
    text-decoration: none;
    transition: all 0.3s ease;
}

.hubspot-section__phone:hover {
    color: var(--color-or-normand);
    transform: translateX(5px);
}

.hubspot-section__phone svg {
    width: 24px;
    height: 24px;
    padding: 6px;
    background: var(--color-rouge-normand);
    border-radius: 50%;
}

/* ===================================
   FORM WRAPPER
   =================================== */

.hubspot-content__form {
    position: relative;
}

.hubspot-form-wrapper {
    background: var(--color-blanc);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Gradient border effect */
.hubspot-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-rouge-normand), var(--color-or-normand), var(--color-rouge-normand));
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hubspot-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.hubspot-form-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-gris-900);
    margin-bottom: 0.5rem;
}

.hubspot-form-header p {
    font-size: 0.9375rem;
    color: var(--color-gris-600);
    margin: 0;
}

/* ===================================
   HUBSPOT FORM OVERRIDES
   =================================== */

.hubspot-form .hs-form {
    font-family: inherit;
}

.hubspot-form .hs-form-field {
    margin-bottom: 1.25rem;
}

.hubspot-form .hs-form-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-gris-700);
    margin-bottom: 0.5rem;
}

.hubspot-form .hs-form-field label .hs-form-required {
    color: var(--color-rouge-normand);
}

.hubspot-form .hs-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--color-gris-200);
    border-radius: 10px;
    background: var(--color-gris-50);
    transition: all 0.3s ease;
}

.hubspot-form .hs-input:focus {
    outline: none;
    border-color: var(--color-rouge-normand);
    background: var(--color-blanc);
    box-shadow: 0 0 0 4px rgba(139, 21, 56, 0.1);
}

.hubspot-form .hs-input::placeholder {
    color: var(--color-gris-400);
}

.hubspot-form select.hs-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.hubspot-form textarea.hs-input {
    min-height: 120px;
    resize: vertical;
}

/* Submit button */
.hubspot-form .hs-submit {
    margin-top: 1.5rem;
}

.hubspot-form .hs-button {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--color-blanc);
    background: linear-gradient(135deg, var(--color-rouge-normand), #a01d44);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hubspot-form .hs-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.hubspot-form .hs-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 21, 56, 0.4);
}

.hubspot-form .hs-button:hover::before {
    left: 100%;
}

.hubspot-form .hs-button:active {
    transform: translateY(0);
}

/* Error messages */
.hubspot-form .hs-error-msgs {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.hubspot-form .hs-error-msg {
    font-size: 0.8125rem;
    color: #dc2626;
}

/* Success message */
.hubspot-form .submitted-message {
    text-align: center;
    padding: 2rem;
}

.hubspot-form .submitted-message p {
    font-size: 1.125rem;
    color: var(--color-gris-700);
}

/* Legal consent */
.hubspot-form .legal-consent-container {
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--color-gris-600);
}

.hubspot-form .legal-consent-container .hs-form-booleancheckbox-display {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.hubspot-form .legal-consent-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--color-rouge-normand);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 767px) {
    .hubspot-section {
        padding: 3rem 0 4rem;
    }

    .hubspot-form-wrapper {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .hubspot-section__features {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hubspot-section__phone {
        font-size: 1.25rem;
    }
}

/* ===================================
   ANIMATION
   =================================== */

@media (prefers-reduced-motion: no-preference) {
    .hubspot-form-wrapper {
        animation: formFloat 6s ease-in-out infinite;
    }

    @keyframes formFloat {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-10px); }
    }
}
