/*
Theme Name: Agenda 2030
Theme URI: 
Author: Romain Testaert
Author URI: 
Description: 
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 5.7
Version: 
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: agenda-2030
Tags: 
*/

/* =========================================
   STYLE FINAL : ROBOTO (Thème) - PADDING 12PX - HAUTEUR ÉGALE
   ========================================= */
.texte-contour {
    /* Rend l'intérieur des lettres transparent */
    color: transparent; 
    /* Définit l'épaisseur et la couleur du contour */
    -webkit-text-stroke: 3.6px #00909D; /* Changez #009BB4 par votre couleur */
    /* Optionnel : pour les navigateurs très récents */
    text-stroke: 2px #00909D;
}

/* 1. CONTENEUR GLOBAL */
#agenda-final {
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 20px;
    box-sizing: border-box;
    
    /* ON APPELLE JUSTE LA POLICE DU THÈME ICI */
    font-family: 'Roboto', sans-serif !important;
}

/* 2. CACHER INPUTS */
#agenda-final input[name="filtre"] { display: none !important; }

/* 3. MENU (CONTENEUR BOUTONS) */
#agenda-final .menu-filtres {
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: center !important;
    align-items: stretch !important; /* Hauteur identique pour tous */
    gap: 15px !important;
    margin-bottom: 40px !important;
    width: 100%;
}

/* 4. BOUTONS (DESIGN) */
#agenda-final .btn-tri {
    width: auto !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    
    /* TON PADDING DE 12PX */
      padding-top:12px !important;
		padding-bottom:12px !important;
	padding-left:36px !important;
	padding-right:36px !important;
    background: white;
    border: 2px solid #eee;
    border-radius: 50px !important; /* Arrondi pilule */
    
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease-in-out !important;
    text-decoration: none !important;
}

/* TEXTES (Police héritée du conteneur #agenda-final) */
#agenda-final .btn-tri strong { 
    font-size: 20px; 
    font-weight: 700 !important; /* Mettre 400 ici si tu ne veux PAS de gras du tout */
    display: block; 
    line-height: 1.2;
    margin-bottom: 2px;
    color: #555; 
}

#agenda-final .btn-tri span { 
    font-size: 16px; 
    font-weight: 400 !important; /* C'est ça le "Regular" */
    opacity: 0.8; 
    color: #777;
}

/* SURVOL */
#agenda-final .btn-tri:hover { 
    transform: translateY(-2px); 
    border-color: #bbb;
}

/* --- COULEURS ET ÉTATS (HOVER / CHECKED) --- */

/* TOUS */
#agenda-final label[for="all"] { border-color: #ccc !important; }
#agenda-final label[for="all"]:hover,
#agenda-final:has(#all:checked) label[for="all"] { 
    background: #333 !important; border-color: #333 !important; 
}
#agenda-final label[for="all"]:hover *, #agenda-final:has(#all:checked) label[for="all"] * { color: white !important; }

/* SOCIAL */
#agenda-final .btn-soc { border-color: #e5243b !important; color: #e5243b !important; }
#agenda-final .btn-soc:hover,
#agenda-final:has(#social:checked) .btn-soc { background: #e5243b !important; }
#agenda-final .btn-soc:hover *, #agenda-final:has(#social:checked) .btn-soc * { color: white !important; }

/* ÉCONOMIE */
#agenda-final .btn-eco { border-color: #f57c00 !important; color: #f57c00 !important; }
#agenda-final .btn-eco:hover,
#agenda-final:has(#eco:checked) .btn-eco { background: #f57c00 !important; }
#agenda-final .btn-eco:hover *, #agenda-final:has(#eco:checked) .btn-eco * { color: white !important; }

/* ENVIRONNEMENT */
#agenda-final .btn-env { border-color: #3f7e44 !important; color: #3f7e44 !important; }
#agenda-final .btn-env:hover,
#agenda-final:has(#env:checked) .btn-env { background: #3f7e44 !important; }
#agenda-final .btn-env:hover *, #agenda-final:has(#env:checked) .btn-env * { color: white !important; }


