/* SIRH Pro - Styles CSS */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    min-height: 100vh;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 0 40px rgba(245, 158, 11, 0.6); }
}

/* Landing Page */
.landing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.landing-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
    top: -250px;
    right: -250px;
    animation: float 6s ease-in-out infinite;
}

.landing-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    bottom: -200px;
    left: -200px;
    animation: float 8s ease-in-out infinite;
}

/* Landing Header */
.landing-header {
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: white;
    animation: glow 3s ease-in-out infinite;
}

.logo-text h1 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.logo-text p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    font-family: 'Space Mono', monospace;
}

.landing-nav {
    display: flex;
    gap: 16px;
}

/* Hero Section */
.hero-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 40px;
    position: relative;
    z-index: 10;
}

.hero-badge {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    color: #f59e0b;
    font-weight: 600;
    margin-bottom: 24px;
    animation: slideIn 0.6s ease-out;
}

.hero-title {
    font-size: 72px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: slideIn 0.8s ease-out;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
}

.hero-subtitle {
    font-size: 24px;
    color: #94a3b8;
    max-width: 700px;
    margin-bottom: 48px;
    line-height: 1.6;
    animation: slideIn 1s ease-out;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    animation: slideIn 1.2s ease-out;
}

/* Buttons */
.btn {
    padding: 16px 40px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 20px;
    padding: 18px 48px;
}

.btn-secondary {
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.btn-outline {
    background: transparent;
    color: #f59e0b;
    border: 2px solid #f59e0b;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-link {
    background: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
    margin-top: 12px;
}

/* Features Section */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.feature-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: #f59e0b;
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.8);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-title {
    font-size: 20px;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 12px;
}

.feature-description {
    font-size: 15px;
    color: #94a3b8;
    line-height: 1.6;
}

/* Auth Container */
.auth-container {
    display: none;
    justify-content: center;
    align-items: flex-start; /* CHANGÉ: permet scroll */
    min-height: 100vh;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    overflow-y: auto; /* AJOUTÉ: permet scroll ! */
}

.auth-container.active {
    display: flex;
}

.auth-box {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    animation: slideIn 0.5s ease-out;
    position: relative;
    margin: auto; /* AJOUTÉ: centrage */
    max-height: none; /* AJOUTÉ: hauteur flexible */
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: bold;
    color: white;
    margin: 0 auto 16px;
}

