/* === ReservConnect - Thème Éducatif Moderne === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- Variables CSS Thème Éducatif --- */
:root {
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    
    /* Rayons de bordure modernes */
    --border-radius-xs: 0.25rem;
    --border-radius-sm: 0.5rem;
    --border-radius: 0.75rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    
    /* Transitions fluides */
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Ombres modernes */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.15);
    
    /* Focus ring */
    --focus-ring-width: 0.25rem;
}

/* --- Thème Clair Éducatif --- */
[data-theme="light"] {
    /* Couleurs principales éducatives */
    --color-primary: #2563eb; /* Bleu éducatif vif */
    --color-primary-hover: #1d4ed8; /* Bleu plus foncé */
    --color-primary-light: #dbeafe; /* Bleu très clair */
    --color-primary-dark: #1e40af; /* Bleu foncé */
    
    /* Couleurs secondaires */
    --color-secondary: #64748b; /* Gris moderne */
    --color-secondary-hover: #475569;
    --color-secondary-light: #f1f5f9;
    
    /* Couleurs d'état */
    --color-success: #10b981; /* Vert éducatif */
    --color-success-hover: #059669;
    --color-success-light: #d1fae5;
    
    --color-warning: #f59e0b; /* Orange éducatif */
    --color-warning-hover: #d97706;
    --color-warning-light: #fef3c7;
    
    --color-danger: #ef4444; /* Rouge d'alerte */
    --color-danger-hover: #dc2626;
    --color-danger-light: #fee2e2;
    
    --color-info: #06b6d4; /* Cyan informatif */
    --color-info-hover: #0891b2;
    --color-info-light: #cffafe;
    
    /* Texte */
    --color-text-base: #0f172a; /* Gris très foncé */
    --color-text-muted: #64748b; /* Gris moyen */
    --color-text-light: #94a3b8; /* Gris clair */
    --color-text-on-primary: #ffffff;
    --color-text-on-success: #ffffff;
    --color-text-on-warning: #ffffff;
    --color-text-on-danger: #ffffff;
    
    /* Arrière-plans */
    --color-bg-body: rgba(248, 250, 252, 0.95); /* Fond très clair avec transparence */
    --color-bg-card: #ffffff;
    --color-bg-card-hover: #f8fafc;
    --color-bg-input: #ffffff;
    --color-bg-input-focus: #ffffff;
    
    /* Bordures */
    --color-border: #e2e8f0;
    --color-border-hover: #cbd5e1;
    --color-border-focus: var(--color-primary);
    
    /* Inputs */
    --color-input-bg: var(--color-bg-input);
    --color-input-border: var(--color-border);
    --color-input-focus-border: var(--color-primary);
    --color-input-focus-shadow: rgba(37, 99, 235, 0.2);
    
    /* Liens */
    --color-link: var(--color-primary);
    --color-link-hover: var(--color-primary-hover);
    
    /* Code */
    --color-code-bg: #f1f5f9;
    --color-code-text: #dc2626;
    
    /* Gradients éducatifs */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-card: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

/* --- Thème Sombre Éducatif --- */
[data-theme="dark"] {
    /* Couleurs principales éducatives */
    --color-primary: #60a5fa; /* Bleu éducatif clair */
    --color-primary-hover: #3b82f6; /* Bleu plus vif */
    --color-primary-light: rgba(96, 165, 250, 0.15); /* Bleu transparent */
    --color-primary-dark: #1e40af; /* Bleu foncé */
    
    /* Couleurs secondaires */
    --color-secondary: #94a3b8; /* Gris clair */
    --color-secondary-hover: #64748b;
    --color-secondary-light: rgba(148, 163, 184, 0.1);
    
    /* Couleurs d'état */
    --color-success: #34d399; /* Vert éducatif clair */
    --color-success-hover: #10b981;
    --color-success-light: rgba(52, 211, 153, 0.15);
    
    --color-warning: #fbbf24; /* Orange éducatif clair */
    --color-warning-hover: #f59e0b;
    --color-warning-light: rgba(251, 191, 36, 0.15);
    
    --color-danger: #f87171; /* Rouge clair */
    --color-danger-hover: #ef4444;
    --color-danger-light: rgba(248, 113, 113, 0.15);
    
    --color-info: #22d3ee; /* Cyan clair */
    --color-info-hover: #06b6d4;
    --color-info-light: rgba(34, 211, 238, 0.15);
    
    /* Texte */
    --color-text-base: #f8fafc; /* Blanc cassé */
    --color-text-muted: #94a3b8; /* Gris clair */
    --color-text-light: #64748b; /* Gris moyen */
    --color-text-on-primary: #0f172a; /* Noir pour contraste */
    --color-text-on-success: #0f172a;
    --color-text-on-warning: #0f172a;
    --color-text-on-danger: #0f172a;
    
    /* Arrière-plans */
    --color-bg-body: rgba(15, 23, 42, 0.95); /* Fond sombre avec transparence */
    --color-bg-card: #1e293b; /* Carte sombre */
    --color-bg-card-hover: #334155; /* Carte hover */
    --color-bg-input: #334155; /* Input sombre */
    --color-bg-input-focus: #475569; /* Input focus */
    
    /* Bordures */
    --color-border: #475569; /* Bordure sombre */
    --color-border-hover: #64748b;
    --color-border-focus: var(--color-primary);
    
    /* Inputs */
    --color-input-bg: var(--color-bg-input);
    --color-input-border: var(--color-border);
    --color-input-focus-border: var(--color-primary);
    --color-input-focus-shadow: rgba(96, 165, 250, 0.3);
    
    /* Liens */
    --color-link: var(--color-primary);
    --color-link-hover: var(--color-primary-hover);
    
    /* Code */
    --color-code-bg: #334155;
    --color-code-text: #f87171;
    
    /* Gradients éducatifs sombres */
    --gradient-primary: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    --gradient-success: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    --gradient-warning: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --gradient-card: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

/* --- Base & Layout Moderne --- */
*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html { 
    font-size: 16px; 
    scroll-behavior: smooth; 
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family-base);
    color: var(--color-text-base);
    background-color: var(--color-bg-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* Animation d'entrée pour les éléments */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
    40%, 43% { transform: translate3d(0, -8px, 0); }
    70% { transform: translate3d(0, -4px, 0); }
    90% { transform: translate3d(0, -2px, 0); }
}

/* Classes d'animation */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* --- Conteneur Principal Moderne --- */
.page-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.main-content { 
    flex-grow: 1; 
    animation: fadeInUp 0.8s ease-out;
}

/* --- En-tête Moderne --- */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 0 3rem;
    margin-bottom: 2rem;
    gap: 2rem;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

.app-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.app-header .logo img { 
    max-height: 120px; 
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: var(--transition-base);
}

.app-header .logo img:hover {
    transform: scale(1.05);
}

.header-title { 
    flex-grow: 1; 
    margin-left: 2rem;
    text-align: left;
}

.header-title h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.header-title .subtitle {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--color-text-muted);
    margin: 0;
    font-weight: 500;
    opacity: 0.9;
}

/* --- Bouton de thème moderne --- */
.theme-toggle {
    margin-left: auto;
    position: relative;
}

.theme-toggle-btn {
    background: var(--gradient-card);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 0.75rem;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.theme-toggle-btn::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;
}

.theme-toggle-btn:hover::before {
    left: 100%;
}

.theme-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.theme-toggle-btn i {
    font-size: 1.5rem;
    color: var(--color-primary);
    transition: var(--transition-base);
}

.theme-toggle-btn:hover i {
    transform: rotate(180deg);
}

/* Actions de l'en-tête */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    white-space: nowrap;
}

