/* ==========================================================================
   1. Variables et Styles de Base
   ========================================================================== */

:root {
    --text-color: #0c0b0b;
    --page-bg-color: #f8f9fa;
    --surface-bg-color: #ffffff;
    --border-color: #dee2e6;
    --hover-bg-color: #e9ecef;
    --primary-color: #0056b3; /* AJOUT : La couleur principale qui manquait */
    --header-height: 70px;
    --sidebar-width: 280px;
    --border-radius: 8px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--page-bg-color);
    background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23000000' fill-opacity='0.04' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
    color: var(--text-color);
    line-height: 1.6;
}

/* --- Style global pour les liens --- */
a {
    color: var(--text-color);
    text-decoration-line: underline;
    text-decoration-style: dashed;
    text-decoration-color: rgba(12, 11, 11, 0.4); 
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease-in-out;
}

a:hover {
    text-decoration-style: solid;
    text-decoration-color: var(--text-color);
}

a:visited {
    color: var(--text-color);
}

/* --- Styles pour les titres --- */
h1, h2 {
    font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
}

h1, h2, h3, h4 {
    font-family: 'Patrick Hand', 'Comic Sans MS', cursive, sans-serif;
    color: var(--text-color);
   
}

h1 {
    margin-bottom: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.h1-icon {
    width: clamp(2.2rem, 1.5rem + 2vw, 3.2rem);
    height: auto;
    margin-right: 1rem;
}

/* ==========================================================================
   2. Mise en Page Principale (Header, Navigation, Main, Footer)
   ========================================================================== */

/* --- Header & Logo --- */
.site-logo,
.site-logo:hover {
    text-decoration: none;
}

.site-logo .text-logo {
    font-family: 'Patrick Hand', cursive;
    font-size: clamp(2rem, 8vw, 2.8rem);
    color: var(--text-color);
    text-decoration: none;
    line-height: 1;
    display: block;
    font-style: italic;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.15);
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.site-logo .logo-highlight {
    background-image: linear-gradient(
        90deg,
        #c79cfe 0%, #c79cfe 7.1%,
        #fd79a8 7.1%, #fd79a8 14.2%,
        #ff8c82 14.2%, #ff8c82 21.3%,
        #ff7e5f 21.3%, #ff7e5f 28.4%,
        #ff996d 28.4%, #ff996d 35.5%,
        #feb47b 35.5%, #feb47b 42.6%,
        #c4ddb4 42.6%, #c4ddb4 49.7%,
        #8dd3c7 49.7%, #8dd3c7 56.8%,
        #78cdae 56.8%, #78cdae 63.9%,
        #63baba 63.9%, #63baba 71.0%,
        #6baecf 71.0%, #6baecf 78.1%,
        #a29bfe 78.1%, #a29bfe 85.2%,
        #8da2ff 85.2%, #8da2ff 92.3%,
        #74b9ff 92.3%, #74b9ff 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 1500% 100%;
    animation: solid-color-scroll 180s linear infinite;
}

@keyframes solid-color-scroll {
  from {
    background-position: 100% 50%;
  }
  to {
    background-position: 0% 50%;
  }
}
.site-header-mobile {
    background-color: var(--surface-bg-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 2000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: var(--header-height);
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.site-header-mobile .site-logo img {
    max-height: 45px;
}

/* --- Navigation Principale --- */
.nav-toggle {
    display: block;
    background: transparent;
    border: none;
    width: 30px;
    height: 30px;
    position: relative;
    cursor: pointer;
}

.hamburger, .hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 28px;
    height: 3px;
    background: var(--text-color);
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

.hamburger { top: 13px; }
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--surface-bg-color);
    transform: translateY(-110%);
    /* ==========================================================================
    ATTENTION : NE PAS MODIFIER LA VISIBILITÉ CI-DESSOUS
    
    'visibility: hidden;' est INDISPENSABLE pour corriger un bug de 
    Google PageSpeed (Lighthouse). L'outil voit les éléments "hors-écran"
    (cachés avec 'transform') et signale une fausse erreur de contraste.
    
    Cette ligne force l'outil à les ignorer.
    
    Cette règle est ensuite ANNULÉE pour le desktop dans la media query 
    (min-width: 900px) avec 'visibility: visible;'.
    ==========================================================================
    */
    visibility: hidden; 
    transition: transform 0.3s ease-in-out, visibility 0.3s; 
    /* FIN NE PAS MODIFIER */
    
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.main-nav.nav-open {
    transform: translateY(0);
    visibility: visible; /* <--- NE PAS MODIFIER */
}

.main-nav .nav-header {
    display: none;
}

.main-nav ul {
    list-style: none;
    overflow-y: auto;
    flex-grow: 1;
    padding-top: 0.5rem;
}

.main-nav .nav-header .site-logo img {
    max-height: 60px;
}

.main-nav .nav-item > a {
    display: flex;
    align-items: center;
    width: 100%;
    /* MODIFIÉ : Plus d'espacement vertical pour un menu plus aéré */
    padding: 1rem 1.5rem; 
    transition: background-color 0.2s, color 0.2s;
    /* MODIFIÉ : Hauteur minimale augmentée pour s'adapter au nouveau contenu */
    min-height: 58px; 
    color: #495057;
    text-decoration: none;
}

.main-nav .nav-item > a:hover {
    background-color: var(--text-color);
    color: #ffffff;
}

.main-nav .nav-item > a span { flex-grow: 1; }

.menu-icon {
    /* MODIFIÉ : Icônes plus grandes */
    width: 32px;
    height: 32px;
    margin-right: 15px;
    object-fit: contain;
    flex-shrink: 0;
}

.main-nav .menu-link-text {
    font-size: 1.15rem; /* On conserve la taille que vous aimez */
    font-weight: 500; /* MODIFIÉ : On passe de 600 (semi-bold) à 500 (medium) pour plus de finesse */
    letter-spacing: 0.4px; /* AJOUTÉ : On espace très légèrement les lettres pour "aérer" le texte */
    -webkit-font-smoothing: antialiased; /* AJOUTÉ : Améliore la netteté du rendu sur Chrome/Safari */
    -moz-osx-font-smoothing: grayscale;  /* AJOUTÉ : Améliore la netteté du rendu sur Firefox */
}

/* AJOUTÉ : Cible la date pour l'harmoniser */
.main-nav .menu-date {
    font-weight: 500; /* Poids normal pour la date */
    opacity: 0.9;
}

/* --- Contenu Principal --- */
main {
    padding: 1.5rem;
}

/* --- Pied de Page (Footer) --- */
.site-footer {
    background-color: var(--surface-bg-color);
    color: #495057;
    padding: 3rem 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}

.footer-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto 3rem auto;
    text-align: center;
}

.footer-column h4 {
    font-family: 'Patrick Hand', sans-serif;
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

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

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: #495057;
}

.footer-column a:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    max-width: 1200px;
    margin: 0 auto;
    font-size: 0.9rem;
}

.language-switcher-footer a,
.language-switcher-footer strong {
    margin: 0 0.5rem;
}

.language-switcher-footer a {
    color: var(--text-color);
}

/* ==========================================================================
   3. Composants
   ========================================================================== */

/* --- Fil d'Ariane (Breadcrumbs) --- */
.breadcrumbs {
    padding: 0;
    margin: 0 0 1.5rem 0;
    list-style: none;
    background-color: transparent;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.9rem;
    align-items: center;
}

.breadcrumbs li a:hover {
    text-decoration: underline;
}

.breadcrumbs li+li::before {
    content: '/';
    margin: 0 0.6rem;
    color: #6c757d;
}

.breadcrumbs li.active {
    color: #6c757d;
}

/* --- Sections de Catégorie --- */
/* --- Sections de Catégorie --- */
.category-intro {
    max-width: 650px;
    margin: 0 auto 2.5rem auto; /* Centre le bloc et conserve la marge en bas */
    padding: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #495057;
    background-color: rgba(0,0,0,0.02);
    border-left: 4px solid #dee2e6;
    text-align: left; /* Aligne le texte à gauche, comme dans l'exemple */
}

.hub-section {
    margin: 3.5rem 0;
}

.hub-section-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.child-category-nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.child-category-date {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 0.25rem;
    text-align: center;
}

.category-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: #495057;
    line-height: 1.7;
}

