/*
Theme Name: Informaticien Public
Theme URI: https://informaticien-public.be
Author: Olivier Wilhelmus
Description: Thème accessible et optimisé SEO
Version: 1.0.7
Text Domain: informaticien-public
*/
/* === GLOBAL === */
body {
background: var(--ip-bg);
color: var(--ip-text);
font-family: "Poppins", sans-serif;
margin: 0;
}

a {
color: var(--ip-link);
text-decoration: none;
transition: 0.3s;
}
a:hover { color: var(--ip-hover); }

h1,h2,h3,h4,h5,h6 {
color: var(--ip-link);
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: 1400px;
margin: 0 auto;
box-sizing: border-box;
}

figure { margin: 0; }

/* === HEADER === */
header.site-header {
background: var(--ip-surface);
padding: 12px 20px;
border-bottom: 1px solid var(--ip-border);
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: var(--ip-link);
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: var(--ip-link); }
.main-nav a:hover { color: var(--ip-hover); }

.menu-toggle {
display: none;
font-size: 26px;
cursor: pointer;
color: var(--ip-link);
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: var(--ip-muted);
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:var(--ip-surface);
border-radius:8px;
padding:12px;
display:flex;
flex-direction:column;
transition:transform .2s, box-shadow .2s;
}

.articles-grid article:hover{
transform:translateY(-4px);
box-shadow:0 4px 12px rgba(0,0,0,.15);
}

.article-link{
display:block;
text-decoration:none;
color:inherit;
}

.articles-grid article h2{
margin:8px 0 6px;
font-size:20px;
line-height:1.3;
color:var(--ip-link);
}

.post-meta{
font-size:14px;
color:var(--ip-muted);
margin-bottom:10px;
}

.articles-grid article p{
margin-top:0;
color:var(--ip-muted);
line-height:1.6;
}

/* === VIGNETTES (16/9) === */

.thumb,
.single-thumb{
position:relative;
width:100%;
padding-top:56.25%;
overflow:hidden;
border-radius:6px;
margin-bottom:12px;
background:var(--ip-border);
}

.thumb img,
.single-thumb img{
position:absolute;
inset:0;
width:100%;
height:100%;
object-fit:cover;
object-position:center;
display:block;
transition:transform .35s ease;
}

.articles-grid article:hover .thumb img{
transform:scale(1.04);
}

/* === BADGE CATEGORIE === */

.post-cat{
position:absolute;
top:10px;
left:10px;
z-index:5;

background:var(--ip-link);
color:#fff;

padding:5px 10px;

font-size:11px;
font-weight:700;

text-transform:uppercase;

border-radius:5px;

box-shadow:0 2px 8px rgba(0,0,0,.25);
}

/* === 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 .4s ease;
}

.hero-article:hover .hero-thumb img{
transform:scale(1.05);
}

.hero-content{
position:absolute;
bottom:15px;
left:15px;
right:15px;
color:#fff;
text-shadow:0 2px 6px rgba(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: var(--ip-surface);
border-radius: 4px;
color: var(--ip-link);
font-size: 14px;
white-space: nowrap;
}
.articles-pagination .page-numbers:hover {
background: #1e73be;
color: #fff;
}
.articles-pagination .page-numbers.current {
background: var(--ip-link);
color: #fff;
font-weight: bold;
}
/* === FOOTER === */
.site-footer {
background: var(--ip-surface);
color: var(--ip-muted);
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: var(--ip-link);
text-decoration: none;
font-size: 14px;
}
.footer-menu a:hover { color: var(--ip-hover); }

/* === BOUTON REMONTER EN HAUT === */
.back-to-top {
position: fixed;
bottom: 25px;
right: 25px;
width: 45px;
height: 45px;
background: var(--ip-link);
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 #fff;
border-bottom: 3px solid #fff;
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: var(--ip-surface);
border-top: 1px solid var(--ip-border);
z-index: 999;
flex-direction: column;
}
.main-nav.active { display: flex; }
.main-nav a {
display: block;
padding: 12px 16px;
color: var(--ip-link);
}
.main-nav a:hover {
background: var(--ip-bg);
color: var(--ip-hover);
}
}

