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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    transition: background 0.3s, color 0.3s;
    max-width: 100%;
    overflow-x: hidden;
}

/* Thèmes clair et sombre */
:root {
    --bg-color: #f9f9f9;
    --text-color: #333;
    --header-bg: linear-gradient(135deg, #ff0000, #b71c1c);
    --nav-bg: #fff;
    --dropdown-bg: #fff;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #f1f1f1;
    --header-bg: #333;
    --nav-bg: #444;
    --dropdown-bg: #555;
}

/* Header */
.main-header {
    background: var(--header-bg);
    color: #fff;
    padding: 15px 0;
    width: 100%;
}

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

/* Supprime le style des liens dans le logo */
.logo {
    text-decoration: none; /* Supprime le soulignement */
    display: flex;
    align-items: center;
    gap: 1rem;
    color: inherit; /* Hérite la couleur par défaut du parent */
}

.logo img {
    width: 150px; /* Ajuste cette valeur selon la taille souhaitée */
    height: auto;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.2));
}

/* Supprime le bleu et le soulignement du lien */
.logo a {
    text-decoration: none; /* Supprime le soulignement */
    color: inherit; /* Hérite la couleur naturelle */
    display: flex;
    align-items: center;
}

/* Applique la bonne couleur au texte */
.logo-text h1, 
.logo-text p {
    color: var(--primary); /* Utilise la couleur définie */
    text-decoration: none; /* Supprime le soulignement */
}

a {
    position: relative; /* Nécessaire pour les pseudo-éléments */
    text-decoration: none; /* Supprime le soulignement par défaut */
    color: var(--primary);
    font-weight: bold;
    display: inline-block;
    transition: color 0.3s ease, transform 0.3s ease;
  }
  
  /* Effet au survol */
  a:hover {
    color: #d32f2f; /* Change légèrement la couleur */
    border-radius: 20px;
    transform: translateY(-3px); /* Soulève le lien légèrement */
    transform: translateY(-5px); /* Lien légèrement soulevé */
    background: rgba(255, 0, 21, 0.1); /* Fond léger sous forme de surbrillance */
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
  
  /* Pseudo-élément pour l'animation de survol */
  a::before {
    content: '';
    position: absolute;
    bottom: 0; /* Position en bas du lien */
    left: 50%; /* Point de départ au centre */
    width: 0%; /* Départ invisible */
    height: 2px; /* Épaisseur de la ligne */
    background: var(--primary); /* Couleur principale */
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
  
  a:hover::before {
    width: 100%; /* Étend la ligne sur toute la largeur */
    left: 0; /* Recentre l'animation */
  }
  
  a:active {
    transform: scale(0.95); /* Lien légèrement réduit */
    background: rgba(255, 0, 21, 0.2); /* Fond rouge semi-transparent */
    box-shadow: 0 0 15px rgba(255, 0, 21, 0.5); /* Ombre éclatante */
    border-radius: 20px; /* Arrondi renforcé lors du clic */
    transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out; /* Animation rapide pour le clic */
}
  
  
/* Theme Toggle */
.theme-switcher {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.theme-switcher:hover {
    color: #ffcccb;
}

/* Navigation */
.main-nav {
    background: var(--nav-bg);
    padding: 10px 20px;
    border-radius: 8px;
    margin-top: 10px;
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    padding: 10px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #b71c1c;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--dropdown-bg);
    border-radius: 4px;
    display: none;
    list-style: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    min-width: 150px;
}

.nav-item:hover .dropdown-menu {
    display: block;
}

.dropdown-link {
    text-decoration: none;
    color: var(--text-color);
    padding: 10px 15px;
    display: block;
    transition: background 0.3s;
}

.dropdown-link:hover {
    background: #eaeaea;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* Image d'article */
.article-header {
    text-align: center;
    margin-bottom: 20px;
}

.article-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
}

/* Sections */
section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--nav-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

footer {
    background: linear-gradient(135deg, #ff0000, #b71c1c);
    color: #ffffff;
    padding: 3rem 1rem;
    margin-top: 4rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); /* Ombre principale du footer */
    display: flex;
    flex-direction: column;
    gap: 2rem;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5));
}

.footer-content {
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    text-align: left;
}

/* Logo et description */
.footer-logo {
    flex: 1 1 300px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Ombre pour la section logo */
    padding: 1rem;
    border-radius: 8px; /* Ajout d'arrondi pour plus de modernité */
}

.footer-logo h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #ffcccb;
}

.footer-logo p {
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0.9;
}

/* Navigation rapide */
.footer-nav {
    flex: 1 1 200px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Ombre pour la section navigation */
    padding: 1rem;
    border-radius: 8px; /* Ajout d'arrondi */
}

.footer-nav h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #ffcccb;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav ul li {
    margin-bottom: 0.5rem;
}

.footer-nav ul li a {
    text-decoration: none;
    color: #ffffff;
    transition: color 0.3s ease;
}

.footer-nav ul li a:hover {
    color: #ffcccb;
}

/* Réseaux sociaux */
.footer-socials {
    flex: 1 1 200px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Ombre pour la section réseaux sociaux */
    padding: 1rem;
    border-radius: 8px; /* Ajout d'arrondi */
    text-align: left;
}

.footer-socials h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #ffcccb;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    display: block;
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15); /* Ombre subtile pour les icônes */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-icons a img {
    width: 20px;
    height: 20px;
}

.social-icons a:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Ombre plus forte au survol */
    background: #ffcccb;
}

/* Bas de page */
.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
    opacity: 0.8;
}

.footer-bottom a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #ffcccb;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        text-align: center;
    }

    .logo-title {
        font-size: 1.5rem;
    }

    .theme-switcher {
        margin-top: 10px;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
    }

    .nav-link {
        font-size: 1rem;
    }

    section {
        padding: 15px;
    }
}

/* Menu hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    top: 15px;
    left: 20px;
    z-index: 1000;
}

.hamburger span {
    width: 100%;
    height: 4px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Animation du hamburger en croix */
.hamburger.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* Menu mobile */
@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    /* Suppression du fond du menu */
    .main-nav {
        background: none;
        padding: 0;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: var(--header-bg);
        padding: 10px 0;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        text-align: center;
        transition: all 0.3s ease-in-out;
    }

    .nav-list.active {
        display: flex;
    }

    /* Suppression du fond blanc des éléments desktop */
    .nav-link {
        color: #fff;
        font-size: 1.2rem;
        padding: 15px;
        display: block;
    }

    .nav-item {
        width: 100%;
        text-align: center;
    }

    .dropdown-menu {
        position: relative;
        background: none;
        box-shadow: none;
    }
}