.header-actions .btn {
    min-width: auto;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.header-actions .btn-sm {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.header-actions .btn span {
    display: inline;
}

/* Footer avec conteneur adapté */
.footer-content {
    background: var(--gradient-card);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem 2rem;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    text-align: center;
    max-width: fit-content;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out;
}

.footer-content p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .page-container {
        padding: 1rem;
    }
    
    .app-header { 
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .header-title { 
        width: 100%; 
        margin: 0;
        order: 1;
    }
    
    .header-actions { 
        order: 2; 
        margin: 0;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .header-actions .btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .header-actions .btn span {
        display: none;
    }
    
    .header-actions .btn i {
        margin-right: 0;
    }
    
    .app-header .logo img {
        max-height: 100px;
    }
    
    .footer-content {
        padding: 1rem 1.5rem;
        margin: 0 1rem;
    }
}

/* --- Footer Moderne --- */
.app-footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem 0;
    animation: fadeInUp 0.8s ease-out;
}

/* Styles pour les icônes du footer */
.footer-icons {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.linkedin-link,
.website-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    color: var(--color-text-base);
    text-decoration: none;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.linkedin-link:hover,
.website-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.linkedin-link i,
.website-link i {
    font-size: 1.2rem;
}

/* Couleur spécifique pour LinkedIn */
.linkedin-link {
    color: #0077b5;
}

.linkedin-link:hover {
    background: #0077b5;
    color: white;
}

/* Couleur spécifique pour le site web */
.website-link:hover {
    background: var(--color-primary);
    color: white;
}

/* Tailles de logo simples */
.logo-small {
    width: 100px;
    height: 100px;
    object-fit: contain;
    display: block;
    margin: 0 auto 2rem auto;
}

.logo-medium {
    width: 140px;
    height: 140px;
    object-fit: contain;
    display: block;
    margin: 0 auto 2rem auto;
}

.logo-large {
    width: 180px;
    height: 180px;
    object-fit: contain;
    display: block;
    margin: 0 auto 2rem auto;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Cartes Modernes --- */
.card {
    background: var(--gradient-card);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-md);
    padding: 3rem;
    margin-bottom: 3rem;
    transition: var(--transition-base);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary-light);
}

.card h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 2.5rem 0;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    color: var(--color-text-base);
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-border);
    position: relative;
}