/* === 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: var(--ip-surface);
padding: 18px;
border-radius: 8px;
border: 1px solid var(--ip-border);
box-sizing: border-box;
}

.single-header h1 {
color: var(--ip-link);
font-size: 24px;
margin-bottom: 10px;
}

.single-header .meta {
font-size: 13px;
color: var(--ip-muted);
margin-bottom: 15px;
}

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

.single-footer {
margin-top: 30px;
border-top: 1px solid var(--ip-border);
padding-top: 15px;
}

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

/* === SIDEBAR === */
.sidebar {
flex: 0 0 300px;
background: var(--ip-surface);
padding: 15px;
border-radius: 8px;
border: 1px solid var(--ip-border);
color: var(--ip-muted);
position: sticky;
top: 25px;
height: fit-content;
box-sizing: border-box;
}

.sidebar h3 {
color: var(--ip-link);
margin-bottom: 10px;
font-size: 16px;
border-bottom: 1px solid var(--ip-border);
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: var(--ip-link);
}
.site-title-text:hover { color: #1e73be; }

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

.main-nav a:hover {
background: var(--ip-bg);
color: var(--ip-hover);
}
}

/* === HEADER ALIGNEMENT GLOBAL === */
.site-header {
background: var(--ip-surface);
border-bottom: 1px solid var(--ip-border);
}

