/* ===================================
   ISM ASSURANCES - PAGE DE CONFIRMATION
   Charte graphique complète et responsive
   =================================== */

/* Variables CSS - Charte graphique ISM */
:root {
    /* Couleurs primaires */
    --vert-lagon: #59B3AE;
    --orange-vif: #EF6F3C;
    
    /* Couleurs secondaires */
    --bordeaux-profond: #6D1F42;
    --beige-sable: #DAB595;
    
    /* Couleurs neutres */
    --gris-clair: #E2DFE2;
    --gris-moyen: #858585;
    --blanc: #FFFFFF;
    --noir-doux: #333333;
    
    /* Typographie */
    --font-family: 'Montserrat', sans-serif;
    
    /* Espacements */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-xxl: 64px;
    
    /* Bordures et ombres */
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-weight: 400;
    line-height: 1.6;
    color: var(--gris-moyen);
    background: linear-gradient(135deg, 
        var(--gris-clair) 0%, 
        var(--blanc) 50%, 
        #f8f9fa 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container principal */
.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-top: var(--spacing-lg);
}

.logo-container {
    display: inline-block;
}

.logo {
    max-width: 280px;
    height: auto;
    filter: drop-shadow(var(--shadow-light));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

/* ===== CONTENU PRINCIPAL ===== */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-md) 0;
}

.confirmation-card {
    background: var(--blanc);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xxl) var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(89, 179, 174, 0.1);
    position: relative;
    width: 100%;
    max-width: 600px;
    overflow: hidden;
}

/* Bordure décorative en haut */
.confirmation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--vert-lagon), var(--orange-vif));
}

/* ===== FORMULAIRE EMAIL (ÉTAPE 1) ===== */
.step-content {
    transition: all 0.3s ease;
}

/* Icône formulaire - COULEUR BORDEAUX */
.form-icon-wrapper {
    margin-bottom: var(--spacing-lg);
}

.form-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: #6D1F42; /* Bordeaux profond */
    color: var(--blanc);
    border-radius: 50%;
    font-size: 36px;
    font-weight: bold;
    box-shadow: var(--shadow-light);
    animation: scaleInBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Titre et description du formulaire */
.form-title {
    font-family: var(--font-family);
    font-weight: 900;
    font-style: italic;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--vert-lagon);
    margin-bottom: var(--spacing-md);
}

.form-description {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.7;
    color: var(--gris-moyen);
    margin-bottom: var(--spacing-xl);
}

/* Formulaire email */
.email-form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.input-group {
    position: relative;
    margin-bottom: var(--spacing-lg);
    transition: all 0.3s ease;
}

.input-label {
    position: absolute;
    top: -8px;
    left: 12px;
    background: var(--blanc);
    color: var(--bordeaux-profond);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0 8px;
    z-index: 1;
}

.email-input {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid var(--gris-clair);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--noir-doux);
    background: var(--blanc);
    transition: all 0.3s ease;
    outline: none;
}

.email-input:focus {
    border-color: var(--vert-lagon);
    box-shadow: 0 0 0 3px rgba(89, 179, 174, 0.1);
    transform: translateY(-2px);
}

.email-input:valid {
    border-color: var(--vert-lagon);
}

.email-input::placeholder {
    color: var(--gris-moyen);
    opacity: 0.7;
}

/* États d'erreur */
.input-group.error .email-input {
    border-color: #e74c3c;
    animation: shake 0.6s ease-in-out;
}

.input-group.error .input-label {
    color: #e74c3c;
}

.error-message {
    position: absolute;
    bottom: -24px;
    left: 0;
    color: #e74c3c;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Bouton de soumission */
.submit-button {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--orange-vif), #ff7849);
    color: var(--blanc);
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 111, 60, 0.3);
}

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

.submit-button:disabled {
    background: var(--gris-clair);
    color: var(--gris-moyen);
    cursor: not-allowed;
    transform: none;
}

.submit-button.valid {
    background: linear-gradient(135deg, var(--vert-lagon), #4da6a1);
}

.submit-button.loading {
    background: var(--bordeaux-profond);
}

.button-spinner {
    animation: spin 1s linear infinite;
}

/* ===== ICÔNE DE SUCCÈS ===== */
.success-icon-wrapper {
    margin-bottom: var(--spacing-lg);
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--vert-lagon);
    color: var(--blanc);
    border-radius: 50%;
    font-size: 36px;
    font-weight: bold;
    box-shadow: var(--shadow-light);
    animation: scaleInBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== CONTENU MESSAGE ===== */
.message-content {
    margin-bottom: var(--spacing-lg);
}

/* Titre principal - Montserrat Black Italique */
.main-title {
    font-family: var(--font-family);
    font-weight: 900;
    font-style: italic;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--vert-lagon);
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* Texte de confirmation - Montserrat Regular */
.confirmation-text {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.7;
    color: var(--gris-moyen);
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* Texte de clôture - Montserrat SemiBold */
.closing-text {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    color: var(--bordeaux-profond);
    margin-bottom: 0;
    animation: fadeInUp 0.8s ease 0.6s both;
}

/* Mise en valeur marque */
.brand-highlight {
    color: var(--orange-vif);
    font-weight: 700;
}

/* ===== LIGNE DÉCORATIVE ===== */
.decorative-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--vert-lagon), var(--orange-vif));
    margin: var(--spacing-lg) auto 0;
    border-radius: 2px;
    animation: fadeInUp 0.8s ease 0.8s both;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding-top: var(--spacing-lg);
    margin-top: auto;
}

