/* Global Styles */
/* Supprimer marges/paddings du body/html pour un plein écran */
html, body {
    margin: 0;
    padding: 0;
}
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding: 2rem;
}

header, footer {
    background-color: #15303b; /* Vert clair */
    color: #fff;
    padding: 0rem;
    
}

footer {
    margin-top: auto;
}

footer p {
    text-align: center;
    margin: 0;
}

/* Navbar Styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    padding: 1rem;
    position: relative;
    
}

.navbar-menu {
    display: flex;
    align-items: center;
    width: 100%;
}

.navbar-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex: 1;
    justify-content: space-around;
}

.navbar a:hover {
    background-color: #555; /* Changement de couleur au survol */
    border-radius: 4px; /* Ajoute un rayon de bordure arrondi au survol */
}

.navbar-menu ul li {
    margin: 0;
}

.navbar-menu a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem;
    font-size: 0.9rem; /* Réduit la taille du texte pour les grands écrans */
    display: block;
    text-align: center;
}

/* Navbar Toggler */
.navbar-toggler {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem; /* Agrandi la taille pour plus de visibilité */
    cursor: pointer;
}
/*Menu Burger mobile*/
@media (max-width: 768px) {
    .navbar-menu {
        display: flex;
        align-items: center;
        width: 70%;
        }
    .navbar-menu a {
        font-size: 1.1rem; /* Réduit la taille du texte pour les grands écrans */
        }
}
/*========================
  FORMULAIRE DE RECHERCHE
  Ajuster l'input et le
  bouton pour la même largeur
======================== */
.search-form {
    /* Centrer horizontalement si besoin */
    display: flex;
    flex-wrap: wrap; /* Sur petit écran, le bouton passe en 2e ligne si besoin */
    justify-content: center;
    gap: 10px; /* Petit espacement entre input et bouton */
    margin: 0; /* Légère marge latérale sur mobile */
}
.search-form input[type="text"],
.search-form button {
    /* Même largeur pour l'input et le bouton */
    flex: 1 1 45%;
    width: 100%; /* Largeur max pour éviter trop d'étirement sur grand écran */
    box-sizing: border-box;
    border-radius: 0; /* Suppression des coins arrondis */
}

/* Fix login icon */
.login-icon {
    text-decoration: none;
    color: #fff;
    font-size: 5.5rem; /* Agrandi pour une meilleure visibilité */
    top: 0.0rem;
}

/* Main Styles */
h1 {
    margin-bottom: 1rem;
}

h2 {
    border-bottom: 2px solid #333;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    color: black;
}

/* Sections */
section {
    margin-bottom: 2rem;
}

.categories, .themes {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.category, .theme {
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 4px;
    flex: 1;
    min-width: 200px;
}

/* Transport Section */
.transport {
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 4px;
    display: flex;
    gap: 1rem;
}

.transport-image {
    width: 150px;
    height: auto;
}

.transport-details {
    flex: 1;
}

.comments {
    margin-top: 0.1rem;
}

.comments textarea {
    width: 100%;
    height: 80px;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.comments button {
    padding: 0.5rem 1.5rem; /* Agrandi pour une meilleure visibilité */
    border: none;
    background-color: #333;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    font-weight: bold;
}

input[type="text"], input[type="email"], input[type="password"], select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

button[type="submit"] {
    padding: 0.5rem 1.5rem; /* Agrandi pour une meilleure visibilité */
    border: none;
    background-color: #333;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
}

/* Styles pour les catégories */
#types-list .types-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0;
    margin: 0;
}

#types-list .type-item {
    flex: 1 1 30%;
    list-style: none;
    margin-bottom: 20px;
    text-align: center;
    padding: 10px; /* Augmente la zone cliquable */
}

#types-list .type-item a {
    display: block;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 15px;
    border-radius: 5px;
    background-color: #f4f4f4;
    transition: background-color 0.3s;
    font-size: 18px; /* Agrandit la taille du texte */
}

#types-list .type-item a:hover {
    background-color: #e0e0e0; /* Couleur de fond au survol */
}

/* Articles List */
.articles-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 2px;
    margin: 0 auto;
    width : 100%;
    /*max-width: 1200px;*/
    box-sizing: border-box;
}