.site-title-text {
color: var(--ip-link);
}
.site-title-text:hover { color: #1e73be; }

/* === MENU BURGER (MOBILE) === */
@media (max-width: 768px) {
.main-nav {
display: none;
flex-direction: column;
align-items: center;
background: var(--ip-surface);
border-top: 1px solid var(--ip-border);
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 var(--ip-border);
}

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

.main-nav a {
display: block;
padding: 14px;
font-size: 16px;
color: var(--ip-link);
}

.main-nav a:hover {
background: var(--ip-bg);
color: var(--ip-link);
}

@keyframes fadeIn {
from { opacity: 0; transform: translateY(-5px); }
to { opacity: 1; transform: translateY(0); }
}
}
/* === SIDEBAR RESPONSIVE (fix overflow) */
.sidebar {
background: var(--ip-surface);
border: 1px solid var(--ip-border);
color: var(--ip-muted);
}

/* CTA "Lire l’article" */
article a figure::after,
article a .thumb::after,
article a .post-thumb::after,
article a .featured-image::after {
color: #fff;
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: var(--ip-link);
}

/* POPUP */
.sf-btn {
background: var(--ip-link);
color: #fff;
}

.sf-text {
color: var(--ip-muted);
}

.sf-close {
color: var(--ip-muted);
}

/* RELATED */
.related-card {
border: 1px solid var(--ip-border);
}

.related-content h3 {
color: var(--ip-link);
}

.related-content p {
color: var(--ip-muted);
}

/* FIL D'ARIANE */
.breadcrumb,
.breadcrumb a,
.breadcrumb span,
.breadcrumbs,
.breadcrumbs a,
.breadcrumbs span {
color: var(--ip-muted) !important;
}

.breadcrumb a,
.breadcrumbs a {
color: var(--ip-link) !important;
}

.breadcrumb a:hover,
.breadcrumbs a:hover {
color: var(--ip-hover) !important;
}


:root {color-scheme:light;--ip-bg:#eef3f8;--ip-surface:#fff;--ip-text:#222;--ip-link:#0b3d91;--ip-hover:#1558b0;--ip-muted:#555f6e;--ip-border:#d6e0ea;}
:root[data-theme="dark"] {color-scheme:dark;--ip-bg:#111827;--ip-surface:#1e293b;--ip-text:#e5e7eb;--ip-link:#93c5fd;--ip-hover:#bfdbfe;--ip-muted:#b6c2d1;--ip-border:#475569;}
.site-logo {width:55px;height:55px;object-fit:cover;border-radius:50%;flex:none;}
.site-title-text {font-size:23px;}
.header-controls {display:flex;gap:8px;align-items:center;margin-left:auto;padding:0 12px;}
.theme-toggle,.menu-toggle {font:inherit;color:var(--ip-link);background:var(--ip-surface);border:1px solid var(--ip-border);border-radius:6px;padding:8px;cursor:pointer;white-space:nowrap;}
.main-nav ul {flex-wrap:wrap;}
.ip-divider {border:0;border-top:1px solid var(--ip-border);}
.ip-muted,.breadcrumb-current,.breadcrumb-separator {color:var(--ip-muted);}
.ip-breadcrumb {margin-bottom:10px;font-size:13px;}
.screen-reader-text {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0;}
.single-content img,.widget img {max-width:100%;height:auto;}
.single-article {min-width:0;}
.sfart-wrap {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0;}
.sfart-item {border:1px solid var(--ip-border);border-radius:8px;overflow:hidden;background:var(--ip-surface);}
.sfart-item a {display:block;}
.sfart-img img {width:100%;aspect-ratio:16/9;object-fit:cover;display:block;}
.sfart-content {padding:12px;}.sfart-content p {color:var(--ip-muted);margin:0;}
.back-to-top,.post-cat,.sf-btn,.articles-pagination .page-numbers.current {background:#0b3d91;color:#fff;}
.back-to-top {border:0;cursor:pointer;visibility:hidden;}.back-to-top.show {visibility:visible;}
:focus-visible {outline:2px solid var(--ip-link);outline-offset:3px;}
.footer-menu {flex-wrap:wrap;}
@media(max-width:900px){.single-article{flex:auto;width:100%;}.sidebar{flex:auto;}.main-nav{max-width:none;}}
@media(max-width:768px){.site-header{flex-wrap:wrap;gap:10px;}.header-controls{padding:0;}.main-nav{max-width:none;}.articles-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));}.site-branding{min-width:0;}.site-title-text{font-size:20px;}}
@media(max-width:480px){.sfart-wrap{grid-template-columns:1fr;}}

/* 1.0.1 — compact header and predictable sidebar layout */
header.site-header {gap:16px;flex-wrap:nowrap;}
.site-branding {min-width:0;flex:0 1 auto;}
.site-branding > a {min-width:0;overflow-wrap:anywhere;}
.header-controls {flex:none;margin-left:0;padding:0;}
.theme-toggle {display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;padding:0;font-size:25px;line-height:1;}
.ip-sun {display:none;}
:root[data-theme="dark"] .ip-sun {display:inline;}
:root[data-theme="dark"] .ip-moon {display:none;}
.main-nav {flex:1;min-width:0;max-width:none;}
.main-nav ul {justify-content:flex-end;gap:12px 18px;}
.menu-toggle {align-items:center;gap:8px;min-height:42px;}
.ip-chevron {width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin:0 3px 4px;}
.menu-toggle[aria-expanded="true"] .ip-chevron {transform:rotate(225deg);margin-bottom:0;}
.single-layout {display:grid;grid-template-columns:minmax(0,1fr);gap:25px;}
.single-layout:has(> .sidebar) {grid-template-columns:minmax(0,1fr) 360px;}
.single-layout > .single-article,.single-layout > .sidebar {width:100%;min-width:0;margin:0;}
.sidebar .widget {min-width:0;overflow-wrap:anywhere;}
.sidebar img,.sidebar iframe,.sidebar input,.sidebar select,.sidebar textarea,.sidebar button {max-width:100%;box-sizing:border-box;}
.single-content {overflow-wrap:anywhere;}
.single-content iframe {max-width:100%;}
@media(max-width:1200px){
  header.site-header {justify-content:space-between;}
  .header-controls {margin-left:auto;}
  .menu-toggle {display:inline-flex;}
  .main-nav {display:none;position:absolute;top:100%;left:0;width:100%;max-width:none;box-sizing:border-box;background:var(--ip-surface);border-top:1px solid var(--ip-border);z-index:999;padding:8px 0;}
  .main-nav.active {display:flex;}
  .main-nav ul {flex-direction:column;gap:0;width:100%;text-align:center;}
  .main-nav li {width:100%;border-top:1px solid var(--ip-border);}
  .main-nav li:first-child {border-top:0;}
  .main-nav a {display:block;padding:12px 16px;}
}
@media(max-width:900px){
  .single-layout:has(> .sidebar) {grid-template-columns:minmax(0,1fr);}
  .single-layout > .sidebar {position:static;}
}
@media(max-width:480px){
  header.site-header {padding:10px 12px;gap:8px;}
  .site-branding {gap:8px;}
  .site-logo {width:38px;height:38px;}
  .site-title-text {font-size:17px;}
  .site-branding small {font-size:11px;}
  .header-controls {gap:5px;}
  .menu-toggle {padding:6px;}
}

/* 1.0.2 — archive spacing and article sharing */
.ip-archive-layout {padding-top:20px;}
.ip-archive-layout > .ip-breadcrumb {margin:0 0 15px;}
.ip-share {margin:24px 0 18px;}
.ip-share h2 {font-size:18px;margin:0 0 12px;}
.ip-share-actions {display:flex;flex-wrap:wrap;gap:8px;}
.ip-share-actions a,.ip-share-actions button {display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:9px 13px;border:1px solid transparent;border-radius:6px;font:inherit;font-size:14px;line-height:1.4;text-decoration:none;cursor:pointer;box-sizing:border-box;}
.ip-share-actions svg {width:18px;height:18px;flex:none;}
.ip-share-actions .ip-share-facebook {background:#1764c0;color:#fff;}
.ip-share-actions .ip-share-whatsapp {background:#14783e;color:#fff;}
.ip-share-actions .ip-share-copy {background:var(--ip-surface);color:var(--ip-link);border-color:var(--ip-border);}
.ip-share-actions a:hover,.ip-share-actions button:hover {filter:brightness(.92);}
.ip-share-status {font-size:13px;color:var(--ip-muted);margin:8px 0 0;overflow-wrap:anywhere;}
.ip-share-status:empty {margin:0;}

/* 1.0.3 — homepage portal and wider sidebar */
.ip-home {padding-top:24px;padding-bottom:24px;}
.ip-home-hero {background:var(--ip-surface);color:var(--ip-text);border:1px solid var(--ip-border);border-radius:10px;padding:clamp(20px,3vw,32px);}
.ip-home-hero h1 {color:var(--ip-link);font-size:clamp(26px,3vw,38px);}
.ip-home-hero p {max-width:760px;line-height:1.6;margin:0 0 20px;}
.ip-home-search {display:flex;gap:10px;max-width:760px;}
.ip-home-search input[type=search] {flex:1;min-width:0;background:var(--ip-bg);color:var(--ip-text);border:1px solid var(--ip-border);border-radius:6px;padding:12px;font:inherit;box-sizing:border-box;}
.ip-home-search button {background:#103d7c;color:#fff;border:1px solid #103d7c;border-radius:6px;padding:12px 18px;font:inherit;font-weight:600;cursor:pointer;}
.ip-home-hero :focus-visible {outline-color:var(--ip-link);}
:root[data-theme="dark"] .ip-home-search button {background:var(--ip-link);color:var(--ip-bg);border-color:var(--ip-link);}
.ip-home-categories {margin-top:28px;}
.ip-category-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:10px;list-style:none;padding:0;margin:0;}
.ip-category-grid a {display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--ip-surface);border:1px solid var(--ip-border);border-radius:8px;padding:14px;font-weight:600;height:100%;box-sizing:border-box;overflow-wrap:anywhere;}
.ip-category-grid a:hover {border-color:var(--ip-link);}
.ip-home-layout {width:100%;margin-top:0;align-items:start;}
.ip-home-main {min-width:0;}
.ip-home-latest {margin-top:28px;}
.ip-home-main .ip-category-grid {grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));}
.ip-home-latest {min-width:0;}
.ip-home-articles {grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));}
.ip-home-articles h3 {font-size:20px;line-height:1.3;margin:8px 0 6px;}
.sidebar .widget,.sidebar .widget > * {max-width:100%;box-sizing:border-box;}
.sidebar {overflow-wrap:anywhere;}
@media(max-width:1100px){
 .single-layout:has(> .sidebar) {grid-template-columns:minmax(0,1fr);}
 .single-layout > .sidebar {position:static;}
}
@media(max-width:480px){.ip-home-search {flex-direction:column;}.ip-home-articles {grid-template-columns:minmax(0,1fr);}}

/* 1.0.5 — archive portal */
.ip-archive-layout {padding-bottom:24px;}
.ip-category-grid a.ip-category-active {background:var(--ip-link);color:var(--ip-surface);border-color:var(--ip-link);}
.ip-term-description {overflow-wrap:anywhere;}
.ip-archive-layout .ip-home-hero h1 small {font-size:.55em;color:var(--ip-muted);}
.ip-archive-layout .ip-home-hero h1 {overflow-wrap:anywhere;}
