/* --- 1. GÉNÉRAL ET RÉINITIALISATION --- */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    color: #333;
    background-color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Importation de police */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Archivo:wght@500;700&display=swap');

.no-scroll {
    overflow: hidden;
}

.container {
    /* Retrait du max-width pour l'en-tête, mais nous allons le définir pour le contenu */
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 2. EN-TÊTE (HEADER.PHP) - STYLE ÉPURÉ --- */

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 4vw;
    background-color: white;
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-text-epure {
    font-family: 'Archivo Black', sans-serif;
    font-size: 2.2em;
    color: black;
    letter-spacing: -2px;
    text-decoration: none;
}

.nav-container-epure {
    display: flex;
    align-items: center;
    gap: 30px;
}

.menu-epure {
    display: flex;
}

.nav-link {
    text-decoration: none;
    color: black;
    font-family: 'Archivo', sans-serif;
    font-weight: 500;
    margin-left: 30px;
    padding-bottom: 5px;
    transition: border-bottom 0.2s, font-weight 0.2s;
}

.nav-link.active-link {
    border-bottom: 2px solid black;
    font-weight: 700;
}

.nav-link:hover {
    border-bottom: 2px solid #ccc;
}

.cart-icon {
    font-size: 1.2em;
    color: black;
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    /* Positionnement pour être au-dessus du menu plein écran */
    z-index: 101; 
}

/* --- Classe pour bloquer le scroll (utilisée par JS) --- */
.no-scroll {
    overflow: hidden;
}


/* --- MEDIA QUERIES (RESPONSIVE) pour l'en-tête --- */
/* C'est ce bloc qui gère le menu burger */

@media (max-width: 768px) {
    
    /* 1. Cache la navigation desktop */
    .nav-container-epure {
        display: none;
        
        /* 2. Style du menu mobile (plein écran) */
        flex-direction: column;
        justify-content: center; /* Centre les liens verticalement */
        width: 100%;
        height: 100vh; /* 100% de la hauteur de l'écran */
        position: fixed; /* Reste en place */
        top: 0;
        left: 0;
        background-color: white;
        z-index: 100; /* Se place sous le bouton toggle */
        padding: 20px 0;
    }

    /* 3. Le JavaScript ajoute cette classe pour afficher le menu */
    .nav-container-epure.active {
        display: flex;
    }

    .menu-epure {
        flex-direction: column;
        width: 100%;
        align-items: center; /* Centre les liens horizontalement */
    }
    
    .nav-link {
        margin: 15px 0; /* Augmente l'espacement vertical */
        padding: 10px 0;
        width: 90%;
        text-align: center;
        font-size: 1.5em; /* Liens plus grands sur mobile */
        border-bottom: 0px solid #eee;
    }

    .nav-link:hover, .nav-link.active-link {
        /* Assure que le soulignement reste cohérent */
        border-bottom: 0px solid black; 
    }
    
    /* 4. Affiche le bouton burger */
    .menu-toggle {
        display: block;
    }
}

/* --- 3. PIED DE PAGE (FOOTER.PHP) - STYLE 4 COLONNES (Sans Variables) --- */

.footer-v2 {
    background-color: #111;
    color: #f4f4f4;
    padding: 60px 24px;
    margin-top: auto; 
}

.footer-v2-grid {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 36px;
    align-items: start;
}

.footer-v2-col {
    min-width: 0; 
}

/* Col 1 : Logo */
.footer-logo-link {
    text-decoration: none;
}
.footer-logo-text {
    font-family: 'Archivo Black', sans-serif;
    font-size: 2.2em;
    color: #f4f4f4;
    letter-spacing: -2px;
}
.footer-subline {
    margin-top: 10px;
    height: 1px;
    width: 100%;
    background-color: #444; 
}

/* Col 2 : Adresse */
.footer-address {
    font-style: normal;
    color: #f4f4f4;
}
.footer-address p {
    margin: 0 0 12px;
}

/* Col 3 : Appel à l'action (CTA) */
.footer-cta-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.footer-question {
    margin: 0 0 16px;
    color: #f4f4f4;
    text-align: center;
    font-weight: 500;
}

.footer-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff; 
    color: #111;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    transition: transform 0.15s ease, background-color 0.2s ease;
}
.footer-cta-button .footer-cta-icon {
    color: #111;
}

.footer-cta-button:hover {
    background: #ccc;
    transform: translateY(-1px);
}


/* Col 4 : Réseaux sociaux + Mentions légales */
.footer-right-col {
    text-align: right;
}

.footer-socials {
    display: flex;
    gap: 16px;
    justify-content: flex-end; 
    margin-bottom: 24px;
}

