/* ========================================
   VARIABLES CSS - Configuration globale
   ======================================== */
:root {
    /* Couleurs principales */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #3b82f6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    /* Texte */
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    
    /* Backgrounds */
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-light: #f1f5f9;
    --bg-hover: #f8fafc;
    
    /* Bordures */
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    
    /* Rayons de bordure */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Espacements */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 40px;
    
    /* Ombres */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    
    /* reCAPTCHA */
    --captcha-bg: #f8fafc;
    --captcha-border: #e5e7eb;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header moderne */
.header-modern {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 30px 0;
    position: relative;
    overflow: hidden;
}

.header-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.header-logo {
    max-height: 48px;
    width: auto;
    margin-bottom: 10px;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

.header-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.header-subtitle {
    font-size: 0.95rem;
    opacity: 0.92;
    font-weight: 400;
    line-height: 1.4;
}

/* Container principal */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Cards modernes */
.form-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--bg-light) 0%, #f1f5f9 100%);
    padding: 30px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-body {
    padding: 40px;
}

/* Form controls modernes */
.form-control, .form-select {
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: white;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Bouton moderne */
.btn-modern {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    border: none;
    border-radius: 12px;
    padding: 18px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-modern::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;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Calendrier moderne */
.calendar-modern {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    max-width: 650px;
    min-width: 500px;
    width: 100%;
    margin: 0 auto var(--space-lg) auto;
    border: 1px solid var(--border-light);
    height: 600px;
    display: flex;
    flex-direction: column;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: var(--space-md);
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.calendar-nav button {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e2e8f0 100%);
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    cursor: pointer;
    transition: all var(--transition-normal);
    flex-shrink: 0;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.calendar-nav button:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    transform: scale(1.1);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.calendar-nav button:active {
    transform: scale(0.95);
}

.calendar-nav h5 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    text-align: center;
    flex-grow: 1;
    letter-spacing: -0.3px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 12px;
    flex: 1 1 auto;
    overflow-y: auto;
    align-content: start;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    background: white;
    border: 2px solid transparent;
    transition: all var(--transition-normal);
    font-size: 1rem;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
    min-width: 45px;
    min-height: 45px;
}

.calendar-day:hover:not(.disabled) {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    transform: translateY(-3px) scale(1.05);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    z-index: 10;
}

.calendar-day.selected {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    font-weight: 700;
}

.calendar-day.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.4;
    background: #f9fafb;
    box-shadow: none;
}

.calendar-day.today {
    border-color: var(--warning);
    font-weight: 700;
}

/* Créneaux horaires */
.time-slots-modern {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    height: 600px;
    max-height: 600px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Dropdown pour les créneaux */
.time-slots-dropdown {
    margin-bottom: 20px;
}

/* Affichage compact des créneaux */
.time-slots-header {
    display: none !important; /* CACHÉ - On utilise uniquement la barre sticky principale */
}

.selected-time-display {
    display: none !important; /* CACHÉ - On utilise uniquement la barre sticky principale */
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-sm);
    overflow-y: scroll !important;
    overflow-x: hidden;
    padding: var(--space-sm);
    flex: 1 1 auto;
    align-content: start;
    scroll-behavior: smooth;
    min-height: 0;
    -webkit-overflow-scrolling: touch; /* Scroll fluide sur iOS */
    scrollbar-gutter: stable; /* Réserve l'espace pour la scrollbar */
}

.time-slots-grid::-webkit-scrollbar {
    width: 8px;
}

.time-slots-grid::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.5);
    border-radius: 10px;
    margin: 10px 0;
}

.time-slots-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%);
    border-radius: 10px;
    border: 2px solid rgba(241, 245, 249, 0.5);
    transition: all 0.25s ease;
}

.time-slots-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    border-color: rgba(37, 99, 235, 0.1);
}