.card h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.card h2 .form-icon, 
.card h2 .calendar-icon { 
    color: var(--color-primary);
    font-size: 1.5em;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Cartes spéciales */
.card.card-primary {
    background: var(--gradient-primary);
    color: var(--color-text-on-primary);
    border-color: var(--color-primary-dark);
}

.card.card-primary h2 {
    color: var(--color-text-on-primary);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.card.card-success {
    background: var(--gradient-success);
    color: var(--color-text-on-success);
    border-color: var(--color-success-hover);
}

.card.card-warning {
    background: var(--gradient-warning);
    color: var(--color-text-on-warning);
    border-color: var(--color-warning-hover);
}

/* --- Formulaires Modernes --- */
.form-section { 
    margin-bottom: 3.5rem; 
    padding-bottom: 3rem; 
    border-bottom: 1px solid var(--color-border);
    animation: fadeInUp 0.8s ease-out;
}

.form-section:last-of-type { 
    border-bottom: none; 
    margin-bottom: 0; 
    padding-bottom: 0; 
}

.form-section legend.section-title, 
.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-base);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-border);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.section-title i {
    color: var(--color-primary);
    font-size: 1.2em;
}

fieldset { 
    border: none; 
    padding: 0; 
    margin: 0; 
}

legend { 
    padding: 0; 
}

.form-group { 
    margin-bottom: 2rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text-base);
    transition: var(--transition-base);
}

label i { 
    margin-right: 0.75rem; 
    color: var(--color-primary); 
    width: 1.2em; 
    display: inline-block; 
    text-align: center;
    font-size: 1.1em;
}