/* --- LOGIQUE DE FILTRE --- */
#agenda-final:has(#social:checked) .item-odd:not(.cat-social) { display: none !important; }
#agenda-final:has(#eco:checked) .item-odd:not(.cat-eco) { display: none !important; }
#agenda-final:has(#env:checked) .item-odd:not(.cat-env) { display: none !important; }

/* Animation */
@keyframes oddShow { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
#agenda-final .item-odd { animation: oddShow 0.4s ease-out; }


/* --- GRILLE IMAGES --- */
#agenda-final .grille-odd {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important; 
    gap: 20px !important;
    justify-content: center !important;
    width: 100% !important;
}

#agenda-final .item-odd {
    width: 100% !important; aspect-ratio: 1 / 1;
    cursor: pointer; transition: transform 0.2s;
}
#agenda-final .item-odd:hover { transform: scale(1.05); z-index: 5; }
#agenda-final .item-odd img {
    width: 100% !important; height: 100% !important;
    object-fit: contain !important; display: block !important; margin: 0 !important;
}

/* =========================================
   CARTES CLIQUABLES (ACCUEIL)
   ========================================= */

/* 1. La Colonne (le conteneur) */
.card-cliquable {
    position: relative !important; /* Indispensable : définit la zone de référence */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Animation fluide */
    cursor: pointer; /* Change la souris en main */
}

/* 2. Petit effet de survol sympa (la carte remonte) */
.card-cliquable:hover {
    transform: translateY(-5px); /* La carte monte de 5px */
    z-index: 5; /* Passe au-dessus des autres si besoin */
}

/* 3. L'extension du lien (LE SECRET) */
/* On cible n'importe quel lien (a) qui se trouve DANS .card-cliquable */
.card-cliquable a::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1; /* Le calque invisible passe par dessus tout le contenu */
}

/* =========================================
   LOGO DÉBORDANT (HEADER)
   ========================================= */

/* 1. On cible le bloc du logo via ta classe */
.logo-decal {
    /* "Absolute" sort l'élément du flux : le header ne voit plus sa taille */
    position: absolute !important;
    
    /* On le cale en haut à gauche */
    top: 0;
    left: 20px; /* Ajuste cette valeur selon la marge que tu veux à gauche */
    
    /* On force la taille (plus grande que le header) */
    width: 140px !important; /* Mets la taille souhaitée ici */
    max-width: none !important; /* Désactive les limites de WordPress */
    
    /* TRÈS IMPORTANT : Le Z-Index */
    /* Pour que le logo passe PAR DESSUS la bannière photo */
    z-index: 1000;
}

/* =========================================
   BOUTON ODD : INVERSION AU SURVOL
   ========================================= */

/* 1. L'état NORMAL */
/* On cible le lien (a) à l'intérieur du bloc bouton */
.generic-btn .wp-block-button__link {
    /* REMPLACE CE CODE COULEUR PAR TON BLEU EXACT */
    background-color: #003b6d !important; 
    color: white !important;
    
    /* On met la bordure tout de suite pour éviter le "saut" */
    border: 2px solid #003b6d !important; 
    
    transition: all 0.3s ease-in-out !important; /* Animation fluide */
}

/* 2. L'état SURVOL (Hover) */
.generic-btn .wp-block-button__link:hover {
    /* Le fond devient blanc */
    background-color: white !important;
    
    /* Le texte prend la couleur bleue */
    color: #003b6d !important;
    
    /* La bordure reste bleue, mais devient visible car le fond est blanc */
    border: 2px solid #003b6d !important;
}

.card-hover,
.card-hover * {
    /* LA TRANSITION DOIT ÊTRE ICI */
    /* Cela permet l'animation à l'aller ET au retour */
    transition: all 0.3s ease-in-out !important;
}

.card-hover:hover {
	background: #ffde14 !important;
}

/* Changement de couleur du texte */
.card-hover:hover,
.card-hover:hover * {
    color: black !important;
}



.wp-block-group a:hover {
	color:#d1c500 ;
}

.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content:hover {
	color:#d1c500;
}

.pum-close popmake-close:hover {
background-color:black;
}



/* RESPONSIVE */
@media (max-width: 1200px) {
    #agenda-final .grille-odd { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (max-width: 768px) {
    #agenda-final .grille-odd { grid-template-columns: repeat(2, 1fr) !important; }
}