/*
 * Styles personnalisés pour Synap's+
 * Utilise Bootstrap 5 comme base
 */

/* Variables CSS personnalisées */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Général */
body {
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar personnalisée */
.navbar {
    padding: 1rem 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-brand img {
    max-height: 45px;
    width: auto;
}

/* Fallback si le logo n'existe pas */
.navbar-brand img[src=""],
.navbar-brand img:not([src]),
.navbar-brand img[alt]:not([src]) {
    display: none;
}

.navbar-nav .nav-link {
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.navbar-nav .btn {
    padding: 0.5rem 1.5rem;
}

/* Cards personnalisées */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    padding: 1.25rem;
    font-weight: 600;
}

/* Boutons personnalisés */
.btn {
    border-radius: 5px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border: none;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    color: white;
    padding: 120px 0;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-section::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 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,128C1248,117,1344,107,1392,101.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.5;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.hero-section p.lead {
    font-size: 1.35rem;
    margin-bottom: 2rem;
    position: relative;
    opacity: 0.95;
    font-weight: 300;
}

.hero-section .btn-light {
    background: white;
    color: #6366f1;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.hero-section .btn-outline-light {
    border: 2px solid white;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
}

.hero-section .btn-outline-light:hover {
    background: white;
    color: #6366f1;
}

/* Stats Section */
.stats-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.stats-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stats-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stats-card p {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* Pricing Cards */
.pricing-card {
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.pricing-card:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.pricing-card.featured {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.2);
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

.pricing-card .price small {
    font-size: 1rem;
    color: var(--secondary-color);
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.pricing-card ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.pricing-card ul li i {
    color: var(--success-color);
    margin-right: 0.5rem;
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.dashboard-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.dashboard-stat-icon.primary { background: var(--primary-color); }
.dashboard-stat-icon.success { background: var(--success-color); }
.dashboard-stat-icon.warning { background: var(--warning-color); }
.dashboard-stat-icon.danger { background: var(--danger-color); }
.dashboard-stat-icon.info { background: var(--info-color); }

.dashboard-stat-info h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.dashboard-stat-info p {
    margin: 0;
    color: var(--secondary-color);
}

/* Progress Bars personnalisées */
.progress {
    height: 25px;
    border-radius: 10px;
}

.progress-bar {
    border-radius: 10px;
    font-weight: 600;
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background: var(--primary-color);
    color: white;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
    cursor: pointer;
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 5px;
}

/* Forms */
.form-control, .form-select {
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Alerts personnalisées */
.alert {
    border-radius: 10px;
    border: none;
}

/* Sidebar pour l'espace étudiant/admin */
.sidebar {
    background: white;
    min-height: calc(100vh - 56px);
    padding: 2rem 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar .nav-link {
    color: var(--dark-color);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin: 0.25rem 1rem;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* Exam Mode (détection curseur sortie) */
.exam-mode-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--danger-color);
    color: white;
    padding: 1rem;
    text-align: center;
    z-index: 9999;
    display: none;
}

.exam-mode-warning.show {
    display: block;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Timer pour examens */
.exam-timer {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    font-size: 1.5rem;
    font-weight: 700;
    z-index: 1000;
}

.exam-timer.warning {
    background: var(--warning-color);
    color: white;
}

.exam-timer.danger {
    background: var(--danger-color);
    color: white;
    animation: pulse 1s infinite;
}

/* Calendar personnalisé */
.calendar-event {
    padding: 0.5rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-event:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* Footer personnalisé */
footer {
    margin-top: auto;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .stats-card h3 {
        font-size: 2rem;
    }

    .pricing-card {
        margin-bottom: 2rem;
    }

    .sidebar {
        min-height: auto;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.border-radius-custom {
    border-radius: 15px;
}