.form-control {
    display: block;
    width: 100%;
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-text-base);
    background-color: var(--color-input-bg);
    background-clip: padding-box;
    border: 2px solid var(--color-input-border);
    border-radius: var(--border-radius);
    transition: var(--transition-base);
    position: relative;
}

.form-control:focus {
    color: var(--color-text-base);
    background-color: var(--color-bg-input-focus);
    border-color: var(--color-primary);
    outline: 0;
    box-shadow: 0 0 0 var(--focus-ring-width) var(--color-input-focus-shadow);
    transform: translateY(-2px);
}

.form-control:hover:not(:focus) {
    border-color: var(--color-border-hover);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: var(--color-text-muted);
    opacity: 0.8;
    font-style: italic;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--color-secondary-light);
    opacity: 0.7;
    cursor: not-allowed;
}

.form-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Groupes de formulaires avec icônes */
.form-group-with-icon {
    position: relative;
}

.form-group-with-icon .form-control {
    padding-left: 3.5rem;
}

.form-group-with-icon .form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary);
    font-size: 1.2rem;
    z-index: 2;
    pointer-events: none;
}

/* --- Boutons Modernes avec Animations --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-text-on-primary);
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background: var(--gradient-primary);
    border: 2px solid var(--color-primary);
    padding: 1.25rem 2.5rem;
    border-radius: var(--border-radius-lg);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    min-height: 3.5rem;
}

.btn::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:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-hover);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 var(--focus-ring-width) var(--color-input-focus-shadow);
}

.btn i {
    font-size: 1.2em;
    transition: var(--transition-base);
}

.btn:hover i {
    transform: scale(1.1);
}

/* Variantes de boutons */
.btn-primary {
    background: var(--gradient-primary);
    border-color: var(--color-primary);
    color: var(--color-text-on-primary);
}

.btn-primary:hover {
    background: var(--gradient-primary);
    border-color: var(--color-primary-hover);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--gradient-card);
    border-color: var(--color-secondary);
    color: var(--color-text-base);
}

.btn-secondary:hover {
    background: var(--color-secondary-light);
    border-color: var(--color-secondary-hover);
    color: var(--color-text-base);
}

.btn-success {
    background: var(--gradient-success);
    border-color: var(--color-success);
    color: var(--color-text-on-success);
}

.btn-success:hover {
    background: var(--gradient-success);
    border-color: var(--color-success-hover);
    filter: brightness(1.1);
}

.btn-warning {
    background: var(--gradient-warning);
    border-color: var(--color-warning);
    color: var(--color-text-on-warning);
}

.btn-warning:hover {
    background: var(--gradient-warning);
    border-color: var(--color-warning-hover);
    filter: brightness(1.1);
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-danger) 0%, var(--color-danger-hover) 100%);
    border-color: var(--color-danger);
    color: var(--color-text-on-danger);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--color-danger-hover) 0%, var(--color-danger) 100%);
    border-color: var(--color-danger-hover);
    filter: brightness(1.1);
}

/* Tailles de boutons */
.btn-sm {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    min-height: 2.5rem;
}

.btn-lg {
    padding: 1.5rem 3rem;
    font-size: 1.3rem;
    min-height: 4rem;
    border-radius: var(--border-radius-xl);
}

.btn-xl {
    padding: 2rem 4rem;
    font-size: 1.5rem;
    min-height: 5rem;
    border-radius: var(--border-radius-xl);
}

/* Boutons avec icônes */
.btn-icon {
    padding: 1rem;
    border-radius: 50%;
    min-width: 3.5rem;
    min-height: 3.5rem;
    aspect-ratio: 1;
}

.btn-icon i {
    margin: 0;
    font-size: 1.5rem;
}

/* Boutons de chargement */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-loading .btn-text {
    opacity: 0.7;
}

