/* ============================================
   STYLE PRINCIPAL - Faculté de Médecine UCC
   Palette: Rouge (#8B0000), Or (#D4AF37), Blanc (#FFFFFF)
   ============================================ */

/* Variables CSS (déjà définies dans header.php) */
:root {
    --color-primary: #8B0000;
    --color-secondary: #D4AF37;
    --color-white: #FFFFFF;
    --color-dark: #333333;
    --color-light: #f8f9fa;
    --color-gray: #6c757d;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typographie */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    position: relative;
    padding-bottom: 10px;
}

h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--color-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2:after {
    left: 50%;
    transform: translateX(-50%);
}

p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.lead {
    font-size: 1.2rem;
    font-weight: 300;
}

/* Boutons */
.btn {
    border-radius: 4px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: #6a0000;
    border-color: #6a0000;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-primary);
}

.btn-secondary:hover {
    background-color: #b8941f;
    border-color: #b8941f;
    color: var(--color-primary);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline-primary:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-gold {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    color: white;
    font-weight: 600;
}

.btn-gold:hover {
    background-color: #b8941f;
    border-color: #b8941f;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.3);
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    margin: 0 0.2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-nav .nav-link.active {
    background-color: rgba(212, 175, 55, 0.2);
    color: var(--color-secondary) !important;
}

/* Cartes */
.card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    border-bottom: none;
    font-weight: 600;
}

.card-title {
    color: var(--color-primary);
    font-weight: 600;
}

/* Liens rapides */
.quick-link-card {
    display: block;
    text-decoration: none;
    color: var(--color-dark);
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.quick-link-card:hover {
    transform: translateY(-5px);
    color: var(--color-primary);
    background-color: var(--color-light);
}

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.quick-link-card:hover .icon-circle {
    transform: scale(1.1);
}

/* Footer */
footer {
    background-color: var(--color-dark);
}

footer h5 {
    color: var(--color-secondary);
    font-weight: 600;
}

footer a {
    color: var(--color-white);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--color-secondary);
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--color-secondary) !important;
    border-color: var(--color-secondary) !important;
    transform: translateY(-3px);
}

/* Formulaire */
.form-control, .form-select {
    border-radius: 4px;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.25rem rgba(139, 0, 0, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

/* Tableaux */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 1rem;
    font-weight: 500;
}

.table tbody tr {
    transition: background-color 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(139, 0, 0, 0.05);
}

.table td, .table th {
    vertical-align: middle;
    padding: 1rem;
    border: 1px solid #dee2e6;
}

/* Badges */
.badge {
    padding: 0.4em 0.8em;
    font-weight: 500;
    border-radius: 20px;
}

.badge-primary {
    background-color: var(--color-primary);
}

.badge-secondary {
    background-color: var(--color-secondary);
}

/* Alertes */
.alert {
    border: none;
    border-radius: 4px;
    padding: 1rem 1.5rem;
}

/* Pagination */
.pagination .page-link {
    color: var(--color-primary);
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.pagination .page-link:hover {
    background-color: rgba(139, 0, 0, 0.1);
    color: var(--color-white);
}

/* Vidéo */
.video-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.video-container video {
    width: 100%;
    height: auto;
}

/* Membres équipe */
.member-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    height: 100%;
}

.member-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--color-secondary);
}

.member-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-secondary);
    margin: 0 auto 1rem;
    padding: 5px;
    background-color: white;
}

.member-name {
    color: var(--color-white);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.member-position {
    color: var(--color-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
    font-style: italic;
}

.member-slogan {
    font-style: italic;
    color: var(--color-gray);
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Documents */
.document-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--color-dark);
}

.document-card:hover {
    border-color: var(--color-white);
    background-color: rgba(139, 0, 0, 0.05);
    transform: translateX(5px);
    text-decoration: none;
    color: var(--color-dark);
}

.document-icon {
    font-size: 2rem;
    margin-right: 1rem;
    min-width: 50px;
    text-align: center;
}

.document-info {
    flex-grow: 1;
}

.document-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.document-meta {
    font-size: 0.875rem;
    color: var(--color-gray);
}

/* Structure */
.structure-card {
    padding: 1.5rem;
    border-radius: 8px;
    background: white;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    height: 100%;
}

.structure-card:hover {
    border-color: var(--color-secondary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.structure-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 8px;
    padding: 10px;
    background-color: var(--color-light);
}

/* Code d'accès */
.access-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.access-code-input {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-align: center;
}

/* Dashboard admin */
.admin-stats-card {
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    color: white;
    transition: all 0.3s ease;
}

.admin-stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.stats-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Utilitaires */
.bg-light-custom {
    background-color: var(--color-light);
}

.shadow-sm {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.shadow-md {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.shadow-lg {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
}

.rounded-lg {
    border-radius: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .member-photo {
        width: 120px;
        height: 120px;
    }
    
    .hero-section {
        padding: 60px 0 !important;
        text-align: center;
    }
    
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        margin: 0.2rem 0;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
    }
    
    .d-flex.gap-3 .btn {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Page de connexion admin */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, #6a0000 100%);
    padding: 2rem;
}

.login-box {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo .logo-circle {
    width: 80px;
    height: 80px;
    background-color: var(--color-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.login-logo .logo-circle span {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.login-title {
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}