/**
 * Styles pour la modale de réservation Stripe
 * Les Écrins de la Haute-Ville
 */

/* Overlay de la modale */
.stripe-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(27, 54, 93, 0.6);
    backdrop-filter: blur(4px);
    padding: 1rem;
    overflow-y: auto;
}

.stripe-modal-overlay.open {
    display: flex;
}

/* Container de la modale */
.stripe-modal-container {
    width: 100%;
    max-width: 600px;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contenu de la modale */
.stripe-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.stripe-modal-header {
    position: relative;
    padding: 1.5rem 3rem 1.5rem 2rem;
    background: linear-gradient(135deg, #7BA3C720, #7BA3C708);
    border-bottom: 1px solid #e2e0db;
}

.stripe-modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: #7BA3C7;
    margin: 0;
    font-style: italic;
}

.stripe-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #A89F91;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 0;
    transition: color 0.2s;
}

.stripe-modal-close:hover {
    color: #1B365D;
}

/* Body */
.stripe-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Résumé de réservation */
.booking-summary {
    background: linear-gradient(135deg, #f0f7fc, #fdfcfa);
    border: 1px solid #e2e0db;
    border-radius: 6px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
}

/* Version compacte du résumé */
.summary-dates-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.summary-icon-compact {
    width: 1.5rem;
    height: 1.5rem;
    color: #7BA3C7;
    flex-shrink: 0;
}

.summary-text-compact {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1B365D;
    line-height: 1.3;
}

/* Anciens styles (conservés pour compatibilité) */
.summary-dates {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.summary-icon {
    width: 2.5rem;
    height: 2.5rem;
    color: #7BA3C7;
    flex-shrink: 0;
}

.summary-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #A89F91;
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1rem;
    font-weight: 600;
    color: #1B365D;
    line-height: 1.4;
}

.summary-subtext {
    font-size: 0.875rem;
    color: #6b6560;
    margin-top: 0.25rem;
}

/* Sections du formulaire */
.form-section {
    margin-bottom: 1.25rem;
}

.form-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1B365D;
    margin: 0 0 0.75rem 0;
}

/* Groupes de champs */
.form-group {
    margin-bottom: 0.75rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9375rem;
    color: #1f2937;
    transition: all 0.2s;
    font-family: 'Urbanist', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: #7BA3C7;
    ring: 2px;
    ring-color: #7BA3C720;
    box-shadow: 0 0 0 3px rgba(123, 163, 199, 0.1);
}

.form-error {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #991b1b;
    font-size: 0.875rem;
}

.form-error.hidden {
    display: none;
}

/* Grid pour formulaire */
.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gap-4 {
    gap: 1rem;
}

/* Récapitulatif des prix */
.price-breakdown {
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    border-radius: 6px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e7e5e4;
}

.price-row:last-child {
    border-bottom: none;
}

.price-row span:first-child {
    color: #57534e;
    font-size: 0.875rem;
}

.price-value {
    font-weight: 600;
    color: #292524;
    text-align: right;
    white-space: nowrap;
    font-size: 0.9375rem;
}

.total-row {
    padding-top: 0.625rem;
    border-top: 2px solid #1B365D;
    margin-top: 0.375rem;
}

.total-row span {
    font-size: 1rem;
    font-weight: 700;
    color: #1B365D;
}

.total-price {
    font-size: 1.25rem !important;
    color: #7BA3C7 !important;
}

/* Stripe Payment Element */
.stripe-payment-element {
    min-height: 200px;
}

/* Notice légale (ancienne version) */
.legal-notice {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.legal-notice p {
    margin: 0;
}

.legal-notice a {
    color: #7BA3C7;
    text-decoration: underline;
}

.legal-notice a:hover {
    color: #1B365D;
}

/* Notice légale compacte (nouvelle version) */
.legal-notice-compact {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 1.25rem;
}

.legal-notice-compact p {
    margin: 0;
}

.legal-notice-compact a {
    color: #7BA3C7;
    text-decoration: underline;
}

.legal-notice-compact a:hover {
    color: #1B365D;
}

/* Bouton de soumission */
.submit-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: #7BA3C7;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(123, 163, 199, 0.3);
}

.submit-button:hover:not(:disabled) {
    background: #6a92b6;
    box-shadow: 0 6px 20px rgba(123, 163, 199, 0.4);
    transform: translateY(-1px);
}

.submit-button:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
}

.submit-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.submit-spinner {
    display: inline-block;
}

.submit-spinner.hidden {
    display: none;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none;
}

/* Message de succès */
.success-message {
    text-align: center;
    padding: 3rem 1.5rem;
}

.success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.success-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: #15803d;
    margin: 0 0 1rem 0;
}

.success-text {
    font-size: 1rem;
    color: #57534e;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.success-subtext {
    font-size: 0.875rem;
    color: #78716c;
    margin: 0 0 2rem 0;
}

.success-button {
    padding: 0.875rem 2.5rem;
    background: #15803d;
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.success-button:hover {
    background: #166534;
}

/* Responsive */
@media (max-width: 640px) {
    .stripe-modal-header {
        padding: 1rem 2.5rem 1rem 1.25rem;
    }

    .stripe-modal-title {
        font-size: 1.375rem;
    }

    .stripe-modal-body {
        padding: 1.25rem;
    }

    .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .booking-summary {
        padding: 0.75rem;
    }

    .summary-dates-compact {
        flex-direction: row;
        gap: 0.5rem;
    }

    .summary-icon-compact {
        width: 1.25rem;
        height: 1.25rem;
    }

    .summary-text-compact {
        font-size: 0.8125rem;
    }

    .price-breakdown {
        padding: 0.75rem;
    }

    .price-row {
        padding: 0.375rem 0;
    }

    .price-value {
        font-size: 0.9375rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stripe-modal-overlay.open .stripe-modal-content {
    animation: fadeIn 0.3s ease-out;
}