/* Actions de formulaire */
.form-actions { 
    margin-top: 3.5rem; 
    text-align: right;
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.form-actions .btn {
    min-width: 150px;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
        text-align: center;
    }
    
    .form-actions .btn {
        width: 100%;
        min-width: auto;
    }
}
/* ================================================= */
/* === CORRECTION DÉFINITIVE BOUTONS PIED DE PAGE === */
/* ================================================= */

/* Règle pour le bouton primaire (bleu) dans le footer */
.app-footer .btn-primary,
.app-footer .btn-primary:hover {
    color: var(--color-text-on-primary); /* Texte TOUJOURS blanc */
    text-decoration: none; /* JAMAIS de soulignement */
}

/* Règle pour le bouton secondaire (gris) dans le footer */
.app-footer .btn-secondary,
.app-footer .btn-secondary:hover {
    color: var(--color-text-base); /* Texte TOUJOURS de la couleur de base */
    text-decoration: none; /* JAMAIS de soulignement */
}
/* Style pour la modale de confirmation */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; /* Cachée par défaut */
    align-items: center; justify-content: center;
    z-index: 1050;
}
.modal.open { display: flex; } /* Classe pour l'afficher */
.modal-content {
    background-color: var(--color-bg-card);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
}
.modal-header .modal-title { color: var(--color-danger); }

