/* ========================================
 * H2-TITLES-HARMONIZATION.CSS
 * Uniformisation des styles des titres H2
 * entre les pages index, categories et recette
 * ======================================== */

/* ============================================
   STYLE UNIFIÉ POUR TOUS LES H2
============================================ */

/* Page d'accueil - Structure des conteneurs */
.section-title-container {
    margin-bottom: 0px;
    margin-top: 30px;
    position: relative;
}

.section-title-container:first-of-type {
    margin-top: 40px;
}

.section-title-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 0px;
    position: relative;
}

/* Masquer les hr.section-line - on utilisera ::after à la place */
.section-line {
    display: none !important;
}

/* Style unifié pour TOUS les titres H2 */
.section-title,
.modal-title,
.sidebar-title-styled,
.recette-ingredients-section h2,
.recette-ustensiles-section h2,
.recette-preparation-section h2,
.recette-nutrition-section h2,
.recette-conseils-section h2,
.recette-suggestions-section h2,
.recette-conservation-section h2,
.ingredient-conservation-section h2,
.ingredient-preparation-section h2,
.ingredient-comment-choisir-section h2,
.ingredient-anti-gaspi-section h2,
.ingredient-labels-section h2,
.ingredient-alternatives-section h2,
.ingredient-bienfaits-section h2,
.ingredient-allergenes-section h2,
.ingredient-nutrition-section h2,
.ingredient-acheter-section h2,
.similar-recipes-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color, #333);
    margin: 0;
    position: relative;
}

/* Dark mode pour tous les H2 */
.dark-mode .section-title,
.dark-mode .modal-title,
.dark-mode .sidebar-title-styled,
.dark-mode .recette-ingredients-section h2,
.dark-mode .recette-ustensiles-section h2,
.dark-mode .recette-preparation-section h2,
.dark-mode .recette-nutrition-section h2,
.dark-mode .recette-conseils-section h2,
.dark-mode .recette-suggestions-section h2,
.dark-mode .recette-conservation-section h2,
.dark-mode .ingredient-conservation-section h2,
.dark-mode .ingredient-preparation-section h2,
.dark-mode .ingredient-comment-choisir-section h2,
.dark-mode .ingredient-anti-gaspi-section h2,
.dark-mode .ingredient-labels-section h2,
.dark-mode .ingredient-alternatives-section h2,
.dark-mode .ingredient-bienfaits-section h2,
.dark-mode .ingredient-allergenes-section h2,
.dark-mode .ingredient-nutrition-section h2,
.dark-mode .ingredient-acheter-section h2,
.dark-mode .similar-recipes-section h2 {
    color: white !important;
}

/* Ligne de soulignement avec ::after - EXACTEMENT COMME DANS recette.php ET categories.php */
.section-title::after,
.modal-title::after,
.sidebar-title-styled::after,
.recette-ingredients-section h2::after,
.recette-ustensiles-section h2::after,
.recette-preparation-section h2::after,
.recette-nutrition-section h2::after,
.recette-conseils-section h2::after,
.recette-suggestions-section h2::after,
.recette-conservation-section h2::after,
.ingredient-conservation-section h2::after,
.ingredient-preparation-section h2::after,
.ingredient-comment-choisir-section h2::after,
.ingredient-anti-gaspi-section h2::after,
.ingredient-labels-section h2::after,
.ingredient-alternatives-section h2::after,
.ingredient-bienfaits-section h2::after,
.ingredient-allergenes-section h2::after,
.ingredient-nutrition-section h2::after,
.ingredient-acheter-section h2::after,
.similar-recipes-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px; /* Largeur augmentée pour correspondre aux autres pages */
    height: 3px;
    background-color: var(--primary-color, #FF6B6B);
}

/* Pour la sidebar, ligne plus courte */
.sidebar-title-styled::after {
    width: 40px;
    height: 2px;
}