.footer-social-icon {
    display: inline-flex;
    font-size: 2em; 
    color: #f4f4f4;
    transition: color 0.2s;
    /* LIGNE AJOUTÉE ICI POUR CORRIGER */
    text-decoration: none; 
}

.footer-legal-link,
.footer-legal-link:link,
.footer-legal-link:visited {
    color: #999; /* Couleur grise discrète */
    text-decoration: none; /* Pas de soulignement */
}
.footer-social-icon:hover {
    color: #999;
}

.footer_legal-link,
.footer-legal-link:link,
.footer-legal-link:visited {
    color: #999; /* Couleur grise discrète */
    text-decoration: none; /* Pas de soulignement */
}

.footer-legal-link:hover {
    text-decoration: underline;
}

/* --- Responsive (Adaptation Mobile) --- */

@media (max-width: 900px) {
    .footer-v2-grid {
        grid-template-columns: 1fr 1fr; 
        gap: 28px;
    }
    
    .footer-logo-col,
    .footer-right-col,
    .footer-cta-col {
        align-items: center;
        text-align: center;
    }
    
    .footer-logo-text {
        margin: 0 auto;
    }
    
    .footer-socials {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .footer-v2 {
        padding: 40px 20px;
    }
    .footer-v2-grid {
        grid-template-columns: 1fr; 
        text-align: center;
    }
    
    .footer-address-col {
        text-align: center;
    }
    
    .footer-right-col {
        text-align: center;
    }
}

/* --- 4. PAGE D'ACCUEIL (DEFAULT.PHP) --- */
.accueil-main {
    flex-grow: 1;
}

.accueil-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    /* AJOUTS POUR LA ROBUSTESSE DU FOND */
    background-image: url('/assets/images/fond-accueil.jpg');
    background-size: cover;
    background-position: center center; /* Rendre explicite */
    background-repeat: no-repeat; /* AJOUT : Assure qu'elle ne se répète pas */
    background-color: black; /* AJOUT : Couleur de secours noire */
    
    position: relative;
    /* SUPPRESSION DE LA BOX-SHADOW QUI CAUSE DES PROBLÈMES D'OVERLAY */
}

/* NOUVEAU : Création de l'overlay avec un pseudo-élément */
.accueil-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Utilisation d'un fond semi-transparent pour l'assombrissement */
    background-color: rgba(0, 0, 0, 0.4); 
    z-index: 5; /* Assurez-vous que l'overlay est sous le contenu */
}

.content-centered {
    position: relative;
    z-index: 10; /* Doit être au-dessus du pseudo-élément (:before) */
    color: white;
}

.tagline {
    font-size: 1.2em;
    letter-spacing: 2px;
    margin-bottom: 5px;
    font-family: 'Archivo', sans-serif;
}

.logo-text {
    font-size: 4em;
    font-family: 'Archivo Black', sans-serif;
    margin: 10px 0 40px;
}

.bouton-galerie {
    display: inline-block;
    padding: 15px 30px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    
    color: white;
    border: 2px solid white;
    background-color: transparent;
    
    transition: all 0.3s ease-in-out;
}

.bouton-galerie:hover {
    color: black;
    background-color: white;
    transform: scale(1.05);
}

/* --- 5. STYLES GALERIE (Pour galerie.php) --- */

.page-galerie {
    padding-top: 20px;
    flex-grow: 1;
    background-color: white;
}

/* Titres */
.page-title-gallery {
    text-align: center;
    font-size: 3em;
    margin-top: 50px;
    margin-bottom: 5px;
    font-family: 'Archivo Black', sans-serif;
}

.page-subtitle-gallery {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
}

/* Logos Partenaires - CORRECTION DE L'ALIGNEMENT VERTICAL (Flexbox) */
.partner-logos {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px;
    
    /* Active Flexbox */
    display: flex; 
    justify-content: center;
    /* Aligne tous les éléments sur leur centre vertical (important si les logos ont des hauteurs différentes) */
    align-items: center; 
    flex-wrap: wrap; /* Permet le retour à la ligne sur mobile */
}