/* --- Alerts --- */
.alert {
    position: relative;
    padding: 1.2rem 2rem;
    margin-bottom: 2rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: flex; /* NOUVEAU : Active Flexbox */
    align-items: center; /* NOUVEAU : Centre les éléments verticalement */
    gap: 1rem; /* NOUVEAU : Ajoute un espace entre l'icône et le texte */
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-warning {
    color: #85640c;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-icon { margin-right: 1rem; font-size: 1.4rem; vertical-align: middle; } /* Slightly larger */
.alert button.close-alert {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.75rem 1rem;
    color: inherit;
    background: none;
    border: none;
    opacity: 0.8;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.alert button.close-alert:hover { opacity: 1; }

/* --- Grid System (Simple) --- */
.grid {
    display: grid;
    gap: 2rem; /* Increased gap */
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (min-width: 768px) {
    .md\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* --- Type Selector --- */
.type-selector {
    display: flex;
    gap: 1.5rem; /* Increased gap */
    margin-bottom: 2rem; /* Increased margin */
}

.type-card {
    flex: 1;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.75rem; /* Increased padding */
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    outline: none;
}

.type-card:hover, .type-card:focus {
    border-color: var(--color-primary-hover);
    box-shadow: var(--shadow-sm);
}

.type-card.selected {
    border-color: var(--color-success);
    box-shadow: 0 0 0 var(--input-focus-ring-width) rgba(16, 185, 129, 0.35); /* More pronounced focus */
}

.type-icon { font-size: 3rem; margin-bottom: 0.75rem; color: var(--color-primary); } /* Larger and primary color */
.type-name { font-weight: 700; color: var(--color-text-base); margin-bottom: 0.3rem; font-size: 1.2rem; } /* Stronger and larger */
.availability { font-size: 0.95rem; color: var(--color-text-muted); }
.availability .available-count { color: var(--color-success); font-weight: 600; }
.type-card .selected-indicator {
    color: var(--color-success);
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 1.2rem;
}
.type-card .selected-indicator i { vertical-align: middle; }

/* --- Quantity Range --- */
.quantity-group { margin-bottom: 2rem; } /* Increased margin */
.form-range {
    width: 100%;
    height: 1.75rem;
    padding: 0;
    background-color: transparent;
    appearance: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.75rem;
    height: 1.75rem;
    background-color: var(--color-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color var(--transition-base);
}

.form-range::-moz-range-thumb {
    width: 1.75rem;
    height: 1.75rem;
    background-color: var(--color-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color var(--transition-base);
    border: 0;
}

.form-range::-webkit-slider-thumb:hover { background-color: var(--color-primary-hover); }
.form-range::-moz-range-thumb:hover { background-color: var(--color-primary-hover); }

.range-feedback {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 0.3rem;
}

.range-feedback output.range-value {
    font-weight: 700;
    color: var(--color-primary);
    min-width: 2.5em;
    text-align: center;
    display: inline-block;
}

/* --- Time Inputs --- */
.time-inputs {
    display: flex;
    gap: 1rem; /* Increased gap */
    align-items: center;
}

.time-select { flex-grow: 1; }
.time-separator { color: var(--color-text-muted); font-size: 1.2rem; } /* Slightly larger */

/* --- Calendar --- */
#calendarContainer { margin-top: 3rem; } /* Increased margin */
#calendar { position: relative; }
.calendar-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.85); /* Slightly less transparent */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: var(--border-radius-lg);
    z-index: 10;
    color: var(--color-primary); /* Primary color for loader text */
    font-weight: 600;
}

.calendar-loader.hidden { display: none; }

.spinner-large {
    width: 4rem; /* Larger spinner */
    height: 4rem; /* Larger spinner */
    border-radius: 50%;
    border: 0.4rem solid var(--color-border); /* Thicker border */
    border-top-color: var(--color-primary);
    animation: spin 1.2s infinite linear; /* Slightly slower spin */
    margin-bottom: 0.75rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* FullCalendar Overrides (Minimal) */
.fc-header-toolbar { margin-bottom: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; } /* Increased spacing */
.fc-button {
    background-color: var(--color-primary);
    color: var(--color-text-on-primary);
    border: 1px solid var(--color-primary);
    border-radius: var(--border-radius-sm);
    padding: 0.7rem 1.4rem; /* Adjusted padding */
    font-size: 1.05rem;
    cursor: pointer;
    transition: background-color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base); /* Added shadow transition */
}

.fc-button:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    box-shadow: var(--shadow-sm);
}

.fc-button-group > .fc-button:not(:first-child) { border-left-color: var(--color-primary-hover); }

.fc-daygrid-event {
    background-color: var(--color-primary-light);
    border-color: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 600; /* Stronger font weight for events */
    border-radius: var(--border-radius-sm);
    margin: 3px;
    padding: 4px 6px; /* Slightly increased padding */
    cursor: pointer;
    transition: opacity var(--transition-fast), box-shadow var(--transition-fast); /* Added shadow transition */
}

.fc-daygrid-event:hover {
    opacity: 0.95;
    box-shadow: var(--shadow-sm); /* Subtle shadow on event hover */
}

.fc-event-title { font-size: 0.9rem; }

/* --- Action Buttons --- */
.action-buttons {
    display: flex;
    gap: 1.5rem; /* Increased gap */
    margin-top: 3rem; /* Increased margin */
    justify-content: flex-end;
}

/* --- Modal --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.6); /* Slightly darker overlay */
    z-index: 1000;
    display: none;
}

.modal.open { display: flex; justify-content: center; align-items: center; }

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.modal-content {
    background-color: var(--color-bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 3rem; /* Increased padding */
    margin: 2rem;
    width: 90%;
    max-width: 600px; /* Slightly wider modal */
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem; /* Increased margin */
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1.5rem; /* Increased padding */
}

.modal-title {
    font-size: 1.7rem; /* Slightly larger */
    font-weight: 700; /* Stronger font weight */
    color: var(--color-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-title i { color: var(--color-danger); }

.modal-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 2rem; /* Slightly larger */
    cursor: pointer;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.modal-close:hover { opacity: 1; }

.modal-body { margin-bottom: 2rem; } /* Increased margin */
.modal-body p { line-height: 1.7; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem; /* Increased gap */
}

/* --- Utility Classes --- */
.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.code-highlight {
    background-color: var(--color-code-bg);
    color: var(--color-code-text);
    padding: 0.4rem 0.6rem; /* Adjusted padding */
    border-radius: var(--border-radius-sm);
    font-family: monospace;
    font-size: 0.95rem;
}

.error-message {
    color: var(--color-danger);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.spinner {
    border: 2px solid rgba(0, 0, 0, 0.1);
    width: 1.2rem; /* Slightly larger */
    height: 1.2rem; /* Slightly larger */
    border-radius: 50%;
    border-left-color: var(--color-text-on-primary);
    animation: spin 1s infinite linear;
    display: inline-block;
    margin-left: 0.6rem;
    vertical-align: middle;
}

/* --- Responsive Adjustments --- */
@media (max-width: 600px) {
    .form-actions { text-align: left; }
    .form-actions .btn + .btn { margin-left: 0; margin-top: 0.75rem; display: block; width: 100%; } /* Increased margin */
    .type-selector { flex-direction: column; }
}

/* Dans style.css */
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--color-bg-card); /* Use card background */
    border: 1px solid var(--color-border);
    padding: 2rem;
    display: none;
    border-radius: var(--border-radius-lg); /* Larger radius */
    box-shadow: var(--shadow-lg); /* More prominent shadow */
    z-index: 1010; /* Higher than modal overlay */
}

.popup.show {
    display: block;
}

/* --- Quantity Range with Progress Bar --- */
.quantity-group {
    position: relative;
}

.progress-bar-container {
    background-color: var(--color-border);
    border-radius: var(--border-radius-sm);
    height: 0.6rem; /* Slightly thicker */
    margin-top: 0.6rem; /* Increased margin */
    overflow: hidden;
}

.progress-bar {
    background-color: var(--color-primary);
    height: 100%;
    border-radius: var(--border-radius-sm);
    width: 0%;
    transition: width 0.2s ease-in-out;
}
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: background-image 0.3s ease;
    background-image: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)), url('../images/background.jpg');
}

/* Opacité de fond adaptée au thème */
[data-theme="dark"] body::before {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/background.jpg');
}

[data-theme="light"] body::before {
    background-image: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)), url('../images/background.jpg');
}

