/*
Theme Name: Handiflirt Light
Theme URI: https://handiflirt.be
Author: Olivier Wilhelmus
Description: Thème accessible et optimisé SEO pour Handiflirt
Version: 1.0
Text Domain: handiflirt
*/
/* === GLOBAL === */
body {
background: #eef3f8;
color: #222222;
font-family: "Poppins", sans-serif;
margin: 0;
}

a {
color: #0b3d91;
text-decoration: none;
transition: 0.3s;
}
a:hover { color: #1558b0; }

h1,h2,h3,h4,h5,h6 {
color: #0b3d91;
margin: 0 0 12px;
font-weight: 600;
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; }
h6 { font-size: 13px; }

.container {
width: 92%;
max-width: 1200px;
margin: 0 auto;
box-sizing: border-box;
}

figure { margin: 0; }

/* === HEADER === */
header.site-header {
background: #ffffff;
padding: 12px 20px;
border-bottom: 1px solid #d6e0ea;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
z-index: 1000;
}

.site-branding {
display: flex;
align-items: center;
gap: 12px;
}

.site-logo {
width: 38px;
height: auto;
display: block;
}

.site-title-text {
font-size: 30px;
font-weight: 500;
color: #0b3d91;
line-height: 1;
}
.site-title-text:hover { color: #1e73be; }

/* === NAVIGATION === */
.main-nav {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
max-width: 70%;
}
.main-nav ul {
list-style: none;
display: flex;
gap: 16px;
margin: 0;
padding: 0;
}
.main-nav a { color: #0b3d91; }
.main-nav a:hover { color: #1558b0; }

.menu-toggle {
display: none;
font-size: 26px;
cursor: pointer;
color: #0b3d91;
background: none;
border: none;
}

/* === TITRE PRINCIPAL (home/cat/tag) === */
.container > h1 {
margin: 20px 0 15px;
font-size: 24px;
text-align: center;
}
.container > h1 small {
font-size: 0.5em;
color: #777;
margin-left: 8px;
}

/* === ARTICLES GRID === */
.articles-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
margin: 15px 0;
}
.articles-grid article {
background: #ffffff;
border-radius: 8px;
padding: 12px;
display: flex;
flex-direction: column;
transition: transform 0.2s, box-shadow 0.2s;
}
.articles-grid article:hover {
transform: translateY(-4px);
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.articles-grid article h2 {
margin-bottom: 6px;
}
.articles-grid article p {
margin-top: 0;
}

/* === VIGNETTES (16/9) === */
.thumb,
.single-thumb {
position: relative;
width: 100%;
padding-top: 56.25%;
overflow: hidden;
border-radius: 6px;
margin-bottom: 12px;
background: #e6edf5;
}
.thumb img,
.single-thumb img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
display: block;
}

/* === HERO === */
.hero-article {
position: relative;
margin: 15px 0 30px;
border-radius: 10px;
overflow: hidden;
}
.hero-thumb img {
width: 100%;
aspect-ratio: 16/9;
object-fit: cover;
display: block;
filter: brightness(70%);
transition: transform 0.4s ease;
}
.hero-article:hover .hero-thumb img { transform: scale(1.05); }
.hero-content {
position: absolute;
bottom: 15px;
left: 15px;
right: 15px;
color: #ffffff;
text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}
.hero-content h1,
.hero-content h2 {
font-size: 22px;
margin: 0 0 6px;
color: #4da3ff;
}
.hero-content p { font-size: 15px; margin: 0; }

/* === PAGINATION === */
.articles-pagination {
margin: 15px 0;
text-align: center;
}
.articles-pagination .nav-links {
display: flex;
justify-content: center;
align-items: center;
gap: 6px;
flex-wrap: nowrap;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
.articles-pagination .page-numbers {
flex: 0 0 auto;
padding: 6px 10px;
background: #ffffff;
border-radius: 4px;
color: #0b3d91;
font-size: 14px;
white-space: nowrap;
}
.articles-pagination .page-numbers:hover {
background: #1e73be;
color: #ffffff;
}
.articles-pagination .page-numbers.current {
background: #0b3d91;
color: #ffffff;
font-weight: bold;
}
/* === FOOTER === */
.site-footer {
background: #ffffff;
color: #6b7280;
text-align: center;
padding: 18px;
margin-top: 30px;
font-size: 14px;
}

.footer-menu {
list-style: none;
display: flex;
justify-content: center;
gap: 20px;
margin: 10px 0 0;
padding: 0;
}
.footer-menu li { display: inline; }
.footer-menu a {
color: #0b3d91;
text-decoration: none;
font-size: 14px;
}
.footer-menu a:hover { color: #1558b0; }

/* === BOUTON REMONTER EN HAUT === */
.back-to-top {
position: fixed;
bottom: 25px;
right: 25px;
width: 45px;
height: 45px;
background: #0b3d91;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
box-shadow: 0 4px 10px rgba(0,0,0,0.4);
transition: opacity 0.3s, transform 0.3s;
opacity: 0;
pointer-events: none;
z-index: 999;
}
.back-to-top::before {
content: "";
display: block;
width: 12px;
height: 12px;
border-left: 3px solid #ffffff;
border-bottom: 3px solid #ffffff;
transform: rotate(135deg);
}
.back-to-top.show {
opacity: 1;
pointer-events: auto;
}
.back-to-top:hover {
background: #1e73be;
transform: translateY(-3px);
}

/* === MENU MOBILE === */
@media (max-width: 768px) {
.menu-toggle { display: block; }
.main-nav {
display: none;
position: absolute;
top: 100%;
left: 0;
width: 100%;
background: #ffffff;
border-top: 1px solid #e5e7eb;
z-index: 999;
flex-direction: column;
}
.main-nav.active { display: flex; }
.main-nav a {
display: block;
padding: 12px 16px;
color: #0b3d91;
}
.main-nav a:hover {
background: #eef3f8;
color: #1558b0;
}
}

/* === MENU DESKTOP === */
@media (min-width: 769px) {
.menu-toggle { display: none; }
.main-nav { display: flex; background: transparent; border: 0; position: static; }
.main-nav ul { flex-direction: row; gap: 20px; }
}

/* === SINGLE AVEC SIDEBAR === */
.single-layout {
display: flex;
flex-wrap: wrap;
gap: 25px;
align-items: flex-start;
margin-top: 20px;
}

.single-article {
flex: 1 1 700px;
background: #ffffff;
padding: 18px;
border-radius: 8px;
border: 1px solid #e5e7eb;
box-sizing: border-box;
}

.single-header h1 {
color: #0b3d91;
font-size: 24px;
margin-bottom: 10px;
}

.single-header .meta {
font-size: 13px;
color: #6b7280;
margin-bottom: 15px;
}

.single-content p {
line-height: 1.7;
margin-bottom: 0.8em;
}

.single-footer {
margin-top: 30px;
border-top: 1px solid #e5e7eb;
padding-top: 15px;
}

.post-nav {
display: flex;
justify-content: space-between;
}

/* === SIDEBAR === */
.sidebar {
flex: 0 0 300px;
background: #ffffff;
padding: 15px;
border-radius: 8px;
border: 1px solid #e5e7eb;
color: #6b7280;
position: sticky;
top: 25px;
height: fit-content;
box-sizing: border-box;
}

.sidebar h3 {
color: #0b3d91;
margin-bottom: 10px;
font-size: 16px;
border-bottom: 1px solid #e5e7eb;
padding-bottom: 6px;
}

.widget { margin-bottom: 20px; }

/* === AUTEUR === */
.author-box {
display: flex;
align-items: center;
gap: 10px;
margin-top: 20px;
}
.author-photo {
width: 45px;
height: 45px;
border-radius: 50%;
object-fit: cover;
border: 2px solid #1e73be;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
.single-layout {
flex-direction: column;
}
.sidebar {
width: 100%;
margin-top: 20px;
position: static;
}
}

/* === CORRECTION ALIGNEMENT LOGO + TITRE === */
.site-title-text {
color: #0b3d91;
}
.site-title-text:hover { color: #1e73be; }

/* === MENU BURGER (MOBILE) */
@media (max-width: 768px) {
.main-nav a {
color: #0b3d91;
}

.main-nav a:hover {
background: #eef3f8;
color: #1558b0;
}
}

/* === HEADER ALIGNEMENT GLOBAL === */
.site-header {
background: #ffffff;
border-bottom: 1px solid #e5e7eb;
}

.site-title-text {
color: #0b3d91;
}
.site-title-text:hover { color: #1e73be; }

/* === MENU BURGER (MOBILE) === */
@media (max-width: 768px) {
.main-nav {
display: none;
flex-direction: column;
align-items: center;
background: #ffffff;
border-top: 1px solid #e5e5e5;
width: 100%;
position: absolute;
top: 100%;
left: 0;
z-index: 999;
padding: 10px 0;
}

.main-nav.active {
display: flex !important;
animation: fadeIn 0.3s ease-in-out;
}

.main-nav ul {
flex-direction: column;
width: 100%;
text-align: center;
}

.main-nav li {
width: 100%;
border-top: 1px solid #e5e5e5;
}

.main-nav li:first-child {
border-top: none;
}

.main-nav a {
display: block;
padding: 14px;
font-size: 16px;
color: #0b3d91;
}

.main-nav a:hover {
background: #f6f1e8;
color: #385898;
}

@keyframes fadeIn {
from { opacity: 0; transform: translateY(-5px); }
to { opacity: 1; transform: translateY(0); }
}
}
/* === SIDEBAR RESPONSIVE (fix overflow) */
.sidebar {
background: #ffffff;
border: 1px solid #e5e7eb;
color: #6b7280;
}

/* ADS */
.adsbygoogle {
background-color: #ffffff !important;
color: #222222 !important;
border: 0px solid #e5e7eb !important;
border-radius: 8px;
padding: 10px;
}

.adsbygoogle a {
color: #0b3d91 !important;
}

body::after {
background: linear-gradient(to top, rgba(238,243,248,0.9), transparent);
}

/* CTA "Lire l’article" */
article a figure::after,
article a .thumb::after,
article a .post-thumb::after,
article a .featured-image::after {
color: #ffffff;
background: rgba(11,61,145,.85);
border: 1px solid rgba(255,255,255,.18);
}

article a:hover figure::after,
article a:hover .thumb::after,
article a:hover .post-thumb::after,
article a:hover .featured-image::after {
background: rgba(30,115,190,.90);
}

/* Hook */
.rencontre-hook {
color: #0b3d91;
}

/* POPUP */
.sf-btn {
background: #0b3d91;
color: #ffffff;
}

.sf-text {
color: #6b7280;
}

.sf-close {
color: #6b7280;
}

/* RELATED */
.related-card {
border: 1px solid #e5e7eb;
}

.related-content h3 {
color: #0b3d91;
}

.related-content p {
color: #6b7280;
}

/* FIL D'ARIANE */
.breadcrumb,
.breadcrumb a,
.breadcrumb span,
.breadcrumbs,
.breadcrumbs a,
.breadcrumbs span {
color: #6b7280 !important;
}

.breadcrumb a,
.breadcrumbs a {
color: #0b3d91 !important;
}

.breadcrumb a:hover,
.breadcrumbs a:hover {
color: #1558b0 !important;
}