.partner-logos img {
    /* Définit une hauteur MAXIMALE, permettant aux logos de petite taille de ne pas s'étirer */
    max-width: 50px; 
    /* La largeur doit s'ajuster proportionnellement à la max-height */
    height: auto; 
    margin: 0 15px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.partner-logos img:hover {
    opacity: 1;
}

/* --- GRILLE D'IMAGES : CORRECTION DU PROBLÈME DE HAUTEUR (CSS Grid) --- */

.gallery-grid-dynamic {
    /* Utilisation de CSS Grid pour une grille stricte */
    display: grid;
    /* 3 colonnes de taille égale */
    grid-template-columns: repeat(3, 1fr); 
    
    gap: 30px; 
    max-width: 1500px; /* Aligné sur la largeur classique des conteneurs */
    margin: 0 auto;
    padding: 0 4vw 80px; 
}

.gallery-item-card {
    position: relative;
    overflow: hidden;
    margin: 0;
    
    /* 1. Force le conteneur à une hauteur fixe (ici, ratio 4:3 vertical) */
    padding-bottom: 133%; 
    height: 0; 
    margin: 10px 20px 10px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.gallery-item-card img {
    /* 2. L'image remplit parfaitement le conteneur forcé */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Assure que l'image couvre la zone, quitte à la recadrer */
    display: block;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.gallery-item-card:hover img {
    transform: scale(1.02);
    opacity: 0.95;
}

.image-caption-tag {
    display: none;
}


/* --- 6. STYLES UPLOAD, ADMIN & LOGIN --- */

/* Conteneur principal de la page (centre le formulaire) */
.upload-page {
    padding-top: 50px;
    padding-bottom: 50px;
    flex-grow: 1;
}

/* Le formulaire (fond gris, centré) */
.upload-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

/* Groupe de formulaire (Label + Champ) */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

/* STYLE DES CHAMPS (Email, Mot de passe, etc.) */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Important pour que le padding ne casse pas la largeur */
}

/* Style quand on clique sur un champ */
.form-group input:focus,
.form-group select:focus {
    border-color: #000;
    outline: none;
}

/* Bouton d'envoi */
.bouton-upload {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: black;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.bouton-upload:hover {
    background-color: #333;
}

/* Message d'erreur (Email ou mot de passe incorrect) */
.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
}


/* --- 7. MEDIA QUERIES (RESPONSIVE) --- */

@media (max-width: 1024px) {
    .gallery-grid-dynamic {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur tablette */
        gap: 20px;
    }
}

@media (max-width: 768px) {
    /* Menu Mobile */
    .nav-container-epure.active {
        display: flex;
    }

    .gallery-grid-dynamic {
        grid-template-columns: 1fr; /* 1 colonne sur mobile */
        gap: 20px;
        padding: 0 20px 60px;
    }
}

/* --- 8. STYLES POUR LA LIGHTBOX (MODALE GALERIE) --- */

.lightbox-modal {
    display: none; /* Caché par défaut */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    /* Fond estompé comme dans l'exemple */
    background-color: rgba(255, 255, 255, 0.9); 
    
    /* Centrage de l'image */
    justify-content: center;
    align-items: center;
    
    /* Animation d'apparition */
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

#lightbox-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 90vh;
    /* Ombre subtile pour l'image */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); 
}

/* Bouton de fermeture (X) */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #000;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #555;
    text-decoration: none;
}

/* Flèches de navigation */
.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
    color: black;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s;
    user-select: none;
    z-index: 1001;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: #555;
}

/* Rendre le curseur cliquable sur la grille */
.gallery-item-card a {
    cursor: zoom-in;
}

/* --- 9. STYLES PAGE WORK (work.php) --- */

.page-work {
    padding-top: 50px;
    padding-bottom: 50px;
    flex-grow: 1;
}

.container-work {
    max-width: 1200px; 
    margin: 0 auto;
    padding: 0 20px;
}

.page-title-work {
    text-align: center;
    font-size: 3em;
    margin-bottom: 5px;
    font-family: 'Archivo Black', sans-serif;
}

.page-subtitle-work {
    text-align: center;
    color: #666;
    margin-bottom: 50px;
}

.work-grid {
    display: grid;
    /* 2 colonnes comme dans l'exemple */
    grid-template-columns: repeat(2, 1fr); 
    gap: 30px; 
}

.work-card {
    text-decoration: none;
    color: #111;
    transition: transform 0.3s ease;
}

.work-card:hover {
    transform: scale(1.02);
}

.work-card-figure {
    margin: 0;
    overflow: hidden;
    /* Ratio 16:9 pour les images de couverture */
    padding-bottom: 56.25%; 
    height: 0;
    position: relative;
    background-color: #f0f0f0; /* Couleur de fond pendant le chargement */
}

.work-card-figure img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

.work-card-caption {
    margin-top: 15px;
}

.work-card-caption h3 {
    font-family: 'Archivo Black', sans-serif;
    text-transform: uppercase;
    font-size: 1.2em;
    margin: 0;
}