.footer-text {
    font-family: var(--font-family);
    font-weight: 300;
    font-size: 0.9rem;
    color: var(--gris-moyen);
    opacity: 0.7;
}

/* Animations spécifiques */
@keyframes shake {
    0%, 20%, 50%, 80%, 100% { transform: translateX(0); }
    10%, 30%, 70%, 90% { transform: translateX(-8px); }
    40%, 60% { transform: translateX(8px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.step-content.animate-in {
    animation: fadeInUp 0.8s ease both;
}

/* Transition entre étapes */
#email-form-step {
    opacity: 1;
    transform: translateY(0);
    display: block;
    transition: all 0.3s ease;
}

#confirmation-step {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleInBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* Tablettes */
@media (max-width: 768px) {
    .page-container {
        padding: var(--spacing-sm);
    }
    
    .header {
        margin-bottom: var(--spacing-lg);
        padding-top: var(--spacing-md);
    }
    
    .logo {
        max-width: 200px;
    }
    
    .confirmation-card {
        padding: var(--spacing-xl) var(--spacing-lg);
        margin: 0 var(--spacing-sm);
    }
    
    .success-icon, .form-icon {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }
    
    .success-icon-wrapper, .form-icon-wrapper {
        margin-bottom: var(--spacing-md);
    }
}

/* Mobiles */
@media (max-width: 480px) {
    .page-container {
        padding: var(--spacing-xs);
    }
    
    .header {
        margin-bottom: var(--spacing-md);
        padding-top: var(--spacing-sm);
    }
    
    .logo {
        max-width: 160px;
    }
    
    .confirmation-card {
        padding: var(--spacing-lg) var(--spacing-md);
        margin: 0;
        border-radius: var(--border-radius);
    }
    
    .success-icon, .form-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
        background: #6D1F42; /* Bordeaux sur mobile aussi */
    }
    
    .success-icon-wrapper, .form-icon-wrapper {
        margin-bottom: var(--spacing-md);
    }
    
    .decorative-line {
        width: 60px;
        margin-top: var(--spacing-md);
    }
    
    .footer {
        padding-top: var(--spacing-md);
    }
    
    .footer-text {
        font-size: 0.8rem;
    }
    
    /* Formulaire mobile */
    .email-input {
        padding: 16px 18px;
        font-size: 16px; /* Évite le zoom sur iOS */
    }
    
    .submit-button {
        padding: 16px 20px;
        font-size: 1rem;
    }
}

/* Très petits écrans */
@media (max-width: 320px) {
    .confirmation-card {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .logo {
        max-width: 140px;
    }
}

/* Mode paysage mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .page-container {
        padding: var(--spacing-sm);
    }
    
    .header {
        margin-bottom: var(--spacing-sm);
        padding-top: var(--spacing-sm);
    }
    
    .main-content {
        padding: var(--spacing-sm) 0;
    }
    
    .confirmation-card {
        padding: var(--spacing-md);
    }
    
    .success-icon, .form-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

/* Force le thème clair - Désactive le mode sombre */
html {
    color-scheme: light only;
}

/* Assure la compatibilité avec tous les navigateurs */
@media (prefers-color-scheme: dark) {
    html, body {
        color-scheme: light only !important;
        background: linear-gradient(135deg, 
            var(--gris-clair) 0%, 
            var(--blanc) 50%, 
            #f8f9fa 100%) !important;
    }
    
    .confirmation-card {
        background: var(--blanc) !important;
        color: var(--gris-moyen) !important;
        border-color: rgba(89, 179, 174, 0.1) !important;
    }
    
    .main-title, .form-title {
        color: var(--vert-lagon) !important;
    }
    
    .confirmation-text, .form-description {
        color: var(--gris-moyen) !important;
    }
    
    .closing-text {
        color: var(--bordeaux-profond) !important;
    }
    
    .footer-text {
        color: var(--gris-moyen) !important;
    }
    
    .form-icon {
        background: #6D1F42 !important;
    }
}

/* Amélioration accessibilité */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}