/* Variables CSS pour une cohérence */
:root {
    --primary-color: #003366;
    --secondary-color: #D4AF37;
    --accent-color: #8B0000;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --transition: all 0.3s ease;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 0 auto;
}

/* Header et Navigation */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 60px;
    margin-right: 15px;
}

.logo-text h1 {
    font-size: 1.5rem;
    line-height: 1.2;
}

.logo-text span {
    font-size: 0.9rem;
    opacity: 0.8;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

nav ul li a:hover {
    color: var(--secondary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section avec Carousel */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    margin-top: 90px;
}

.carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-item:nth-child(1) {
    background-image: url('../assets/imgs/home.jpg');
}

.carousel-item:nth-child(2) {
    background-image: url('../assets/imgs/6.jpg');
}

.carousel-item:nth-child(3) {
    background-image: url('../assets/imgs/8.jpg');
}

.carousel-item:nth-child(4) {
    background-image: url('../assets/imgs/5.jpg');
}

.carousel-item:nth-child(5) {
    background-image: url('../assets/imgs/4.jpg');
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 51, 102, 0.7), rgba(0, 51, 102, 0.5));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.carousel-controls {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.carousel-dots {
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background-color: white;
    transform: scale(1.2);
}

/* Système LMD */
.lmd-system {
    background-color: white;
    padding: 80px 0;
}

.lmd-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.lmd-intro h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.lmd-intro p {
    font-size: 1.1rem;
    line-height: 1.7;
}

.lmd-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.lmd-card {
    background: linear-gradient(135deg, var(--primary-color), #004080);
    color: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.lmd-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--secondary-color);
}

.lmd-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.lmd-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.lmd-card .duration {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.lmd-card .description {
    font-size: 1rem;
    line-height: 1.6;
}

/* Mot du Recteur */
.rector-message {
    background-color: #f8f9fa;
    padding: 80px 0;
}

.rector-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.rector-photo {
    flex: 1;
    text-align: center;
}

.rector-photo img {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.rector-info {
    flex: 2;
}

.rector-info h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2.2rem;
}

.rector-info .rector-name {
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.rector-info .message {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.rector-signature {
    font-style: italic;
    text-align: right;
    margin-top: 30px;
    font-weight: bold;
    color: var(--primary-color);
}

/* Programmes Section */
.programs {
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.programs-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.programs-container {
    display: flex;
    transition: transform 0.5s ease;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    min-width: 100%;
    flex-shrink: 0;
}

.program-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.program-image {
    height: 200px;
    overflow: hidden;
}

.program-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.program-card:hover .program-image img {
    transform: scale(1.1);
}

.program-content {
    padding: 25px;
}

.program-content h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.program-content p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 20px;
}

.carousel-nav button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.carousel-nav button:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.carousel-nav button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.carousel-dots-programs {
    display: flex;
    gap: 10px;
}

.carousel-dot-programs {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #cccccc;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot-programs.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* À propos Section */
.about {
    background-color: white;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
}

.about-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Section Collation des Grades */
.graduation-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
    position: relative;
}

.graduation-section .section-title {
    text-align: center;
    margin-bottom: 60px;
}

.graduation-section .section-title h2 {
    color: #003366;
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
}

.graduation-section .section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: #D4AF37;
}

.graduation-section .section-title p {
    color: #666;
    font-size: 1.2rem;
    margin-top: 20px;
}

.graduation-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* Partie Texte */
.graduation-text h3 {
    color: #003366;
    font-size: 1.8rem;
    margin-bottom: 25px;
    line-height: 1.3;
}

.graduation-text > p {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 40px;
}

/* Features */
.graduation-features {
    margin-bottom: 40px;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature i {
    color: #D4AF37;
    font-size: 1.8rem;
    margin-top: 5px;
    flex-shrink: 0;
}

.feature h4 {
    color: #003366;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.feature p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Informations de la cérémonie */
.graduation-info {
    background: #003366;
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-top: 30px;
}

.graduation-info h4 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    text-align: center;
    color: #D4AF37;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-item i {
    color: #D4AF37;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-item strong {
    display: block;
    color: #D4AF37;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.info-item p {
    margin: 0;
    font-size: 1rem;
    color: white;
}

/* Partie Vidéo */
.graduation-video {
    position: relative;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-caption {
    margin-top: 20px;
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.video-caption p {
    color: #003366;
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.video-caption i {
    color: #D4AF37;
    font-size: 1.2rem;
}

/* Actualités Section */
.news {
    background-color: white;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
}

.news-date {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.news-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Galerie Section */
.gallery {
    background-color: #f8f9fa;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    height: 250px;
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 51, 102, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
}

/* Contact Section */
.contact {
    background-color: white;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.contact-item i {
    color: var(--secondary-color);
    margin-right: 15px;
    font-size: 1.2rem;
    margin-top: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-col p {
    margin-bottom: 15px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .about-content, .rector-container {
        flex-direction: column;
    }
    
    .rector-photo {
        margin-bottom: 30px;
    }
    
    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .graduation-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .graduation-section .section-title h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu {
        display: block;
    }

    nav {
        position: fixed;
        top: 90px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 90px);
        background-color: var(--primary-color);
        transition: var(--transition);
        z-index: 999;
    }

    nav.active {
        left: 0;
    }

    nav ul {
        flex-direction: column;
        padding: 30px;
    }

    nav ul li {
        margin: 0 0 20px 0;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .section-title h2 {
        font-size: 2rem;
    }
    
    .programs-grid {
        grid-template-columns: 1fr;
    }
    
    .graduation-section {
        padding: 60px 0;
    }
    
    .graduation-section .section-title h2 {
        font-size: 2rem;
    }
    
    .graduation-text h3 {
        font-size: 1.6rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .feature {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .video-caption p {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .lmd-cards {
        grid-template-columns: 1fr;
    }
    
    .graduation-section .section-title h2 {
        font-size: 1.8rem;
    }
    
    .graduation-text h3 {
        font-size: 1.4rem;
    }
    
    .graduation-info {
        padding: 20px;
    }
}

/* Styles pour le bouton de connexion dans la navigation */
.login-item {
    margin-left: 20px;
}

.btn-login {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
}

/* Responsive */
@media (max-width: 768px) {
    .login-item {
        margin-left: 0;
        margin-top: 10px;
        text-align: center;
    }
    
    .btn-login {
        justify-content: center;
        padding: 12px 20px;
    }
}