/* Responsive pour la grille Work */
@media (max-width: 768px) {
    .work-grid {
        grid-template-columns: 1fr; /* 1 colonne sur mobile */
        gap: 40px;
    }
}
/* --- 10. STYLES PAGE CATEGORIE DETAIL (categorie.php) --- */

.page-categorie-detail {
    flex-grow: 1;
    background-color: white;
}

/* ... (Les styles de la Bannière .categorie-header-banner restent les mêmes) ... */

.categorie-header-banner {
    position: relative;
    width: 100%;
    height: 40vh; 
    background-color: #222;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}
.categorie-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}
.categorie-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2;
}
.categorie-header-content {
    position: relative;
    z-index: 3;
    color: white;
    padding: 20px;
}
.categorie-header-content h1 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 3em;
    margin: 0 0 10px 0;
}
.categorie-header-content p {
    font-size: 1.2em;
    font-family: 'Archivo', sans-serif;
    margin: 0;
}


/* Grille Masonry (Style 'entremêlé') 
   2 COLONNES AVEC ÉCARTS RÉDUITS
*/
.categorie-masonry-grid {
    column-count: 2; 
    /* MODIFICATION : Écart horizontal très réduit */
    column-gap: 10px; 
    max-width: 1500px;
    margin: 0 auto;
    padding: 50px 4vw 80px; 
}

.categorie-masonry-item {
    break-inside: avoid;
    /* MODIFICATION : Écart vertical très réduit (identique à l'horizontal) */
    margin: 0px 0px 10px 0px;
    position: relative;
    overflow: hidden;
}

.categorie-masonry-item a {
    display: block;
    width: 100%;
    text-decoration: none;
    cursor: zoom-in;
}

.categorie-masonry-item img {
    width: 100%;
    height: auto; /* Conserve le ratio original */
    display: block;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.categorie-masonry-item:hover img {
    transform: scale(1.02);
    opacity: 0.95;
}

/* Responsive pour la grille Masonry */
@media (max-width: 600px) {
    .categorie-masonry-grid {
        column-count: 1; 
        column-gap: 0;
        padding: 40px 20px 60px;
    }
    .categorie-header-content h1 {
        font-size: 2em;
    }
}

/* --- 11. STYLES PAGE BIO (bio.php) --- */

.page-bio {
    padding: 60px 4vw;
    flex-grow: 1;
    background-color: #fff;
}

/* NOUVELLE GRILLE 2 COLONNES (Utilise CSS Grid)
   Sur mobile, elle passera à 1 colonne (voir @media)
*/
.bio-grid-container {
    display: grid;
    /* 2 colonnes : 40% pour l'image, 60% pour le texte */
    grid-template-columns: 40% 1fr; 
    gap: 40px; /* Espace entre l'image et le texte */
    align-items: start; /* Aligne le haut de l'image avec le haut du texte */
    max-width: 1200px; /* Limite la largeur totale */
    margin: 0 auto;
}

/* Colonne 1 : Image */
.bio-col-image {
    width: 100%;
    overflow: hidden;
    background-color: #f0f0f0;
}

.bio-col-image img {
    width: 100%;
    height: auto; /* Garde le ratio de l'image */
    display: block;
}

/* Colonne 2 : Texte */
.bio-col-text {
    /* Le texte est aligné à gauche par défaut */
    text-align: left;
}

.bio-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 3em;
    color: black;
    margin-top: 0;
    margin-bottom: 20px;
    /* Aligné à gauche */
    text-align: left; 
}

.bio-subtitle {
    font-size: 1.3em;
    font-family: 'Archivo', sans-serif;
    font-style: italic;
    color: #555;
    margin-bottom: 30px;
    text-align: left;
}

.bio-body-text {
    font-size: 1.1em;
    line-height: 1.7;
    color: #333;
    text-align: left; 
    margin: 0 0 40px 0; /* Retrait du margin auto */
}

/* Bouton d'appel à l'action */
.bio-cta-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-family: 'Archivo', sans-serif;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.bio-cta-button:hover {
    background-color: #444;
}

/* Responsive pour la Bio */
@media (max-width: 768px) {
    /* Passage à 1 colonne sur mobile */
    .bio-grid-container {
        grid-template-columns: 1fr; 
        gap: 30px;
    }
    
    .bio-title,
    .bio-subtitle,
    .bio-col-text {
        /* Centrer le texte sur mobile */
        text-align: center;
    }

    .bio-body-text {
        text-align: left; /* Garder le corps du texte justifié à gauche */
    }
}

/* --- 12. STYLES PAGE MENTIONS LÉGALES (mentions_legales.php) --- */

.page-mentions {
    padding: 60px 4vw;
    flex-grow: 1;
    background-color: #fff;
}