/* === RESPONSIVE DESIGN === */

/* Tablettes et iPads (768px - 1024px) */
@media (max-width: 1024px) {
    .page-container {
        padding: 1rem;
    }
    
    .app-header {
        padding: 1rem 1.5rem;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .header-title h1 {
        font-size: 1.8rem;
    }
    
    .header-title .subtitle {
        font-size: 0.9rem;
    }
    
    .card {
        padding: 2rem;
        margin-bottom: 2rem;
    }
    
    .customization-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .admin-stats {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .reservations-table-container {
        overflow-x: auto;
    }
    
    .reservations-table {
        min-width: 700px;
    }
}

/* Tablettes portrait (768px - 1023px) */
@media (max-width: 1023px) {
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .header-actions .btn span {
        display: inline;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    .btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    .logo-medium {
        width: 120px;
        height: 120px;
    }
    
    .logo-large {
        width: 150px;
        height: 150px;
    }
}

/* Téléphones paysage (481px - 767px) */
@media (max-width: 767px) {
    .page-container {
        padding: 0.5rem;
    }
    
    .app-header {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .header-title h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .header-title .subtitle {
        font-size: 0.85rem;
    }
    
    .header-actions {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .header-actions .btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
        min-width: auto;
    }
    
    .header-actions .btn span {
        display: none;
    }
    
    .header-actions .btn i {
        margin-right: 0;
    }
    
    .card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        border-radius: var(--border-radius-lg);
    }
    
    .login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .login-title {
        font-size: 1.8rem;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-control {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .customization-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .customization-section {
        padding: 1.5rem;
    }
    
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .stat-card {
        padding: 1.2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .reservations-table-container {
        margin: 0 -0.5rem;
        border-radius: 0;
    }
    
    .reservations-table {
        min-width: 600px;
        font-size: 0.85rem;
    }
    
    .reservations-table th,
    .reservations-table td {
        padding: 0.8rem 0.6rem;
    }
    
    .logo-small {
        width: 80px;
        height: 80px;
    }
    
    .logo-medium {
        width: 100px;
        height: 100px;
    }
    
    .logo-large {
        width: 120px;
        height: 120px;
    }
    
    .footer-icons {
        gap: 0.8rem;
    }
    
    .linkedin-link,
    .website-link {
        width: 35px;
        height: 35px;
    }
    
    .linkedin-link i,
    .website-link i {
        font-size: 1rem;
    }
}

/* Téléphones portrait (320px - 480px) */
@media (max-width: 480px) {
    .page-container {
        padding: 0.25rem;
    }
    
    .app-header {
        padding: 0.8rem;
    }
    
    .header-title h1 {
        font-size: 1.3rem;
    }
    
    .header-title .subtitle {
        font-size: 0.8rem;
    }
    
    .header-actions .btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .login-card {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .form-section {
        padding: 0.8rem;
    }
    
    .form-control {
        padding: 0.7rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .customization-section {
        padding: 1rem;
    }
    
    .customization-section h3 {
        font-size: 1.1rem;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .reservations-table {
        min-width: 500px;
        font-size: 0.8rem;
    }
    
    .reservations-table th,
    .reservations-table td {
        padding: 0.6rem 0.4rem;
    }
    
    .logo-small {
        width: 70px;
        height: 70px;
    }
    
    .logo-medium {
        width: 90px;
        height: 90px;
    }
    
    .logo-large {
        width: 110px;
        height: 110px;
    }
    
    .footer-icons {
        gap: 0.6rem;
    }
    
    .linkedin-link,
    .website-link {
        width: 30px;
        height: 30px;
    }
    
    .linkedin-link i,
    .website-link i {
        font-size: 0.9rem;
    }
    
    .app-footer {
        padding: 1rem 0;
    }
    
    .app-footer p {
        font-size: 0.8rem;
    }
}

/* Très petits écrans (jusqu'à 320px) */
@media (max-width: 320px) {
    .page-container {
        padding: 0.1rem;
    }
    
    .app-header {
        padding: 0.5rem;
    }
    
    .header-title h1 {
        font-size: 1.2rem;
    }
    
    .card {
        padding: 0.8rem;
    }
    
    .login-card {
        padding: 1rem 0.8rem;
        margin: 0.25rem;
    }
    
    .login-title {
        font-size: 1.3rem;
    }
    
    .form-control {
        padding: 0.6rem 0.7rem;
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 0.6rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .logo-small {
        width: 60px;
        height: 60px;
    }
    
    .logo-medium {
        width: 80px;
        height: 80px;
    }
    
    .logo-large {
        width: 100px;
        height: 100px;
    }
}

/* Orientation paysage sur mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .login-container {
        padding: 0.5rem 0;
    }
    
    .login-card {
        padding: 1rem 1.5rem;
        margin: 0.5rem;
    }
    
    .login-title {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    .form-group {
        margin-bottom: 0.8rem;
    }
    
    .form-control {
        padding: 0.6rem 0.8rem;
    }
    
    .btn {
        padding: 0.6rem 0.8rem;
    }
    
    .logo-medium {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }
}

/* Mode sombre responsive */
@media (max-width: 767px) {
    [data-theme="dark"] .card {
        background: var(--gradient-card-dark);
    }
    
    [data-theme="dark"] .login-card {
        background: var(--gradient-card-dark);
    }
    
    [data-theme="dark"] .customization-section {
        background: var(--gradient-card-dark);
    }
}


/* Amélioration de l'accessibilité mobile */
@media (max-width: 767px) {
    .btn:focus,
    .form-control:focus {
        outline: 2px solid var(--color-primary);
        outline-offset: 2px;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
    
    /* Amélioration du contraste sur petits écrans */
    .text-muted {
        color: var(--color-text-primary) !important;
    }
}