.auth-title {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: #64748b;
    font-size: 14px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #f1f5f9;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.5);
    color: #e2e8f0;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #f59e0b;
    background: rgba(15, 23, 42, 0.7);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Demo Banner */
.demo-banner {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 12px 40px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.demo-banner.active {
    display: flex;
}

.demo-banner button {
    background: white;
    color: #f59e0b;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.demo-banner button:hover {
    transform: scale(1.05);
}

/* Main App Container */
.app-container {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.app-container.active {
    display: block;
}

/* App Header */
.header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    padding: 20px 40px;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.header-title h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.header-title p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    font-family: 'Space Mono', monospace;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    text-align: right;
}

.user-name {
    font-weight: 600;
    color: #f59e0b;
}

.user-email {
    font-size: 12px;
    color: #64748b;
}

.user-role {
    font-size: 11px;
    color: #f59e0b;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 2px;
}

.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-admin {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.role-manager {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.role-employee {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

.btn-logout {
    padding: 10px 20px;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

/* Navigation */
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 40px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 24px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    background: rgba(30, 41, 59, 0.9);
    color: #f59e0b;
    border-color: #f59e0b;
}

.nav-btn.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-color: #f59e0b;
}

/* Content Container */
.content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px 40px;
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.view-header h2 {
    font-size: 32px;
    font-weight: 600;
    margin: 0;
}

/* Cards */
.card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    padding: 24px;
    animation: slideIn 0.5s ease-out;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(148, 163, 184, 0.3);
    transform: translateY(-2px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    padding: 24px;
    animation: slideIn 0.5s ease-out;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
}

.stat-label {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.stat-value {
    font-size: 40px;
    font-weight: 700;
    color: #f59e0b;
}

.stat-icon {
    width: 40px;
    height: 40px;
    opacity: 0.3;
}

.stat-footer {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

th {
    color: #f59e0b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: rgba(148, 163, 184, 0.05);
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-pending {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.status-approved {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: flex-start; /* CHANGÉ: permet scroll du modal */
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    padding: 20px; /* AJOUTÉ: espacement mobile */
    overflow-y: auto; /* AJOUTÉ: permet scroll du conteneur */
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #1e293b;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 100%; /* CHANGÉ: 90% → 100% */
    border: 1px solid rgba(148, 163, 184, 0.2);
    animation: slideIn 0.3s ease-out;
    max-height: none; /* CHANGÉ: permet hauteur flexible */
    overflow-y: visible; /* CHANGÉ: pas de double scroll */
    margin: auto; /* AJOUTÉ: centrage */
}

.modal-header {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Action Buttons */
.btn-add {
    padding: 12px 24px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.btn-icon {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-icon:hover {
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-edit {
    background: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}

/* Utility Classes */
.empty-state {
    text-align: center;
    color: #64748b;
    padding: 60px 20px;
    font-size: 16px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.list-item {
    padding: 12px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
    margin-bottom: 12px;
}

.list-item-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.list-item-subtitle {
    font-size: 13px;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 42px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .features-section {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .nav-container {
        padding: 20px;
    }

    .content-container {
        padding: 0 20px 20px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 12px 8px;
    }
}

/* Custom Alert/Confirm Modal */
.custom-alert-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.custom-alert-overlay.active {
    display: flex;
}

.custom-alert-box {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideInDown 0.3s ease;
}

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

.custom-alert-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
}

.custom-alert-icon.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.custom-alert-icon.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.custom-alert-icon.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.custom-alert-icon.info {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.custom-alert-title {
    font-size: 24px;
    font-weight: 700;
    color: #e2e8f0;
    text-align: center;
    margin-bottom: 12px;
}

.custom-alert-message {
    font-size: 16px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 24px;
}

.custom-alert-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.custom-alert-btn {
    padding: 12px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.custom-alert-btn.primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.custom-alert-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.custom-alert-btn.secondary {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.custom-alert-btn.secondary:hover {
    background: rgba(148, 163, 184, 0.2);
}

.custom-alert-btn.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.custom-alert-btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

/* Share Modal */
.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.share-btn {
    padding: 16px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
}

.share-btn:hover {
    background: rgba(148, 163, 184, 0.2);
    transform: translateY(-2px);
}

.share-btn .icon {
    font-size: 24px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(148, 163, 184, 0.3);
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.settings-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Footer */
.app-footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    padding: 20px 40px;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-left, .footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-separator {
    color: #475569;
}

.footer-text {
    font-size: 14px;
    color: #94a3b8;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.footer-link:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.footer-author {
    font-size: 14px;
    font-weight: 600;
    color: #3b82f6;
}

.footer-icon {
    font-size: 16px;
}

@media (max-width: 768px) {
    .app-footer {
        padding: 16px 20px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-left, .footer-right {
        justify-content: center;
    }
}
/* ==================== ALTERNANTS STYLES ==================== */

/* Stats Grid for Alternants */
.stats-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 8px;
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Badges for Status */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #16a34a;
}

.badge-info {
    background: #dbeafe;
    color: #2563eb;
}

/* Calendar Styles */
#calendarGrid {
    margin-top: 20px;
}

#calendarGrid > div:first-child,
#calendarGrid > div:nth-child(2),
#calendarGrid > div:nth-child(3),
#calendarGrid > div:nth-child(4),
#calendarGrid > div:nth-child(5),
#calendarGrid > div:nth-child(6),
#calendarGrid > div:nth-child(7) {
    font-weight: 600;
    color: #64748b;
}

/* Form Group Spacing for Alternants */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #f1f5f9;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ══════════════════════════════════════════════════════════════
   CORRECTIONS RESPONSIVE MOBILE - MODAL SCROLL
   ══════════════════════════════════════════════════════════════ */

/* Amélioration scroll modal */
.modal::-webkit-scrollbar {
    width: 10px;
}

.modal::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.modal::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.6);
    border-radius: 5px;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
        align-items: flex-start !important;
    }
    
    .modal-content {
        width: 100%;
        padding: 24px 20px;
        margin-top: 10px;
        max-height: none;
    }
    
    .modal-header {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-footer button {
        width: 100%;
    }
    
    /* Form inputs */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Éviter zoom iOS */
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 5px;
    }
    
    .modal-content {
        padding: 20px 16px;
    }
}

/* ══════════════════════════════════════════════════════════════
   CORRECTIONS RESPONSIVE - FENÊTRE CONNEXION/INSCRIPTION
   ══════════════════════════════════════════════════════════════ */

/* Scroll bars personnalisées pour auth-container */
.auth-container::-webkit-scrollbar {
    width: 10px;
}

.auth-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.auth-container::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.6);
    border-radius: 5px;
}

.auth-container::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 158, 11, 0.8);
}

/* MOBILE RESPONSIVE pour auth-box */
@media (max-width: 768px) {
    .auth-container {
        padding: 10px;
        align-items: flex-start !important;
    }
    
    .auth-box {
        max-width: 100%;
        padding: 30px 20px;
        margin-top: 10px;
        margin-bottom: 10px;
    }
    
    .auth-logo {
        width: 60px;
        height: 60px;
        font-size: 32px;
        margin-bottom: 12px;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .auth-subtitle {
        font-size: 13px;
    }
    
    .close-btn {
        width: 36px;
        height: 36px;
        font-size: 24px;
        top: 15px;
        right: 15px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-group input,
    .form-group select {
        padding: 12px;
        font-size: 16px; /* Éviter zoom iOS */
    }
    
    .btn {
        padding: 14px 32px;
        font-size: 16px;
    }
    
    .btn-primary {
        padding: 16px 40px;
        font-size: 18px;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .auth-container {
        padding: 5px;
    }
    
    .auth-box {
        padding: 24px 16px;
        border-radius: 16px;
    }
    
    .auth-title {
        font-size: 22px;
    }
    
    .auth-logo {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
}

/* Amélioration responsive général */
@media (max-width: 768px) {
    /* Hero section */
    .hero-title {
        font-size: 36px !important;
    }
    
    .hero-subtitle {
        font-size: 16px !important;
    }
    
    .hero-section {
        padding: 40px 20px;
    }
    
    /* Landing header */
    .landing-header {
        padding: 20px;
        flex-direction: column;
        gap: 16px;
    }
    
    .logo-text h1 {
        font-size: 24px;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
    
    /* Features */
    .features-section {
        padding: 20px;
        gap: 16px;
    }
    
    .feature-card {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px !important;
    }
    
    .hero-subtitle {
        font-size: 15px !important;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    .btn-primary {
        padding: 14px 32px;
        font-size: 17px;
    }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE COMPLET - TABLEAUX, CALENDRIER, NAVIGATION
   ══════════════════════════════════════════════════════════════ */

/* TABLEAUX RESPONSIVE - MODE CARTE SUR MOBILE */
@media (max-width: 968px) {
    /* Cacher SEULEMENT le header du tableau */
    table thead {
        display: none;
    }
    
    /* Garder la table visible mais modifier son affichage */
    table {
        display: block;
        width: 100%;
    }
    
    table tbody {
        display: block;
        width: 100%;
    }
    
    /* Afficher les données en mode carte */
    tbody tr {
        display: block !important;
        background: rgba(15, 23, 42, 0.6);
        border: 1px solid rgba(148, 163, 184, 0.2);
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 12px;
    }
    
    tbody tr:hover {
        background: rgba(15, 23, 42, 0.8);
        border-color: rgba(245, 158, 11, 0.5);
    }
    
    tbody td {
        display: block !important;
        padding: 8px 0 !important;
        border: none !important;
        text-align: left !important;
    }
    
    tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #f59e0b;
        display: block;
        font-size: 11px;
        text-transform: uppercase;
        margin-bottom: 4px;
        letter-spacing: 1px;
    }
    
    /* Actions en bas de la carte */
    tbody td:last-child {
        border-top: 1px solid rgba(148, 163, 184, 0.1);
        padding-top: 12px !important;
        margin-top: 8px;
        display: flex !important;
        gap: 8px;
        flex-wrap: wrap;
    }
}

/* NAVIGATION RESPONSIVE */
@media (max-width: 968px) {
    .nav-container {
        overflow-x: auto;
        padding: 16px 20px;
        display: flex;
        gap: 12px;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .nav-container::-webkit-scrollbar {
        height: 4px;
    }
    
    .nav-container::-webkit-scrollbar-track {
        background: rgba(148, 163, 184, 0.1);
    }
    
    .nav-container::-webkit-scrollbar-thumb {
        background: rgba(245, 158, 11, 0.5);
        border-radius: 2px;
    }
    
    .nav-btn {
        white-space: nowrap;
        padding: 10px 20px;
        font-size: 14px;
        min-width: auto;
    }
    
    .nav-btn span:first-child {
        font-size: 16px;
    }
}

/* CALENDRIER ALTERNANTS RESPONSIVE */
@media (max-width: 968px) {
    #calendarGrid {
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 4px !important;
        font-size: 12px;
    }
    
    #calendarGrid > div {
        padding: 8px 4px !important;
        font-size: 12px !important;
        border-radius: 6px !important;
    }
    
    /* Légende du calendrier */
    #alternantCalendar > div:nth-child(3) {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    /* Contrôles mois précédent/suivant */
    #alternantCalendar > div:first-child {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    #alternantCalendar > div:first-child button {
        width: 100%;
    }
    
    #calendarMonth {
        font-size: 18px !important;
    }
    
    /* Info "Cliquez sur un jour" */
    #alternantCalendar > div[style*="background: #eff6ff"] {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    #alternantCalendar > div[style*="background: #eff6ff"] button {
        width: 100%;
        margin-top: 8px;
    }
}

/* STATS GRID RESPONSIVE */
@media (max-width: 968px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .stat-card {
        padding: 20px !important;
    }
    
    .stat-value {
        font-size: 32px !important;
    }
}

/* VIEW HEADER RESPONSIVE */
@media (max-width: 968px) {
    .view-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px;
    }
    
    .view-header h2 {
        font-size: 24px !important;
    }
    
    .view-header > div {
        width: 100%;
        flex-direction: column !important;
    }
    
    .view-header button {
        width: 100%;
    }
}

/* BOUTONS RESPONSIVE */
@media (max-width: 968px) {
    .btn-add {
        width: 100%;
        justify-content: center;
    }
    
    .btn-success {
        width: 100%;
        justify-content: center;
    }
}

/* GRID-2 RESPONSIVE */
@media (max-width: 968px) {
    .grid-2 {
        grid-template-columns: 1fr !important;
    }
}

/* HEADER RESPONSIVE */
@media (max-width: 968px) {
    .header {
        padding: 16px 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .header-right {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-info {
        text-align: left;
        width: 100%;
    }
    
    .btn-logout {
        width: 100%;
    }
}

/* CONTENT CONTAINER RESPONSIVE */
@media (max-width: 968px) {
    .content-container {
        padding: 0 16px 20px;
    }
}

/* MODAL RESPONSIVE */
@media (max-width: 968px) {
    .modal-content {
        margin: 10px;
    }
    
    .modal-header {
        font-size: 20px !important;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer button {
        width: 100%;
    }
}

/* TRÈS PETITS ÉCRANS */
@media (max-width: 480px) {
    #calendarGrid {
        gap: 2px !important;
    }
    
    #calendarGrid > div {
        padding: 6px 2px !important;
        font-size: 11px !important;
    }
    
    .stat-value {
        font-size: 28px !important;
    }
    
    .view-header h2 {
        font-size: 20px !important;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* SELECT ALTERNANT RESPONSIVE */
@media (max-width: 968px) {
    #selectedAlternant {
        font-size: 16px !important;
        padding: 14px !important;
    }
}

/* ALTERNANTS TABLE RESPONSIVE */
@media (max-width: 968px) {
    #alternantsTableBody tr {
        display: block;
        background: rgba(15, 23, 42, 0.6);
        border: 1px solid rgba(148, 163, 184, 0.2);
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 12px;
    }
    
    #alternantsTableBody td {
        display: block;
        padding: 8px 0;
        border: none;
    }
    
    #alternantsTableBody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #f59e0b;
        display: block;
        font-size: 11px;
        text-transform: uppercase;
        margin-bottom: 4px;
    }
}