.category-footer h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* --- Galerie de cartes (Vignettes) --- */
.card-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}

.gallery-item {
    background: var(--surface-bg-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: none; 
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.18);
}

.gallery-item a,
.gallery-item a:hover {
    display: block;
    text-decoration: none;
    border-bottom: none;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--border-color);
}

.card-text-preview {
    font-size: 0.9rem;
    color: #495057;
    padding: 1rem;
    line-height: 1.5;
}

/* --- Boutons --- */
.btn-base {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 1.3rem;
    color: var(--text-color);
    background-color: #ffffff;
    border: 1px solid #dfdfdf;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    text-align: center;
    box-shadow: none; /* Ombre supprimée */
}

.btn-base:hover {
    background-color: var(--text-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: none; /* Ombre supprimée */
}

.action-button {
    gap: 12px;
    font-family: 'Patrick Hand', 'Comic Sans MS', cursive, sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.action-button img {
    height: 24px;
    width: auto;
}

a.child-category-item {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
}

.child-category-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 0.5rem;
    object-fit: contain;
    flex-shrink: 0;
}

/* ==========================================================================
   BLOC FINAL ET CORRIGÉ POUR LES BOUTONS D'ACTION
   ========================================================================== */

/* --- Style de base (Mobile First) --- */
.share-button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 2rem auto;
    padding: 0 1rem;
}

