/**
 * Styles personnalisés pour l'application de gestion des événements
 * ENSA Béni Mellal
 */

:root {
    --primary-color: #273272;
    --secondary-color: #3d4a8f;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gradient-primary: linear-gradient(135deg, #273272 0%, #3d4a8f 100%);
    --gradient-light: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gradient-light);
    color: var(--dark-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* === BUTTONS === */
.btn {
    border-radius: var(--border-radius);
    padding: 12px 30px;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    text-transform: none;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #1e2654 0%, #2f3870 100%);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn i {
    margin-right: 8px;
}

/* === CARDS === */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
    background: white;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    border: none;
}

.card-body {
    padding: 1.5rem;
}

/* === FORMS === */
.form-label {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f8f9fa;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(39, 50, 114, 0.15);
    background-color: white;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: var(--success-color);
}

.invalid-feedback,
.valid-feedback {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
    border: 2px solid #d0d0d0;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    margin-left: 0.5rem;
    cursor: pointer;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* === HOMEPAGE === */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    padding: 2rem 1rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.7;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 900px;
    width: 100%;
    padding: 0 1rem;
}

.logo-container {
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease;
}

.logo-wrapper {
    margin: 0 auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(39,50,114,0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 55px;
    max-width: fit-content;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(39,50,114,0.2);
}

.hero-logo {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.logo-placeholder {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
}

.logo-placeholder i {
    font-size: 4rem;
    color: var(--primary-color);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease 0.2s both;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    font-weight: 300;
    animation: fadeInUp 1s ease 0.4s both;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-btn {
    min-width: 250px;
    padding: 18px 40px;
    font-size: 1.1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.hero-btn-primary {
    background: white;
    color: var(--primary-color);
}

.hero-btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    background: #f8f9fa;
}

.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* === LOGIN PAGE === */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    max-width: 450px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-md);
}

.login-icon i {
    font-size: 2.5rem;
    color: white;
}

/* === DASHBOARD === */
.dashboard-container {
    flex: 1;
    padding: 2rem 0;
}

.dashboard-header {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.dashboard-title {
    margin: 0;
    font-size: 2rem;
}

.stats-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stats-card.success {
    border-left-color: var(--success-color);
}

.stats-card.warning {
    border-left-color: var(--warning-color);
}

.stats-card.info {
    border-left-color: var(--info-color);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.stats-label {
    color: #6c757d;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.stats-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

/* === TABLE === */
.table-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.table {
    margin: 0;
}

.table thead th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem;
    white-space: nowrap;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

/* === BADGES === */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 50px;
    font-size: 0.85rem;
}

/* === NAVBAR === */
.navbar-custom {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
}

.navbar-custom .navbar-brand {
    color: white;
    font-weight: 600;
    font-size: 1.3rem;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0.5rem;
    transition: var(--transition);
}

.navbar-custom .nav-link:hover {
    color: white;
    transform: translateY(-2px);
}

/* === FOOTER === */
.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    margin-top: auto;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.footer-title {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.footer-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-link:hover {
    color: white;
    transform: translateX(3px);
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.2);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.social-links a {
    transition: var(--transition);
    opacity: 0.8;
}

.social-links a:hover {
    opacity: 1;
    transform: translateY(-3px);
}

/* === ALERTS === */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-sm);
    padding: 1rem 1.5rem;
}

/* === LOADING SPINNER === */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
    color: var(--primary-color);
}

/* === ANIMATIONS === */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hero-section {
        min-height: 100vh;
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .logo-wrapper {
        height: 50px;
        padding: 0.4rem 0.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .hero-btn {
        min-width: 100%;
        padding: 14px 30px;
        font-size: 1rem;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .footer {
        padding: 2rem 0;
    }
    
    .footer .col-lg-4 {
        margin-bottom: 1.5rem;
    }
    
    .footer .col-lg-4:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .logo-wrapper {
        height: 45px;
        padding: 0.35rem 0.7rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .hero-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}

/* === ACCESSIBILITY === */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* === UTILITIES === */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background: var(--gradient-primary) !important;
}

.shadow-custom {
    box-shadow: var(--shadow-md) !important;
}

.rounded-custom {
    border-radius: var(--border-radius) !important;
}

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* === CUSTOM ALERTS === */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 1.25rem 1.5rem;
    font-size: 0.95rem;
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert strong {
    font-weight: 600;
}

.alert .btn-close {
    opacity: 0.5;
    transition: opacity 0.3s;
}

.alert .btn-close:hover {
    opacity: 1;
}