.time-slot {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.time-slot:hover:not(.disabled):not(.taken) {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border-color: var(--primary);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    z-index: 10;
}

.time-slot.selected {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    font-weight: 700;
    transform: scale(1.05);
}

.time-slot.taken {
    background: #fef2f2;
    color: #dc2626;
    border-color: #dc2626;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.6;
}

/* Boutons de basculement */
.time-display-toggle {
    text-align: center;
}

.time-display-toggle .btn-group .btn {
    border-radius: 8px;
    font-size: 0.85rem;
    padding: 8px 16px;
}

.time-display-toggle .btn-group .btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Légende des créneaux */
.legend-available {
    width: 16px;
    height: 16px;
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 4px;
}

.legend-taken {
    width: 16px;
    height: 16px;
    background: #fef2f2;
    border: 2px solid #dc2626;
    border-radius: 4px;
    position: relative;
}

.legend-taken::after {
    content: '✗';
    position: absolute;
    top: -2px;
    right: -2px;
    color: #dc2626;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Mode dropdown pour mobile */
@media (max-width: 768px) {
    .time-slots-grid {
        grid-template-columns: repeat(3, 1fr);
        max-height: 150px;
    }
    
    .time-slot {
        font-size: 0.8rem;
        padding: 8px 6px;
        min-height: 35px;
    }
    
    .time-display-toggle .btn-group .btn {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}

/* Message de succès */
.success-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.success-card {
    background: white;
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 100%;
}

.success-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 25px;
}

.success-card h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.success-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 40px;
}

.confirmation-details {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
}

.confirmation-code {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.code-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.code-value {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.appointment-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: white;
    border-radius: 10px;
    font-weight: 500;
}

.info-item i {
    color: var(--primary);
    width: 20px;
}

.success-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    background: var(--text-light);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--text-dark);
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--success);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Footer moderne */
.footer-modern {
    background: linear-gradient(135deg, var(--text-dark) 0%, #374151 100%);
    color: white;
    padding: 60px 0;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    align-items: start;
}

.footer-section h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: #d1d5db;
}

.footer-contact-item i {
    color: var(--primary);
    width: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-modern {
        padding: 20px 0;
    }
    
    .header-logo {
        max-height: 40px;
        margin-bottom: 10px;
    }
    
    .header-title {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
    
    .header-subtitle {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .main-container {
        padding: 15px;
    }
    
    .card-body {
        padding: 20px 15px;
    }
    
    .card-header {
        padding: 20px 15px;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .success-card {
        padding: 20px 15px;
    }
    
    .success-card h2 {
        font-size: 1.5rem;
    }
    
    /* Améliorer l'espacement des sections */
    .form-card {
        margin-bottom: 20px;
    }
    
    /* Calendrier plus compact */
    .calendar-modern {
        padding: 20px;
        max-width: 100%;
        min-width: auto;
        margin-bottom: var(--space-md);
        height: auto;
        min-height: 450px;
    }
    
    .time-slots-modern {
        height: auto;
        min-height: 450px;
    }
    
    .calendar-nav {
        margin-bottom: 20px;
        padding-bottom: 15px;
        gap: var(--space-sm);
    }
    
    .calendar-nav button {
        width: 38px;
        height: 38px;
    }
    
    .calendar-nav h5 {
        font-size: 1rem;
        font-weight: 700;
    }
    
    /* Grille de calendrier plus compacte */
    .calendar-grid {
        gap: 4px;
        padding: 8px;
    }
    
    .calendar-day {
        padding: 8px 4px;
        font-size: 0.9rem;
        min-height: 40px;
        font-weight: 600;
    }
    
    .calendar-day:hover:not(.disabled) {
        transform: scale(1.05);
    }
    
    /* Boutons plus compacts */
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .appointment-info {
        grid-template-columns: 1fr;
    }
    
    /* Formulaires plus compacts */
    .form-control {
        padding: 10px 12px;
        font-size: 16px;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }
    
    /* MOBILE : Responsive créneaux horaires */
    .time-slots-modern {
        height: auto !important;
        max-height: none !important;
        min-height: auto !important;
        padding: 20px 15px !important;
        margin-bottom: 20px;
    }
    
    .time-slots-modern h6 {
        font-size: 1rem;
        margin-bottom: 15px !important;
    }
    
    /* MOBILE : Forcer le mode Liste */
    .time-slots-grid {
        display: none !important; /* Cacher la grille sur mobile */
    }
    
    #timeSlotsDropdown {
        display: block !important; /* Forcer l'affichage de la liste */
        margin-bottom: 0 !important;
    }
    
    .time-slots-dropdown {
        max-height: 400px;
        overflow-y: auto;
    }
    
    .time-slots-dropdown .dropdown-item {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    /* Cacher le bouton Grille sur mobile */
    #gridViewBtn {
        display: none !important;
    }
    
    /* Bouton Liste en pleine largeur */
    #dropdownViewBtn {
        width: 100%;
        margin-bottom: 15px;
    }
    
    /* Dropdown sélecteur compact */
    #timeSlotsDropdown select {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
        border-radius: 8px;
        border: 2px solid var(--border);
    }
    
    /* Supprimer les espaces vides inutiles */
    #timeSlotsCompact {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .time-display-toggle {
        margin-bottom: 10px !important;
    }
    
    /* Footer plus compact */
    .footer {
        padding: 20px 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-contact {
        flex-direction: column;
        gap: 10px;
    }
    
    .success-actions {
        flex-direction: column;
    }
}