.share-button-container form,
.share-button-container > .action-button {
    margin: 0;
    flex: 1 1 0%;
    min-width: 140px;
    max-width: 240px;
}

/* --- Pour les écrans de taille mobile (< 600px) --- */
@media (max-width: 600px) {
    .share-button-container .btn-base {
        font-size: 1.15rem;
        padding: 10px 16px;
    }
}

/* --- Pour les écrans très étroits: texte seul, côte à côte --- */
@media (max-width: 500px) {
    /*
     * 1. On masque toujours les icônes pour maximiser l'espace.
     */
    .share-button-container .btn-base img {
        display: none;
    }

    /*
     * 2. On supprime les règles qui forçaient l'empilement.
     * Le conteneur .share-button-container retrouve son comportement
     * `display: flex` de base, ce qui aligne les boutons horizontalement.
     * Le `justify-content: center` et le `gap` de la règle de base
     * s'occuperont de les centrer et de les espacer.
     */
    .share-button-container {
        /* La règle `display: block;` est supprimée. */
    }
    .share-button-container form {
        margin-bottom: 0; /* On retire la marge verticale inutile. */
    }

    /*
     * 3. On rend la largeur des boutons flexible au lieu de 100%.
     * Ils s'adapteront à la taille de leur texte + padding.
     */
    .share-button-container form,
    .share-button-container > .action-button {
        width: auto; /* On annule la largeur fixe de 100%. */
        flex-grow: 1; /* Permet aux boutons de grandir pour occuper l'espace disponible de manière égale. */
    }
}


/* --- Pour les écrans TRÈS étroits (< 375px) : Correction finale --- */
@media (max-width: 374px) {
    /*
     * 1. On réduit l'espacement entre les boutons.
     */
    .share-button-container {
        gap: 0.5rem; /* 8px d'espace */
    }

    /*
     * 2. On réduit le padding et la police des boutons.
     */
    .share-button-container .btn-base {
        padding: 10px 12px;
        font-size: 1rem;
    }

    /*
     * 3. RÈGLE CRUCIALE : On annule la largeur minimale pour
     * permettre aux boutons de rétrécir suffisamment.
     */
    .share-button-container form,
    .share-button-container > .action-button {
        min-width: 0;
    }
}

/* --- Pour les grands écrans (>= 900px) : affichage desktop corrigé --- */
@media (min-width: 900px) {
    .share-button-container {
        max-width: 480px;
        flex-wrap: nowrap; /* Ajouté : Force les éléments à rester sur une seule ligne */
    }

    .share-button-container form,
    .share-button-container > .action-button {
        /* Conserve la correction précédente pour définir une base de taille fixe */
        flex: 0 0 220px;
    }

    .share-button-container .btn-base {
        font-size: 1.3rem;
        padding: 12px 28px;
    }
}

