/*
Theme Name: ADEAS Theme Update
Theme URI: https://www.adeas.org/
Author: Frantz
Description: Thème WordPress sur-mesure intégrant la charte graphique officielle de l'ADEAS. Couleurs bleu institutionnel et orange d'action, typographies National Park pour les titres et Inter pour le corps de texte. Accueil éditorial configurable : Super une, publications, tribunes, vidéos et agenda. Compatible avec l'Éditeur Classique.
Version: 1.3.61
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adeas-theme
*/

/* ==========================================================================
   1. POLICES & TYPOGRAPHIE (Charte ADEAS - 100% Locales .ttf)
   ========================================================================== */

/* --- POLICE DE TITRES : National Park --- */

@font-face {
    font-family: 'National Park';
    src: url('fonts/NationalPark-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'National Park';
    src: url('fonts/NationalPark-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'National Park';
    src: url('fonts/NationalPark-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'National Park';
    src: url('fonts/NationalPark-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'National Park';
    src: url('fonts/NationalPark-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'National Park';
    src: url('fonts/NationalPark-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'National Park';
    src: url('fonts/NationalPark-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* --- POLICE DE TEXTES : Inter --- */

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter_18pt-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter_18pt-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter_18pt-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter_18pt-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter_18pt-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter_18pt-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter_18pt-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter_18pt-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter_18pt-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter_18pt-ExtraBoldItalic.ttf') format('truetype');
    font-weight: 800;
    font-style: italic;
    font-display: swap;
}

/* ==========================================================================
   2. STYLES GÉNÉRAUX DE LA CHARTE
   ========================================================================== */

body {
    background-color: #F2F2F2;
    color: #3C3C3B;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 300;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .font-title {
    font-family: 'National Park', sans-serif;
    font-weight: 700;
}

/* Le bleu reste réservé aux titres : les éléments qui n'emploient .font-title
   que pour la police conservent leur couleur de contexte ou leur utilitaire. */
h1, h2, h3, h4, h5, h6 {
    color: #1B499B;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

/* ==========================================================================
   3. RESPECT DE LA RÈGLE D'OR (Pas d'Orange sur Bleu / Pas de Bleu sur Orange)
   ========================================================================== */

.bg-adeas-blue {
    background-color: #1B499B !important;
}

.text-adeas-blue {
    color: #1B499B !important;
}

.bg-adeas-orange {
    background-color: #FF5D0E !important;
}

.text-adeas-orange {
    color: #FF5D0E !important;
}

.bg-adeas-blue .text-adeas-orange,
.bg-adeas-blue a.text-adeas-orange,
.bg-adeas-orange .text-adeas-blue,
.bg-adeas-orange a.text-adeas-blue {
    color: #FFFFFF !important;
}

.btn-adeas-orange {
    background-color: #FF5D0E !important;
    color: #FFFFFF !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    transition: background-color 0.3s ease;
}

.btn-adeas-orange:hover {
    background-color: #D94F0C !important;
}

.btn-adeas-blue {
    background-color: #1B499B !important;
    color: #FFFFFF !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    transition: background-color 0.3s ease;
}

/* Référence de la charte pour les boutons d'action : le bleu institutionnel
   cède la place à l'orange au survol, comme le bouton de recherche et les
   icônes de réseaux sociaux. */
.btn-adeas-blue:hover {
    background-color: #FF5D0E !important;
}

/* Bouton secondaire sur fond blanc : la nuance d'orange adoucie déjà utilisée
   pour les survols de listes. */
.btn-adeas-outline {
    background-color: #FFFFFF !important;
    color: #1B499B !important;
    border: 1px solid #D1D5DB !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.btn-adeas-outline:hover {
    background-color: #FFF2EB !important;
    border-color: #FF5D0E !important;
    color: #FF5D0E !important;
}

/* ==========================================================================
   4. STYLES TECHNIQUES POUR WORDPRESS
   ========================================================================== */

.wp-admin-bar {
    font-family: sans-serif !important;
}

/* --- Bloc de recherche Wordpress (Gutenberg & Widgets) --- */

/* Style harmonisé du titre pour les widgets */
.widget_search .wp-block-search__label,
.widget-title,
.widget h1,
.widget h2,
.widget h3,
.widget h4,
.widget h5,
.widget h6,
.widget_block h1,
.widget_block h2,
.widget_block h3,
.widget_block h4,
.widget_block h5,
.widget_block h6,
.widget .widget-title {
    display: block !important;
    text-align: center !important;
    color: #1B499B !important;
    font-family: 'National Park', sans-serif !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    padding-bottom: 0.75rem !important;
    margin-bottom: 1rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-bottom: 1px solid #F3F4F6 !important;
}

/* Encart de saisie de recherche (Conteneur externe) */
.wp-block-search__inside-wrapper {
    border: 1px solid #D1D5DB !important;
    border-radius: 12px !important;
    padding: 3px !important;
    background-color: #F9FAFB !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

/* Effet au survol ou au focus de l'encart */
.wp-block-search__inside-wrapper:hover {
    border-color: #9CA3AF !important;
}

.wp-block-search__inside-wrapper:focus-within {
    border-color: #FF5D0E !important;
    background-color: #FFFFFF !important;
    box-shadow: 0 0 0 3px rgba(255, 93, 14, 0.15) !important;
}

/* Zone de saisie texte */
.wp-block-search__input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 8px 12px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.875rem !important;
    color: #3C3C3B !important;
    flex-grow: 1 !important;
    height: auto !important;
}

/* Bouton du formulaire de recherche */
.wp-block-search__button {
    background-color: #1B499B !important;
    color: #FFFFFF !important;
    border-radius: 8px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    padding: 8px 16px !important;
    border: none !important;
    margin-left: 4px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.wp-block-search__button:hover {
    background-color: #FF5D0E !important;
    color: #FFFFFF !important;
}

/* --- Widgets Listes (Articles Récents, Catégories et Menus de Liens) --- */

/* Alignement cohérent pour toutes les listes de widgets de la barre latérale */
.widget ul, 
.widget_block ul,
.wp-block-latest-posts,
.wp-block-categories {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Éléments de liste individuels avec transition douce */
.widget ul li,
.widget_block ul li {
    position: relative !important;
    padding: 10px 12px 10px 24px !important; /* Laisse de la place pour la puce stylisée */
    border-bottom: 1px dashed #E5E7EB !important; /* Ligne de séparation épurée */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 8px !important;
    margin-bottom: 2px !important;
}

/* Supprime la bordure sous le tout dernier élément de la liste */
.widget ul li:last-child,
.widget_block ul li:last-child {
    border-bottom: none !important;
}

/* Création d'une puce personnalisée minimaliste par défaut (Règle d'or de la charte) */
.widget ul li::before,
.widget_block ul li::before {
    content: "→" !important;
    position: absolute !important;
    left: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #1B499B !important; /* Bleu institutionnel */
    font-weight: bold !important;
    font-size: 0.85rem !important;
    opacity: 0.7 !important;
    transition: all 0.25s ease !important;
}

/* Style des liens par défaut dans les listes */
.widget ul li a,
.widget_block ul li a {
    color: #3C3C3B !important; /* Gris foncé de la charte */
    font-family: 'Inter', sans-serif !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: color 0.25s ease !important;
    width: 100% !important;
}

/* --- Comportement au Survol (Hover) Respectueux de la Charte d'Action --- */
.widget ul li:hover,
.widget_block ul li:hover {
    background-color: #FFF2EB !important; /* Retours de survol subtilement teintés à l'orange d'action adouci */
}

/* La puce s'illumine en Orange d'action et effectue un micro-mouvement horizontal */
.widget ul li:hover::before,
.widget_block ul li:hover::before {
    color: #FF5D0E !important; /* Orange d'action de l'ADEAS au survol */
    opacity: 1 !important;
}

/* Le lien s'affiche en Bleu de marque au survol sans forcer le redimensionnement */
.widget ul li:hover a,
.widget_block ul li:hover a {
    color: #1B499B !important; /* Retour vers le Bleu institutionnel */
}

/* --- Support élégant du widget / menu réseaux sociaux moderne (ADEAS conforme) --- */
.adeas-social-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1B499B;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.adeas-social-icon-btn svg,
.adeas-social-icon-btn i {
    width: 19px;
    height: 19px;
    font-size: 19px;
    display: block;
    transition: transform 0.3s ease;
}

/* Comportements au survol - Bascule élégante vers l'Orange d'action de la charte */
.adeas-social-icon-btn:hover {
    background-color: #FF5D0E !important; 
    border-color: #FF5D0E !important;
    color: #FFFFFF !important;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(255, 93, 14, 0.25);
}

.adeas-social-icon-btn:hover svg,
.adeas-social-icon-btn:hover i {
    transform: scale(1.15);
}

/* --- Support élégant du logo personnalisé (has_custom_logo) --- */
#logo-wrap {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left center;
    display: flex;
    align-items: center;
}

.custom-logo-link {
    display: flex;
    align-items: center;
    height: 100%;
    transition: transform 0.3s ease;
}

.custom-logo {
    display: block;
    max-height: 80px; /* Exploite de façon optimale la hauteur du header h-24 (96px) */
    width: auto;
    object-fit: contain;
}

/* ==========================================================================
   5. NAVIGATION HEADER (Correction du décalage visuel / FOUC de chargement)
   ========================================================================== */

/* Structure de base du Header chargée immédiatement par le navigateur */
#main-header {
    display: block;
    width: 100%;
}

#header-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Éviter l'affichage vertical brut des listes <li> avant chargement de Tailwind */
#header-container .adeas-desktop-navigation {
    display: none; /* Masqué par défaut sur mobile */
}

@media (min-width: 1200px) {
    #header-container .adeas-desktop-navigation {
        display: flex !important;
        align-items: center !important;
        gap: 1.5rem !important; /* Spacing horizontal (équivalent space-x-6) */
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #header-container .adeas-desktop-navigation li,
    #header-container .adeas-desktop-navigation .menu-item {
        display: inline-flex !important;
        align-items: center !important;
        list-style-type: none !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #header-container .adeas-desktop-navigation a {
        text-decoration: none !important;
        transition: color 0.2s ease !important;
    }

    #header-container .adeas-desktop-navigation a:hover {
        color: #FF5D0E !important; /* Orange d'action de l'ADEAS au survol */
    }
}

/* ==========================================================================
   6. BULLES D'AIDE UNIVERSELLES (Custom Tooltips conforme ADEAS)
   ========================================================================== */

/* Structure du conteneur de la bulle d'aide */
.adeas-tooltip-container {
    position: fixed;
    z-index: 100000;
    pointer-events: none;
    background-color: #3C3C3B; /* Gris foncé de la charte de l'ADEAS */
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(60, 60, 59, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1);
    white-space: normal; /* Autorise le retour à la ligne pour un affichage complet */
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    text-align: center;
    width: max-content;
    max-width: 250px;
    opacity: 0;
    transform: translateY(4px) scale(0.95);
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bulle d'aide à l'état actif */
.adeas-tooltip-container.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Flèche d'orientation de la bulle (Haut / Bas) */
.adeas-tooltip-container::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    left: 50%;
    transform: translateX(-50%);
}

/* Flèche pointant vers le bas (infobulle située au-dessus de l'élément) */
.adeas-tooltip-container.tooltip-above::after {
    bottom: -6px;
    border-width: 6px 6px 0 6px;
    border-color: #3C3C3B transparent transparent transparent;
}

/* Flèche pointant vers le haut (infobulle située en-dessous de l'élément) */
.adeas-tooltip-container.tooltip-below::after {
    top: -6px;
    border-width: 0 6px 6px 6px;
    border-color: transparent transparent #3C3C3B transparent;
}