/* Très petits écrans (iPhone en mode portrait) */
@media (max-width: 480px) {
    .header-modern {
        padding: 15px 0;
    }
    
    .header-logo {
        max-height: 35px;
        margin-bottom: 8px;
    }
    
    .header-title {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }
    
    .header-subtitle {
        font-size: 0.85rem;
    }
    
    .main-container {
        padding: 10px;
    }
    
    .card-body {
        padding: 15px 10px;
    }
    
    .card-header {
        padding: 15px 10px;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    /* Calendrier encore plus compact */
    .calendar-day {
        padding: 6px 2px;
        font-size: 0.8rem;
        min-height: 30px;
    }
    
    /* Créneaux horaires en une colonne */
    .time-slots-grid {
        grid-template-columns: 1fr;
        gap: 6px;
        max-height: 150px;
    }
    
    .time-slot {
        padding: 8px 6px;
        font-size: 0.8rem;
        min-height: 35px;
    }
    
    /* Formulaires plus compacts */
    .form-control {
        padding: 8px 10px;
        font-size: 16px;
    }
    
    .form-label {
        font-size: 0.85rem;
    }
    
    /* Boutons plus petits */
    .btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* STICKY BAR SIMPLE ET RESPONSIVE */
#mainStickyBar > div {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 768px) {
    #mainStickyBar > div {
        padding: 12px 15px;
        font-size: 0.9rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    #mainStickyBar button {
        align-self: stretch;
        width: 100%;
        text-align: center;
    }
}

/* MASQUER BOUTON TEST EN PRODUCTION */
button[onclick="fillTestData()"] {
    display: none !important;
}

/* OPTIMISATION MOBILE SUPPLÉMENTAIRE */
@media (max-width: 768px) {
    /* Body sans padding pour sticky */
    body {
        padding-top: 60px !important;
    }
    
    /* Container principal */
    .main-container {
        padding: 15px 10px !important;
        margin-top: 0 !important;
    }
    
    /* Card formulaire */
    .form-card, .card {
        margin-bottom: 15px !important;
        border-radius: 12px !important;
    }
    
    .card-body {
        padding: 20px 15px !important;
    }
    
    /* Calendrier mobile optimisé */
    .calendar-time-slots-wrapper {
        gap: 15px !important;
    }
    
    .calendar-modern {
        padding: 15px !important;
        margin-bottom: 15px;
    }
    
    /* Formulaire compact */
    .form-group, .mb-3 {
        margin-bottom: 15px !important;
    }
    
    /* Labels */
    .form-label {
        margin-bottom: 6px !important;
        font-size: 0.9rem !important;
    }
    
    /* Inputs */
    .form-control, .form-select, textarea {
        padding: 10px 12px !important;
        font-size: 16px !important; /* Évite le zoom auto iOS */
        border-radius: 8px !important;
    }
    
    /* Textarea */
    textarea.form-control {
        min-height: 80px !important;
    }
    
    /* Bouton submit */
    .btn-modern, .btn {
        padding: 12px 20px !important;
        font-size: 1rem !important;
        width: 100%;
        margin-top: 10px;
    }
    
    /* Footer compact */
    .footer-modern {
        padding: 20px 10px !important;
        font-size: 0.85rem !important;
    }
    
    /* Supprimer tous les espaces inutiles */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .col-lg-6, .col-md-6 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* iPhone SE et petits écrans */
@media (max-width: 375px) {
    body {
        padding-top: 70px !important;
    }
    
    .main-container {
        padding: 10px 8px !important;
    }
    
    .card-body {
        padding: 15px 12px !important;
    }
    
    .form-control, .form-select {
        font-size: 16px !important;
        padding: 8px 10px !important;
    }
}

/* ========================================
   STYLES reCAPTCHA - Amélioration UX
   ======================================== */

.recaptcha-container {
    background: var(--captcha-bg);
    border: 2px solid var(--captcha-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin: var(--space-md) 0;
    text-align: center;
    transition: all var(--transition-normal);
}

.recaptcha-container:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.recaptcha-help-text {
    margin-top: var(--space-sm);
    padding: var(--space-sm);
    background: rgba(59, 130, 246, 0.05);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.recaptcha-help-text i {
    color: var(--primary);
    margin-right: var(--space-xs);
}

/* Animation pour les messages d'erreur/succès */
.recaptcha-container .alert {
    animation: slideIn 0.3s ease-out;
    margin-top: var(--space-sm);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style pour le widget reCAPTCHA */
.g-recaptcha {
    display: inline-block;
    margin: var(--space-sm) 0;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .recaptcha-container {
        padding: var(--space-sm);
        margin: var(--space-sm) 0;
    }
    
    .recaptcha-help-text {
        font-size: 0.85rem;
        padding: var(--space-xs);
    }
    
    .g-recaptcha {
        transform: scale(0.9);
        transform-origin: center;
    }
}

/* État de chargement */
.recaptcha-loading {
    position: relative;
}

.recaptcha-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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