.mentions-container {
    max-width: 900px; /* Contenu centré et lisible */
    margin: 0 auto;
}

.mentions-container h1 {
    font-family: 'Archivo Black', sans-serif;
    text-align: center;
    font-size: 3em;
    margin-bottom: 40px;
}

.mentions-container h2 {
    font-family: 'Archivo', sans-serif;
    font-size: 1.8em;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.mentions-container p {
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 15px;
}

.mentions-container a {
    color: #000;
    font-weight: bold;
}

/* Bloc d'informations (Éditeur, Hébergeur) */
.info-block {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #eee;
}

.info-block p {
    margin: 0 0 12px 0;
    font-size: 1.1em;
    display: flex;
    align-items: center;
}
.info-block p:last-child {
    margin-bottom: 0;
}

/* Style des icônes */
.info-block i.fa-solid {
    color: #555;
    width: 30px; /* Alignement des textes */
    text-align: center;
    margin-right: 10px;
}

/* --- 12. STYLES DASHBOARD (dashboard.php) --- */

.page-dashboard {
    padding: 60px 4vw;
    flex-grow: 1;
    background-color: #f9f9f9; /* Fond légèrement gris pour l'admin */
}

.container-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-grid {
    display: grid;
    /* 3 colonnes sur desktop, 1 sur mobile */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.dashboard-card {
    display: block;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    text-decoration: none;
    color: #333;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.dashboard-card i {
    font-size: 2.5em;
    color: #000;
    margin-bottom: 15px;
}

.dashboard-card h3 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.4em;
    margin: 0 0 10px 0;
}

.dashboard-card p {
    font-size: 1em;
    line-height: 1.5;
    margin: 0;
}


/* --- 13. STYLES GESTION IMAGES (gestion_images.php) --- */

.page-gestion {
    padding: 60px 4vw;
    flex-grow: 1;
    background-color: #f9f9f9;
}

.container-gestion {
    max-width: 1400px; /* Plus large pour le tableau */
    margin: 0 auto;
}

.table-container {
    width: 100%;
    overflow-x: auto; /* Permet le scroll horizontal sur mobile */
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background-color: #f1f1f1;
}

/* MODIFICATION ICI : Assurer que le contenu de la cellule prend toute la place verticale */
table th, table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}

table th {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
}

/* Vignette dans le tableau */
.admin-thumb {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

/* Champs de formulaire dans le tableau */
.admin-select,
.admin-input-num {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 80px;
}

/* CORRECTION BUG D'AFFICHAGE ET GESTION DU BOUTON DE SUPPRESSION (X) */
.admin-actions {
    /* Suppression du 'display: flex' ici, car le bouton de suppression est un formulaire imbriqué */
    /* On laisse le bouton de suppression se centrer ou se placer naturellement. */
    text-align: center; /* Centrer le contenu (le formulaire de suppression) dans la cellule */
    width: 80px; /* Optionnel, pour donner une taille fixe à la colonne Actions */
}

/* Assurer que le formulaire de suppression ne prend pas trop de place et ne cause pas de décalage */
.admin-actions form {
    display: inline-block;
    margin: 0;
    padding: 0;
}


.admin-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

/* Style pour le bouton 'Enregistrer tout' ajouté */
.large-btn {
    padding: 12px 25px;
    font-size: 1.1em;
}

.admin-btn.update {
    background-color: #000;
    color: #fff;
}
.admin-btn.update:hover {
    background-color: #444;
}

.admin-btn.delete {
    background-color: #e53e3e;
    color: #fff;
    padding: 8px 15px; /* Ajustement du padding pour le X */
}
.admin-btn.delete:hover {
    background-color: #c53030;
}

/* Responsive pour le tableau */
@media (max-width: 768px) {
    /* Cache l'en-tête du tableau */
    table thead {
        display: none;
    }
    
    table tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        overflow: hidden;
    }
    
    table td {
        display: block;
        text-align: right; /* Aligne le contenu à droite */
        padding-left: 50%; /* Laisse de la place pour le label */
        position: relative;
    }
    
    /* Ajoute le label (stocké dans data-label) avant le contenu */
    table td:before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 45%;
        text-align: left;
        font-weight: bold;
    }
    
    /* CORRECTION RESPONSIVE : Afficher les actions correctement */
    .admin-actions {
        display: flex; /* Réactiver flex pour le responsive, si nécessaire */
        justify-content: flex-end;
        text-align: right; /* Assurez-vous que le texte n'est pas réaligné à cause des autres règles td */
        padding-left: 15px; /* Supprime le padding-left: 50% de la règle td générale */
    }
}