.article {
    background-color: #fff;
    padding: 0px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.article:hover {
    transform: translateY(-5px);
}

.article h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.article p {
    font-size: 14px;
    color: #555;
}

.article-images {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
}

.article a {
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
    color: #007BFF;
}

.read-more-button {
    display: inline-block;
    padding: 10px 15px;
    background-color: rgb(3, 23, 29);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
}

.read-more-button:hover {
    background-color: rgb(36, 36, 36);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .navbar-menu {
        flex-direction: column;
        align-items: stretch;
       /* background-color: #191b1b; /* Vert clair */
        background-color: #214a57;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        padding: 1rem;
        z-index: 1000;
        border-radius: 0 0 10px 0;
    }

    /* Centrage sur mobile */

 
    .langue-select {
        margin: 0 auto; /* Centre horizontalement sur mobile */
        font-size: 0.9rem; /* Taille du texte identique aux autres liens */
        padding: 0.4rem; /* Espacement réduit pour mobile */
        width: auto; /* Empêche l'élargissement */
    }


    .navbar-menu ul {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .navbar-toggler {
        display: block;
    }
    
    .navbar-menu.active {
        display: flex;
    }

    .search-container {
        margin-top: 1rem;
    }

    .search-container input[type="text"], .search-container button {
        width: 100%;
        margin: 0.5rem 0;
    }
}

@media (max-width: 1024px) {
    .articles-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #types-list .type-item {
        flex: 0 1 45%; /* Deux catégories par ligne */
        margin-bottom: 15px; /* Plus d'espace entre les éléments */
    }

    .articles-list {
        grid-template-columns: 1fr; /* Un article par ligne */
    }

    /* Augmente la taille du texte pour faciliter le toucher sur mobile */
    #types-list .type-item a {
        font-size: 20px;
    }

    .article h2 {
        font-size: 22px; /* Agrandit la taille des titres */
    }

    .article p {
        font-size: 16px; /* Agrandit le texte des paragraphes */
    }

    .read-more-button {
        font-size: 18px; /* Agrandit le texte du bouton */
    }

    .article {
        margin-bottom: 20px;
    }
}

#article-detail {
    padding: 0px;
    margin: 0 auto;
    max-width: 900px;
    background-color: #000;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#article-detail h1 {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

#article-detail p {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 20px;
}

.article-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.article-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-image:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    #article-detail {
        padding: 10px;
    }

    .article-image {
        max-width: 150px;
        max-height: 150px;
    }
}

/* Theme Styles */
[data-theme="dark"] {
    background-color: #333;
    color: #fff;
}

[data-theme="dark"] header, [data-theme="dark"] footer {
    background-color: #15303b;
}

[data-theme="dark"] .navbar-menu a {
    color: #fff;
}

[data-theme="dark"] .search-container button {
    background-color: #555;
}

[data-theme="dark"] .category, [data-theme="dark"] .theme, [data-theme="dark"] .transport {
    background-color: #444;
    border: 1px solid #555;
}

[data-theme="dark"] .comments textarea {
    background-color: #555;
    color: #fff;
}

.social-media-links {
    list-style-type: none;
    padding: 0;
}

.social-media-links li {
    margin-bottom: 10px;
}

.social-media-links a {
    text-decoration: none;
    color: #007bff; /* Couleur du lien */
    font-size: 18px;
}

.social-media-links a:hover {
    text-decoration: underline;
}

/*parametres.php*/

/* Mode Clair */
body[data-theme="clair"] {
    background-color: #ffffff;
    color: #000000;
}

body[data-theme="clair"] .navbar {
    background-color: #15303b;
    color: #fff;
}

/* Mode Sombre */
body[data-theme="sombre"] .navbar {
    background-color: #15303b;
    color: #fff; 
}
body[data-theme="sombre"] {
    background-color: #000000;
    color: #fff;
}

body[data-theme="sombre"] .read-more-button {
    display: inline-block;
    padding: 10px 15px;
    background-color: rgb(255, 255, 255);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
}
body[data-theme="sombre"] .read-more-button:hover {
    background-color: rgb(209, 206, 206);
}

/* =========================
   AJOUT DU LOGO MOBILE
   ========================= */
.logo {
    /* Même clignotement que paramètre si classBlink */
    /* (La classe 'blink' déjà définie plus haut) */
    margin-left: 10px;
    /* On peut ajuster si besoin */
}

.logo img {
    width: 4px; /* on réduit pour tenir dans la navbar */
    height: 1px;
    display: block;
}