/* --- Bouton de partage principal (vert) --- */
@keyframes pulse-visible {
  0% { transform: scale(1); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
  50% { transform: scale(1.05); box-shadow: 0 8px 30px rgba(33, 136, 56, 0.4); }
  100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
}

.btn-share-primary {
    background-color: #28a745;
    color: #ffffff;
    border: 1px solid #218838;
    padding: 18px 36px;
    font-size: 1.6rem;
    font-family: 'Patrick Hand', 'Comic Sans MS', cursive, sans-serif;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, background-color 0.2s ease;
    animation: pulse-visible 1s infinite ease-in-out;
    position: relative;
}

.btn-share-primary:hover {
    background-color: #218838;
    color: #ffffff;
    animation-play-state: paused;
    transform: translateY(-3px);
}

.btn-share-primary img {
    height: 28px;
}

/* --- Sélecteur de langue --- */
.language-switcher {
    margin-top: auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.language-switcher a {
    opacity: 0.7;
    transition: opacity 0.2s;
}
.language-switcher a:hover {
    opacity: 1;
}

/* --- Pages spécifiques (Aperçu, Confirmation) --- */
.card-text-display {
    max-width: 600px;
    margin: 2rem auto;
    padding: 1rem;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.6;
}

.preview-title {
    text-align: center;
    margin-top: 40px;
    color: var(--text-color);
}

.recap-section {
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.recap-section h2 {
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 15px;
}
.recap-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
.recap-list li {
    padding: 5px 0;
    line-height: 1.5;
    font-size: 1.05rem;
}
.recap-list strong {
    display: inline-block;
    min-width: 150px;
    color: var(--text-color);
}

.confirmation-box { max-width: 800px; margin: 4rem auto; padding: 2rem 2.5rem; border-radius: 12px; text-align: center; box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.confirmation-box h1 { font-size: 2.5rem; margin-top: 0; margin-bottom: 1rem; display: flex; align-items: center; justify-content: center; gap: 15px; }
.confirmation-box p { font-size: 1.2rem; line-height: 1.6; color: #555; margin-bottom: 2rem; }
.success-message { background-color: #e8f5e9; border: 1px solid #c8e6c9; color: #2e7d32; }
.share-container { background-color: #e3f2fd; border: 1px solid #bbdefb; color: #1565c0; }
.error-message { background-color: #ffebee; border: 1px solid #ffcdd2; color: #c62828; }
.error-detail { color: #721c24; background: #f8d7da; padding: 10px; border-radius: 5px; margin-top: 1rem; text-align: left; font-family: monospace; }

.confirmation-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.confirmation-layout > p { margin-bottom: 0; }
.confirmation-layout > .card-preview-wrapper { margin-top: 0; }
.confirmation-layout .preview-link { display: block; line-height: 0; }
.confirmation-layout .card-preview-wrapper img { max-width: 100%; height: auto; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.15); }

.next-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.link-secondary {
    color: #555;
    font-size: 0.9em;
    text-decoration: underline;
    text-decoration-color: #ccc;
}
.link-secondary:hover {
    color: #000;
    text-decoration-color: #555;
}

/* ==========================================================================
   4. Media Queries (Responsive)
   ========================================================================== */

/* --- Layout Desktop (grille principale) --- */
@media (min-width: 900px) {
    body {
        display: grid;
        grid-template-columns: var(--sidebar-width) 1fr;
    }

    .site-header-mobile {
        display: none;
    }
.main-nav {
    position: sticky;
    top: 0;
    transform: translateY(0);
    height: 100vh;
    width: var(--sidebar-width);
    border-right: 1px solid var(--border-color);

/* ==========================================================================
        ATTENTION : NE PAS MODIFIER LA VISIBILITÉ CI-DESSOUS
        
        'visibility: visible;' est INDISPENSABLE pour faire réapparaître
        le menu desktop.
        
        Il annule le 'visibility: hidden;' qui est appliqué par défaut
        pour corriger le bug PageSpeed sur mobile. 
        Si cette ligne est supprimée, le menu desktop disparaît.
        ==========================================================================
        */
    visibility: visible;

}

    .main-nav .nav-header {
        display: flex;
        align-items: center;
        height: var(--header-height);
        padding: 0 1.5rem;
    }

    main {
        padding: 2.5rem 3rem;
    }

    .site-footer {
        grid-column: 2 / -1;
    }

    h1, .hub-section-title {
        text-align: left;
    }

    .category-intro {
        text-align: left;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }

    h1 {
        justify-content: flex-start;
    }
}

/* --- Layout Tablette --- */
@media (min-width: 768px) {
    .footer-columns {
        grid-template-columns: repeat(3, 1fr);
        text-align: left;
    }
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* --- Layout Mobile (correctif fil d'ariane) --- */
@media (max-width: 899px) {
    .breadcrumbs {
        position: relative;
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .breadcrumbs::-webkit-scrollbar {
        display: none;
    }
    .breadcrumbs::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 40px;
        height: 100%;
        background: linear-gradient(to left, var(--page-bg-color), transparent);
        pointer-events: none;
    }
}

/* --- Ajout de l'icône de lecture pour les vignettes vidéo --- */

/* 1. On prépare le conteneur du lien */
.gallery-item.is-video a {
    position: relative;
    display: block;
}

/* 2. On crée l'icône "play" avec un pseudo-élément ::after */
.gallery-item.is-video a::after {
    content: ''; 
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    /* CORRECTION : On force l'icône à être par-dessus tout le reste */
    z-index: 10; 

    /* Style du cercle de fond */
    width: 64px;
    height: 64px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    
    /* Le triangle "play" (en SVG) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 55% 50%;
    background-size: 45%;

    /* Animation et visibilité */
    opacity: 0.85;
    transition: all 0.2s ease-in-out;
    pointer-events: none; /* Empêche l'icône de bloquer le clic sur le lien */
}

/* 3. On ajoute un effet au survol de la vignette */
.gallery-item.is-video a:hover::after {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.7);
}

/* --- Icône de son pour les vignettes vidéo avec audio --- */

/* On crée l'icône de son avec le pseudo-élément ::before */
/* --- Icône de son pour les vignettes vidéo avec audio --- */

/* On crée l'icône de son avec le pseudo-élément ::before */
.gallery-item.has-sound a::before {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 11;

    /* MODIFIÉ : Taille augmentée pour une meilleure visibilité */
    width: 32px;
    height: 32px;
    
    /* MODIFIÉ : Fond plus opaque */
    background-color: rgba(0, 0, 0, 0.75);
    
    /* AJOUTÉ : Bordure blanche pour améliorer le contraste */
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    
    /* Icône de haut-parleur en SVG */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 55%;

    pointer-events: none;
    transition: transform 0.2s ease;
}

/* Léger effet au survol pour indiquer l'interactivité */
.gallery-item.has-sound a:hover::before {
    transform: scale(1.1);
}

/* --- Style pour l'affichage des textes sous la carte --- */
.card-text-container {
    max-width: 650px;
    margin: 2rem auto 3rem auto; /* Centre le bloc et ajoute de l'espace */
    padding: 0 1rem;
    text-align: center;
}

/* Style pour le texte d'inspiration généré par l'IA */
.inspiration-text {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 0; /* Pas de marge si le texte de transcription n'est pas là */
}

/* Style pour la transcription du texte de la carte */
.transcription-text {
    margin-top: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid #e0e0e0;
    font-family: 'Patrick Hand', cursive; /* Utilise la police manuscrite pour un effet "citation" */
    font-size: 1.2rem;
    font-style: italic;
    color: #666;
    text-align: left; /* Plus lisible pour une citation */
}

/* On s'assure que la marge du bas de .inspiration-text apparaît
   seulement si la transcription est présente */
.inspiration-text + .transcription-text {
    margin-top: 1.5rem;
}
.inspiration-text:not(:last-child) {
    margin-bottom: 1.5rem;
}

/*
 * Espacement pour la section "À découvrir aussi" sur les pages de catégorie
 */
.related-section {
    margin-top: 60px;  /* Ajoute un grand espace AU-DESSUS de la section */
    margin-bottom: 40px; /* Ajoute un espace EN DESSOUS, avant le texte de pied de page */
}

.related-section-title {
    margin-bottom: 2rem; /* Espace le titre "À découvrir aussi" des boutons en dessous */
}

/* --- Styles pour le nuage de tags interactif --- */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.tag-filter {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-family: 'Nunito Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.tag-filter:hover {
    border-color: #adb5bd;
    background-color: #f8f9fa;
}

/* Style pour le filtre de tag ACTIF */
.tag-filter.active {
    background-color: var(--text-color);
    color: #ffffff;
    border-color: var(--text-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* --- Styles pour le nuage de tags interactif --- */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start; /* Aligne les tags à gauche sur les pages hub */
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--surface-bg-color);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tag-section .tag-cloud {
    justify-content: center; /* Centre les tags dans la section "mots-clés" */
}

.tag-filter, .tag-link {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-family: 'Nunito Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    text-decoration: none;
    color: var(--text-color);
}

.tag-filter:hover, .tag-link:hover {
    border-color: #adb5bd;
    background-color: #e9ecef;
}

/* Style pour le filtre de tag ACTIF */
.tag-filter.active {
    background-color: var(--text-color);
    color: #ffffff;
    border-color: var(--text-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* --- Styles pour les boutons de thèmes --- */
.theme-buttons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.theme-button {
    flex-grow: 1;
    min-width: 180px;
    font-size: 1.1rem;
    padding: 10px 24px;
}

/* ==========================================================================
   5. Amélioration du Footer de Catégorie
   ========================================================================== */

/* On applique un style similaire au bloc d'intro pour une cohérence visuelle */
.category-footer {
    margin-top: 4rem;
    padding: 1.5rem;
    background-color: rgba(0,0,0,0.02);
    border-left: 4px solid #dee2e6;
    line-height: 1.6;
    color: #495057;
    
    /* On annule les styles précédents qui ressemblaient à un bouton */
    border-top: none;
    border-radius: 0;
    box-shadow: none;
}

.category-footer h4 {
    font-family: 'Patrick Hand', sans-serif;
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.category-footer ul + h4,
.category-footer p + h4 {
    margin-top: 2rem;
}

.category-footer p {
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.category-footer ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.category-footer li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.7rem;
}

/* On crée notre puce personnalisée */
.category-footer li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: -2px;
    color: var(--text-color); /* Couleur des puces (noir) */
    font-weight: bold;
    font-size: 1.2rem;
}

.category-footer a {
    font-weight: 500;
}



/* ==========================================================================
   6. Styles Espace Membre (Version consolidée et corrigée)
   ========================================================================== */

/* --- 1. Styles par défaut (Mobile First) --- */

/* Le conteneur du bouton dans le header est masqué sur mobile */
.header-user-actions {
    display: none;
}

/* Le séparateur et les liens sont visibles dans le menu hamburger mobile */
.nav-item-separator {
    height: 1px;
    background-color: var(--border-color);
    margin: 1rem 1.5rem;
}

.user-account-item a {
    font-weight: 600;
}


/* --- 2. Styles pour la vue Desktop --- */
@media (min-width: 900px) {

    /* Règle qui corrige la duplication : on cache les liens dans le menu latéral */
    .main-nav .user-account-item,
    .main-nav .nav-item-separator {
        display: none;
    }

    /* Le conteneur du fil d'Ariane et du bouton */
    .main-content-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        /* CORRECTION DE L'ESPACEMENT : On augmente le padding pour "remonter" le bouton */
        padding-bottom: 1.5rem; /* Augmenté de 1rem à 1.5rem */
    }

    .main-content-header .breadcrumbs {
        margin-bottom: 0;
    }
    
    /* On affiche le conteneur du bouton qui est dans le main-content-header */
    .header-user-actions {
        display: block;
    }

    /* Style du lien "Connexion / Inscription" */
    .user-action-link {
        font-size: 0.95rem;
        font-weight: 600;
        padding: 8px 14px;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        text-decoration: none;
        white-space: nowrap;
        transition: all 0.2s ease;
    }

    .user-action-link:hover {
        background-color: var(--text-color);
        color: #ffffff;
        border-color: var(--text-color);
    }
}

/* ==========================================================================
   6. Styles Espace Membre & Recherche (Version Finale)
   ========================================================================== */

/* --- 1. Styles par défaut (Mobile First) --- */

/* Conteneur pour les icônes à droite du header mobile */
.site-header-actions-mobile {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Espace entre l'icône de recherche et le hamburger */
}

/* Style de base pour TOUS les boutons .search-toggle */
.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 5px;
    border-radius: 50%;
}
.search-toggle svg {
    width: 22px;
    height: 22px;
}

/* On cache par défaut le bloc header du contenu principal sur mobile */
.main-content-header .main-header-actions {
    display: none;
}

/* Liens du menu hamburger */
.nav-item-separator {
    height: 1px;
    background-color: var(--border-color);
    margin: 1rem 1.5rem;
}
.user-account-item a {
    font-weight: 600;
}


/* --- 2. Styles pour la vue Desktop --- */
@media (min-width: 900px) {

    /* On cache le conteneur des actions mobiles sur grand écran */
    .site-header-actions-mobile {
        display: none;
    }

    /* On cache les liens de compte dans le menu latéral sur grand écran */
    .main-nav .user-account-item,
    .main-nav .nav-item-separator {
        display: none;
    }

    /* Conteneur pour le fil d'Ariane et le bouton */
    .main-content-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1.5rem;
    }
    .main-content-header .breadcrumbs {
        margin-bottom: 0;
    }
    
    /* On affiche le conteneur d'actions du header principal */
    .main-content-header .main-header-actions {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    /* Style spécifique pour le bouton de recherche sur Desktop */
    .main-header-actions .search-toggle {
        width: 40px;
        height: 40px;
        border: 1px solid var(--border-color);
        transition: all 0.2s ease;
    }
    .main-header-actions .search-toggle:hover {
        background-color: var(--text-color);
        color: #ffffff;
        border-color: var(--text-color);
    }
    .main-header-actions .search-toggle svg {
        width: 20px;
        height: 20px;
    }

    /* Style du lien "Connexion / Inscription" */
    .user-action-link {
        font-size: 0.95rem;
        font-weight: 600;
        padding: 8px 14px;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        text-decoration: none;
        white-space: nowrap;
        transition: all 0.2s ease;
    }
    .user-action-link:hover {
        background-color: var(--text-color);
        color: #ffffff;
        border-color: var(--text-color);
    }
}


/* ==========================================================================
   7. Style "Bouton Grisé" pour les Sous-Catégories
   ========================================================================== */

a.child-category-item {
    /* On change la couleur de fond, c'est le point principal */
    background-color: #ffffff; /* Un gris très clair, différent du fond de page */
    
    /* On garde une bordure discrète pour définir le bouton */
    border: 1px solid #dee2e6;
    
    /* On supprime les effets superflus */
    box-shadow: none;

    /* On ANNULE les changements de taille que j'avais imposés */
    min-height: auto;

    /* On revient à un padding plus simple */
    padding: 1.25rem 1rem;
    
    /* On s'assure que le contenu reste centré */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* On s'assure que le texte est bien lisible */
.child-category-item span {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-color);
}

.child-category-date {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* L'effet de survol demandé, qui reste le même */
a.child-category-item:hover {
    background-color: var(--text-color);
    border-color: var(--text-color);
    color: #ffffff;
    transform: none; /* On retire l'effet de soulèvement pour rester sobre */
}

/* On s'assure que tout le texte passe bien en blanc au survol */
a.child-category-item:hover span,
a.child-category-item:hover .child-category-date {
    color: #ffffff;
}


/* Style pour le bloc d'intro (ex-outro) */
.intro-content {
    margin: 0.5rem 0 2rem 0; /* Marge haute réduite */
}
.intro-content h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* MISE À JOUR : Style du paragraphe d'intro pour correspondre à l'exemple */
.intro-content p {
    /* Centrage du bloc, comme l'exemple */
    max-width: 650px; 
    margin: 0 auto; /* auto left/right */
    
    /* Style de l'image "En ce jour particulier..." */
    padding: 1rem 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #495057; /* Couleur de texte sobre */
    font-style: italic; /* Style italique demandé */
    border-left: 1px solid #ced4da; /* Bordure fine et grise */
    
    /* On force l'alignement à gauche (le style "bordure" n'est pas centré) */
    text-align: left; 
}