/* Liens dans les titres */
.section-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.section-title-link:hover {
    color: var(--primary-color, #FF6B6B);
}

/* Bouton d'action associé aux titres */
.section-action-btn {
    font-size: 0.9rem;
    padding: 8px 20px;
    white-space: nowrap;
}

/* ============================================
   AJUSTEMENTS SPÉCIFIQUES PAR PAGE
============================================ */

/* Sidebar titles - Taille légèrement réduite */
.sidebar-title-styled {
    font-size: 1.2rem !important;
    margin: 0 0 15px 0 !important;
    padding-bottom: 10px !important;
}

/* Modal dans categories */
.modal-title {
    margin-bottom: 20px !important;
}

/* Sections de recettes - Styles comme dans page-recette-contenu.css */
.recette-ingredients-section h2,
.recette-ustensiles-section h2,
.recette-preparation-section h2,
.recette-nutrition-section h2,
.recette-conseils-section h2,
.recette-suggestions-section h2,
.recette-conservation-section h2,
.ingredient-conservation-section h2,
.ingredient-preparation-section h2,
.ingredient-comment-choisir-section h2,
.ingredient-anti-gaspi-section h2,
.ingredient-labels-section h2,
.ingredient-alternatives-section h2,
.ingredient-bienfaits-section h2,
.ingredient-allergenes-section h2,
.ingredient-nutrition-section h2,
.ingredient-acheter-section h2,
.similar-recipes-section h2 {
    /* font-size: 1.4rem !important; */
    margin-bottom: 0px !important;
    padding-bottom: 10px !important;
}

/* Titre principal de page index.php */
.section-title-container .section-title {
    display: inline-block;
    padding-bottom: 10px;
}

/* H1 de categories.php avec le même style ::after */
.main-content h1 {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.main-content h1::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100px;
    height: 3px;
    background-color: var(--primary-color, #FF6B6B);
}

/* ============================================
   RESPONSIVE - ADAPTATION MOBILE
============================================ */

@media (max-width: 768px) {
    /* Réduction de la taille sur mobile */
    .section-title,
    .modal-title,
    .recette-ingredients-section h2,
    .recette-ustensiles-section h2,
    .recette-preparation-section h2,
    .recette-nutrition-section h2,
    .recette-conseils-section h2,
    .recette-suggestions-section h2,
    .recette-conservation-section h2,
    .ingredient-conservation-section h2,
    .ingredient-preparation-section h2,
    .ingredient-comment-choisir-section h2,
    .ingredient-anti-gaspi-section h2,
    .ingredient-labels-section h2,
    .ingredient-alternatives-section h2,
    .ingredient-bienfaits-section h2,
    .ingredient-allergenes-section h2,
    .ingredient-nutrition-section h2,
    .ingredient-acheter-section h2,
    .similar-recipes-section h2 {
        font-size: 1.5rem;
    }
    
    .sidebar-title-styled {
        font-size: 1.2rem !important;
    }

    
    .section-title-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .section-action-btn {
        align-self: stretch;
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* Taille encore plus réduite sur très petit écran */
    .section-title,
    .modal-title,
    .recette-ingredients-section h2,
    .recette-ustensiles-section h2,
    .recette-preparation-section h2,
    .recette-nutrition-section h2,
    .recette-conseils-section h2,
    .recette-suggestions-section h2,
    .recette-conservation-section h2,
    .ingredient-conservation-section h2,
    .ingredient-preparation-section h2,
    .ingredient-comment-choisir-section h2,
    .ingredient-anti-gaspi-section h2,
    .ingredient-labels-section h2,
    .ingredient-alternatives-section h2,
    .ingredient-bienfaits-section h2,
    .ingredient-allergenes-section h2,
    .ingredient-nutrition-section h2,
    .ingredient-acheter-section h2,
    .similar-recipes-section h2 {
        font-size: 1.3rem;
        gap: 8px;
    }
    
    .sidebar-title-styled {
        font-size: 1.1rem !important;
    }

    
    .section-title-container {
        margin-top: 40px;
        margin-bottom: 0px;
    }
}

/* ============================================
   TRANSITIONS ET ANIMATIONS
============================================ */

/* Transition douce pour les changements de couleur */
.section-title,
.modal-title,
.sidebar-title-styled,
.recette-ingredients-section h2,
.recette-ustensiles-section h2,
.recette-preparation-section h2,
.recette-nutrition-section h2,
.recette-conseils-section h2,
.recette-suggestions-section h2,
.recette-conservation-section h2,
.ingredient-conservation-section h2,
.ingredient-preparation-section h2,
.ingredient-comment-choisir-section h2,
.ingredient-anti-gaspi-section h2,
.ingredient-labels-section h2,
.ingredient-alternatives-section h2,
.ingredient-bienfaits-section h2,
.ingredient-allergenes-section h2,
.ingredient-nutrition-section h2,
.ingredient-acheter-section h2,
.similar-recipes-section h2 {
    transition: color 0.3s ease;
}

/* ============================================
   AJUSTEMENTS FINAUX
============================================ */

/* Espacement uniforme entre sections */
section + section {
    margin-top: 1rem;
}

/* Ajustement pour la première section après le header */
main section:first-child h2 {
    margin-top: 0;
}

/* Force la présence du ::after sur tous les H2 concernés */
.section-title-container .section-title {
    position: relative;
}

/* ============================================
   STYLE SPÉCIFIQUE POUR .article-title--primary
============================================ */

.article-title--primary {
    font-size: 1.15rem !important;
    margin-bottom: 0px !important;
    padding-bottom: 10px !important;
}

