/* ── Polices ── auto-hébergées via le gestionnaire de polices QuietCMS
   (fonts/fonts.css est chargé par layout.php). Aucune requête vers Google Fonts :
   conforme CSP 'self' et RGPD (pas de transmission d'IP des visiteurs à Google).
   Repli sur des polices système tant que les polices ne sont pas installées. */

/* ── Variables ── */
:root {
    color-scheme: light; /* site en thème clair : empêche le « mode sombre forcé » des navigateurs mobiles d'assombrir le menu/hamburger */
    --navy:       #1b2a4a;
    --navy-mid:   #243560;
    --navy-light: #2e437a;
    --gold:       #b8922e;
    --gold-hover: #9a7924;
    --gold-pale:  #f5edd6;
    --parchment:  #f9f7f2;
    --white:      #ffffff;
    --text:       #1c1c2e;
    --text-muted: #5c5c72;
    --border:     #ddd8cc;
    --border-gold:#d4ae6a;
    --link:       #2f54a8;
    --link-hover: #1e3a78;
    --shadow-sm:  0 1px 4px rgba(0,0,0,.07);
    --shadow:     0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:  0 8px 32px rgba(0,0,0,.13);
    --radius:     2px;
    --max-w:      1180px;
    --content-w:  760px;
    --serif:      'Playfair Display', Georgia, 'Times New Roman', serif;
    --sans:       'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--text); background: var(--parchment); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-hover); }

/* ── Top bar ── */
.top-bar {
    background: var(--navy);
    color: rgba(255,255,255,.7);
    font-size: .78rem;
    padding: .45rem 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.top-bar-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.top-bar a { color: rgba(255,255,255,.7); }
.top-bar a:hover { color: var(--gold); }
.top-bar-right { display: flex; gap: 1.5rem; }

/* ── Header ── */
.site-header {
    background: var(--header-bg, var(--navy));
    position: var(--header-position, sticky);
    top: 0;
    z-index: 510; /* > overlay (490) pour que le tiroir reste au-dessus */
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height, 72px);
    gap: 2rem;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
}
.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gold);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    color: var(--navy);
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.logo-text {
    font-family: var(--serif);
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.2;
    font-weight: 600;
}
.logo-text span { display: block; font-size: .7rem; font-family: var(--sans); font-weight: 300; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-top: 2px; }

/* ── Navigation ── */
.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav > li { list-style: none; position: relative; }
.site-nav > li > a {
    display: block;
    color: rgba(255,255,255,.88);
    font-size: .875rem;
    font-weight: 500;
    padding: .55rem .9rem;
    border-radius: var(--radius);
    transition: background .18s, color .18s;
    letter-spacing: .02em;
}
.site-nav > li > a:hover,
.site-nav > li.active > a {
    background: rgba(255,255,255,.1);
    color: var(--gold);
}
.site-nav > li.active > a { border-bottom: 2px solid var(--gold); }

/* Dropdown */
.sub-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    border-radius: var(--radius);
    min-width: 200px;
    box-shadow: var(--shadow);
    list-style: none;
    z-index: 100;
}
.sub-menu li a {
    display: block;
    padding: .6rem 1.1rem;
    color: var(--text);
    font-size: .875rem;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}
.sub-menu li:last-child a { border-bottom: none; }
.sub-menu li a:hover { background: var(--gold-pale); color: var(--navy); }
.site-nav > li:hover > .sub-menu { display: block; }

/* Flèche ▾ sur les parents desktop */
.site-nav > li.has-children > a::after {
    content: '▾';
    font-size: .6rem;
    margin-left: .3rem;
    vertical-align: middle;
    opacity: .5;
    display: inline-block;
    transition: transform .2s;
}
.site-nav > li.has-children:hover > a::after { transform: rotate(-180deg); opacity: 1; }

/* Sub-toggle button — caché sur desktop */
.sub-toggle { display: none; }

.sub-menu li { position: relative; }

/* Flèche › sur les items parents dans les sous-menus */
.sub-menu li.has-children > a::after {
    content: '›';
    float: right;
    margin-left: .5rem;
    opacity: .5;
    font-size: 1rem;
    line-height: 1;
}

/* Flyout niveau 3+ : apparaît à droite du parent */
.sub-menu .sub-menu {
    display: none;
    position: absolute;
    top: -3px;
    left: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    border-radius: var(--radius);
    min-width: 200px;
    box-shadow: var(--shadow);
    list-style: none;
    z-index: 100;
}
.sub-menu li:hover > .sub-menu { display: block; }

/* Flyout ouvert par JS (desktop hover fiable + débordement viewport) */
.sub-menu .sub-menu.js-open { display: block; }
.sub-menu li.flyout-left > .sub-menu { left: auto; right: 100%; }

/* Logo QuietCMS SVG (fallback quand aucun logo personnalisé) */
.logo-qcms-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 7px;
    display: block;
}

/* Hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: .5rem; background: none; border: none; }
/* background-image (dégradé blanc uni) : empêche le « mode sombre forcé » des navigateurs
   mobiles d'assombrir les barres ; visuellement identique à un fond blanc. */
.nav-toggle span { display: block; width: 22px; height: 2px; background-color: #fff; background-image: linear-gradient(#fff, #fff); border-radius: 2px; transition: .3s; forced-color-adjust: none; }

/* ── Gold separator ── */
.gold-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--navy) 0%, var(--gold) 40%, var(--gold-pale) 100%);
}

/* ── Breadcrumb ── */
.breadcrumb-wrap {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: .65rem 0;
    font-size: .8rem;
}
.breadcrumb {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { color: var(--border-gold); font-size: .7rem; }
.breadcrumb .current { color: var(--text); font-weight: 500; }

/* ── Hero ── */
.page-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, #1a3560 100%);
    color: #fff;
    padding: 4.5rem 1.5rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero-inner { position: relative; max-width: 800px; margin: 0 auto; }
.page-hero h1 {
    font-family: var(--serif);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.page-hero p {
    font-size: 1.05rem;
    color: rgba(255,255,255,.8);
    max-width: 560px;
    margin: 0 auto 1.5rem;
}
.hero-divider {
    width: 60px;
    height: 3px;
    background: var(--gold);
    margin: 1.25rem auto 0;
}

/* ── Layout principal ── */
.site-main { max-width: var(--max-w); margin: 0 auto; padding: 2.5rem 1.5rem; }
.site-main.with-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; align-items: start; }

/* ── Cards ── */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card-padded { padding: 1.75rem; }

/* ── Page content ── */
.content-header { margin-bottom: 2rem; }
.content-header h1, .article-title {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--navy);
    margin-bottom: .6rem;
}
.content-header .lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    border-left: 3px solid var(--gold);
    padding-left: .9rem;
    margin-top: .9rem;
    font-style: italic;
}

.article-body h2 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin: 2.5rem 0 .9rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--gold-pale);
    position: relative;
}
.article-body h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gold);
}
.article-body h3 {
    font-family: var(--serif);
    font-size: 1.15rem;
    color: var(--navy-mid);
    margin: 1.75rem 0 .6rem;
    font-weight: 600;
}
.article-body h4 { font-weight: 600; margin: 1.25rem 0 .4rem; }
.article-body p { margin-bottom: 1.1rem; line-height: 1.8; }
.article-body ul, .article-body ol { margin: .75rem 0 1.1rem 1.75rem; }
.article-body li { margin-bottom: .4rem; line-height: 1.7; }
.article-body strong { font-weight: 600; color: var(--navy); }
.article-body em { font-style: italic; }
/* Liens en plein texte (contenu éditorial du site) : bleu raffiné, souligné délicat */
.article-body a,
.blog-content a,
.cat-editorial a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-color: rgba(47, 84, 168, .4);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color .18s ease, text-decoration-color .18s ease, text-decoration-thickness .18s ease;
}
.article-body a:hover,
.blog-content a:hover,
.cat-editorial a:hover {
    color: var(--link-hover);
    text-decoration-color: var(--link-hover);
    text-decoration-thickness: 2px;
}
/* L'ancre enrobe souvent un <strong> : forcer l'héritage de la couleur du lien */
.article-body a strong,
.blog-content a strong,
.cat-editorial a strong { color: inherit; }
.article-body blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem 1rem 1.5rem;
    border-left: 4px solid var(--gold);
    background: var(--gold-pale);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--navy-mid);
}
.article-body figure { margin: 1.75rem 0; }
.article-body figure img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.article-body figcaption { font-size: .8rem; color: var(--text-muted); text-align: center; margin-top: .5rem; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .9rem; }
.article-body th { background: var(--navy); color: #fff; padding: .7rem 1rem; text-align: left; font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.article-body td { padding: .65rem 1rem; border-bottom: 1px solid var(--border); }
.article-body tr:last-child td { border-bottom: none; }
.article-body tr:nth-child(even) td { background: var(--parchment); }

/* ── Article meta ── */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
    align-items: center;
    padding: .9rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.75rem;
    font-size: .82rem;
    color: var(--text-muted);
}
.article-meta .meta-item { display: flex; align-items: center; gap: .35rem; }
.article-meta .meta-item svg { width: 14px; height: 14px; opacity: .6; }
.cat-badge {
    display: inline-flex;
    align-items: center;
    background: var(--navy);
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .25rem .65rem;
    border-radius: 999px;
    text-decoration: none;
}
.cat-badge:hover { background: var(--gold); color: var(--navy); }
/* Badge de catégorie non cliquable (bandeau d'article) : même rendu, sans interaction */
.cat-badge--static { cursor: default; }
.cat-badge--static:hover { background: var(--navy); color: #fff; }

/* ── Disclaimer ── */
.legal-disclaimer {
    background: var(--gold-pale);
    border: 1px solid var(--border-gold);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    padding: .9rem 1.1rem;
    font-size: .82rem;
    color: #6b5820;
    margin: 2rem 0;
    display: flex;
    gap: .6rem;
}
.legal-disclaimer strong { color: var(--navy); }

/* ── TOC (Table des matières) ── */
.toc-box {
    background: var(--parchment);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    margin: 1.75rem 0;
    font-size: .875rem;
}
.toc-box .toc-title {
    font-family: var(--serif);
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .75rem;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.toc-list { list-style: none; }
.toc-list li { padding: .25rem 0; }
.toc-list a { color: var(--navy-mid); font-size: .85rem; display: flex; align-items: baseline; gap: .4rem; }
.toc-list a::before { content: '§'; color: var(--gold); font-size: .75rem; flex-shrink: 0; }
.toc-list a:hover { color: var(--gold); }
.toc-list:not(.toc-nested) .toc-h3 { padding-left: 1.1rem; }
.toc-list:not(.toc-nested) .toc-h4 { padding-left: 2.2rem; }
.toc-list .toc-h3 a::before { content: '›'; }
.toc-list .toc-h4 a::before { content: '·'; }
.toc-nested, .toc-nested ul { list-style: none; }
.toc-nested ul { padding-left: .9rem; margin: .15rem 0 .15rem .15rem; border-left: 1px solid var(--border); }

/* ── Blog listing ── */
.section-heading {
    font-family: var(--serif);
    font-size: 1.6rem;
    color: var(--navy);
    margin-bottom: 1.5rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.section-heading::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--gold);
}
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.75rem;
}
.filter-btn {
    display: inline-block;
    padding: .35rem .9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .8rem;
    color: var(--text-muted);
    transition: all .18s;
    font-weight: 500;
}
.filter-btn:hover, .filter-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.post-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card-body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }
.post-card-cat { margin-bottom: .6rem; }
.post-card h2 { font-family: var(--serif); font-size: 1.1rem; color: var(--navy); line-height: 1.4; margin-bottom: .6rem; font-weight: 600; }
.post-card h2 a { color: inherit; }
.post-card h2 a:hover { color: var(--gold); }
.post-card .excerpt { font-size: .875rem; color: var(--text-muted); line-height: 1.65; flex: 1; margin-bottom: .9rem; }
.post-card-footer {
    padding: .75rem 1.4rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .78rem;
    color: var(--text-muted);
    background: var(--parchment);
}
.read-more { font-size: .82rem; font-weight: 600; color: var(--gold); display: flex; align-items: center; gap: .25rem; }
.read-more:hover { color: var(--gold-hover); }

/* Liste d'articles (vue listing) */
.post-list-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 4px solid transparent;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    transition: border-left-color .2s, box-shadow .2s;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}
.post-list-item:hover { border-left-color: var(--gold); box-shadow: var(--shadow-sm); }
.post-list-date { flex-shrink: 0; text-align: center; background: var(--navy); color: #fff; border-radius: var(--radius); padding: .5rem .7rem; min-width: 52px; }
.post-list-date .day { display: block; font-size: 1.3rem; font-weight: 700; line-height: 1; font-family: var(--serif); }
.post-list-date .month { display: block; font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.post-list-content { flex: 1; }
.post-list-content h2 { font-family: var(--serif); font-size: 1.1rem; color: var(--navy); margin-bottom: .35rem; font-weight: 600; }
.post-list-content h2 a { color: inherit; }
.post-list-content h2 a:hover { color: var(--gold); }
.post-list-content p { font-size: .875rem; color: var(--text-muted); line-height: 1.65; }

/* ── Sidebar ── */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-widget {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.widget-title {
    background: var(--navy);
    color: #fff;
    font-family: var(--serif);
    font-size: .9rem;
    font-weight: 600;
    padding: .75rem 1.1rem;
    letter-spacing: .03em;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.widget-body { padding: 1rem 1.1rem; }
.widget-list { list-style: none; }
.widget-list li { border-bottom: 1px solid var(--border); }
.widget-list li:last-child { border-bottom: none; }
.widget-list a { display: flex; align-items: center; gap: .5rem; padding: .55rem 0; font-size: .875rem; color: var(--text); }
.widget-list a::before { content: '›'; color: var(--gold); font-weight: 700; }
.widget-list a:hover { color: var(--gold); }
.widget-list .count { margin-left: auto; background: var(--parchment); color: var(--text-muted); font-size: .72rem; padding: .1rem .45rem; border-radius: 999px; border: 1px solid var(--border); }
.toc-widget .toc-list { padding: 0; }
.toc-widget .toc-list > li { border-bottom: 1px solid var(--border); }
.toc-widget .toc-list > li:last-child { border-bottom: none; }
.toc-widget .toc-nested ul li { border-bottom: none; }
.toc-widget .toc-list a { padding: .5rem 0; }

/* SidebarManager output classes (admin-configured widgets) */
.sidebar-widget-title { background: var(--navy); color: #fff; font-family: var(--serif); font-size: .9rem; font-weight: 600; padding: .75rem 1.1rem; letter-spacing: .03em; display: flex; align-items: center; gap: .5rem; }
.sidebar-list { list-style: none; padding: .25rem 0; margin: 0; }
.sidebar-list li { border-bottom: 1px solid var(--border); }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a { display: flex; align-items: center; gap: .5rem; padding: .55rem 1.1rem; font-size: .875rem; color: var(--text); }
.sidebar-list a::before { content: '›'; color: var(--gold); font-weight: 700; }
.sidebar-list a:hover { color: var(--gold); }
.sidebar-search { display: flex; gap: .4rem; padding: .75rem 1.1rem; }
.sidebar-search input[type="search"] { flex: 1; border: 1px solid var(--border); border-radius: 4px; padding: .45rem .7rem; font-size: .875rem; background: var(--parchment); color: var(--text-dark); outline: none; }
.sidebar-search input[type="search"]:focus { border-color: var(--gold); }
.sidebar-search button { padding: .45rem .75rem; background: var(--navy); color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: .85rem; line-height: 1; transition: background .15s; }
.sidebar-search button:hover { background: var(--gold); }
/* Zone "après le contenu" */
.after-content-widgets { max-width: var(--max-w); margin: 2rem auto 0; padding: 0 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }

/* Domaines du droit (homepage) */
.domains-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 1.5rem 0; }
.home-domains-inner--full { max-width: 100%; padding: 0 2rem; }
/* Style: image */
.home-domains--image .domain-card { padding: 0; overflow: hidden; border-top: none; }
.domain-card-img { width: 100%; height: 170px; background-size: cover; background-position: center; flex-shrink: 0; }
.home-domains--image .domain-card h3 { padding: .7rem 1rem .25rem; }
.home-domains--image .domain-card p  { padding: 0 1rem .85rem; }
.home-domains--image .domain-card .domain-icon { display: none; }
/* Style: minimal */
.home-domains--minimal .domain-card { background: transparent; border: 1.5px solid var(--border); border-top-color: var(--border); padding: .9rem 1.1rem; }
.home-domains--minimal .domain-card .domain-icon { font-size: 1.5rem; margin-bottom: .35rem; }
.home-domains--minimal .domain-card:hover { background: rgba(255,255,255,.7); }
.domain-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
    color: inherit;
}
.domain-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.domain-card .domain-icon { font-size: 2rem; margin-bottom: .6rem; }
.domain-card h3 { font-family: var(--serif); font-size: .95rem; color: var(--navy); font-weight: 600; margin-bottom: .25rem; }
.domain-card p { font-size: .78rem; color: var(--text-muted); }

/* ── Homepage ── */
.home-intro { max-width: var(--max-w); margin: 0 auto; padding: 3rem 1.5rem; }
.home-intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.home-intro-text h2 { font-family: var(--serif); font-size: 1.8rem; color: var(--navy); margin-bottom: 1rem; }
.home-intro-text p { color: var(--text-muted); line-height: 1.8; margin-bottom: .9rem; }
.home-intro-features { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.feature-item { display: flex; align-items: flex-start; gap: .6rem; font-size: .875rem; }
.feature-item::before { content: '✓'; color: var(--gold); font-weight: 700; margin-top: .1rem; flex-shrink: 0; }
.home-latest { background: var(--navy); padding: 3rem 1.5rem; color: #fff; }
.home-latest .section-heading { color: #fff; border-color: rgba(255,255,255,.15); }
.home-latest .section-heading::after { background: var(--gold); }
.home-latest-inner { max-width: var(--max-w); margin: 0 auto; }
.home-latest .post-card { border-color: rgba(255,255,255,.1); }
.home-latest .post-card h2 { color: var(--navy); }
.home-domains { background: var(--parchment); padding: 3rem 1.5rem; }
.home-domains-inner { max-width: var(--max-w); margin: 0 auto; }
.home-cta { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); padding: 3.5rem 1.5rem; text-align: center; }
.home-cta h2 { font-family: var(--serif); color: #fff; font-size: 1.8rem; margin-bottom: .75rem; }
.home-cta p { color: rgba(255,255,255,.75); margin-bottom: 1.5rem; }

/* ── Home grid section ── */
.home-section-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.hgs-header { text-align: center; margin-bottom: 2.5rem; }
.hgs-title { font-family: var(--serif); font-size: 1.9rem; margin-bottom: .5rem; }
.hgs-sub   { font-size: 1rem; opacity: .75; margin: 0; }
.hgs-row   { margin-bottom: 1.5rem; }
.hgs-row:last-child { margin-bottom: 0; }
.hgs-col   { min-width: 0; }
/* Text column */
.hgs-col-heading { font-family: var(--serif); font-size: 1.35rem; margin-bottom: .65rem; }
.hgs-col-body  { line-height: 1.75; }
.hgs-col-body h2, .hgs-col-body h3, .hgs-col-body h4 { font-family: var(--serif); margin: 1rem 0 .5rem; }
.hgs-col-body p  { margin-bottom: .75rem; }
.hgs-col-body ul, .hgs-col-body ol { padding-left: 1.4rem; margin-bottom: .75rem; }
.hgs-col-body a  { color: inherit; text-decoration: underline; }
/* Image column */
.hgs-col-figure { margin: 0; }
.hgs-col-figure img { width: 100%; height: auto; display: block; border-radius: 8px; }
.hgs-col-figure figcaption { font-size: .78rem; text-align: center; opacity: .65; margin-top: .4rem; }
/* Video column */
.hgs-col-video iframe,
.hgs-col-video video { width: 100%; aspect-ratio: 16/9; display: block; border-radius: 8px; border: none; }
.hgs-col-caption { font-size: .78rem; text-align: center; opacity: .65; margin-top: .4rem; }
/* Color modes */
.hgs-dark .hgs-title, .hgs-dark .hgs-col-heading, .hgs-dark .hgs-col-body { color: #fff; }
.hgs-dark .hgs-sub { color: rgba(255,255,255,.75); }
.hgs-dark .hgs-col-body a { color: rgba(255,255,255,.9); }
.hgs-light .hgs-title, .hgs-light .hgs-col-heading, .hgs-light .hgs-col-body { color: var(--navy); }
.hgs-light .hgs-sub { color: var(--text-muted); }
.section-sub { color: var(--text-muted); text-align: center; margin-bottom: 1.5rem; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .65rem 1.4rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .875rem;
    cursor: pointer;
    transition: all .18s;
    text-decoration: none;
    letter-spacing: .02em;
}
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-hover); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-mid); color: #fff; }
.btn-outline { background: transparent; border: 2px solid currentColor; color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-outline-white { color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline-white:hover { background: var(--gold); border-color: var(--gold); }
.btn-lg { padding: .85rem 1.9rem; font-size: 1rem; }

/* ── Article actions ── */
.article-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin: 2rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .85rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 500;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all .18s;
    cursor: pointer;
    background: none;
}
.share-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ── Footer ── */
.site-footer { background: var(--footer-bg, var(--navy)); color: rgba(255,255,255,.75); margin-top: 0; }
.footer-top { max-width: var(--max-w); margin: 0 auto; padding: 3.5rem 1.5rem 2rem; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-brand .logo-text { color: #fff; font-size: 1.15rem; }
.footer-brand p { font-size: .875rem; margin-top: .9rem; line-height: 1.7; color: rgba(255,255,255,.6); }
.footer-col h4 { font-family: var(--serif); color: #fff; font-size: .95rem; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .45rem; }
.footer-col ul a { color: rgba(255,255,255,.65); font-size: .85rem; transition: color .18s; }
.footer-col ul a:hover { color: var(--gold); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 1.25rem 1.5rem;
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .8rem;
    color: rgba(255,255,255,.45);
    flex-wrap: wrap;
    gap: .5rem;
}
.footer-bottom a { color: rgba(255,255,255,.45); }
.footer-bottom a:hover { color: var(--gold); }
.footer-divider { height: 1px; background: rgba(255,255,255,.07); }

/* ── 404 ── */
.error-page { text-align: center; padding: 5rem 1.5rem; max-width: 540px; margin: 0 auto; }
.error-page .error-code { font-family: var(--serif); font-size: 6rem; color: var(--gold); line-height: 1; font-weight: 700; opacity: .3; }
.error-page h1 { font-family: var(--serif); font-size: 1.8rem; color: var(--navy); margin: 1rem 0 .75rem; }
.error-page p { color: var(--text-muted); margin-bottom: 1.75rem; }

/* ── Progress bar (reading) ── */
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--gold), #e8b84b); z-index: 9999; width: 0; transition: width .1s; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .site-main.with-sidebar { grid-template-columns: 1fr; }
    .sidebar { display: grid; grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .home-intro-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 900px) {
    /* ── Top bar ── */
    .top-bar { display: none; }
    .top-bar.topbar-show-mobile { display: block; }

    /* ── Site header ── */
    .site-header {
        position: relative;
        z-index: 510; /* > overlay (490) : le stacking context du header englobe le tiroir */
    }
    .header-inner {
        height: var(--mobile-header-height, 60px);
        padding: 0 1rem;
        justify-content: flex-start;
        gap: 0;
    }

    /* ── Logo — fill space, centre its content ── */
    .site-header .site-logo {
        flex: 1;
        justify-content: center;
    }

    /* ── Hamburger — left, animated into × ── */
    .nav-toggle {
        display: flex;
        flex-shrink: 0;
        margin-right: .6rem;
        position: relative;
        z-index: 520;
    }
    .nav-toggle span { transition: transform .3s ease, opacity .25s ease; }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* ── NAV OVERLAY (drawer backdrop) ── */
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .5);
        z-index: 490;
    }
    .nav-overlay.open { display: block; animation: nvFadeIn .25s ease; }
    @keyframes nvFadeIn { from { opacity: 0; } to { opacity: 1; } }

    /* ══ Hamburger à DROITE (body.hamburger-right) ══ */
    .hamburger-right .header-inner {
        flex-direction: row-reverse;  /* Logo à gauche, hamburger à droite */
    }
    .hamburger-right .site-header .site-logo {
        justify-content: flex-start; /* Logo aligné à gauche */
    }
    .hamburger-right .nav-toggle {
        margin-right: 0;
        margin-left: .6rem;
    }
    /* Drawer depuis la droite quand hamburger est à droite */
    .hamburger-right.mobile-menu-drawer .site-nav {
        left: auto;
        right: 0;
        transform: translateX(100%);
        box-shadow: -6px 0 40px rgba(0,0,0,.45);
        border-right: none;
        border-left: 1px solid rgba(255,255,255,.08);
    }
    .hamburger-right.mobile-menu-drawer .site-nav.open {
        transform: translateX(0);
    }

    /* ══ Hamburger à GAUCHE (body.hamburger-left, défaut) ══ */
    .hamburger-left .header-inner {
        justify-content: flex-start;
    }
    .hamburger-left .site-header .site-logo {
        justify-content: center;
    }

    /* ══ DRAWER (slide from left) ══ */
    .mobile-menu-drawer .site-nav {
        display: flex !important; /* always in DOM, off-screen by default */
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(290px, 82vw);
        background: var(--header-bg, var(--navy));
        z-index: 500;
        padding-top: var(--mobile-header-height, 60px);
        padding-bottom: 2.5rem;
        gap: 0;
        transform: translateX(-100%);
        transition: transform .32s cubic-bezier(.4, 0, .2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 6px 0 40px rgba(0, 0, 0, .45);
        border-right: 1px solid rgba(255, 255, 255, .08);
    }
    .mobile-menu-drawer .site-nav.open { transform: translateX(0); }
    .mobile-menu-drawer .site-nav > li {
        border-bottom: 1px solid rgba(255, 255, 255, .07);
        list-style: none;
    }
    .mobile-menu-drawer .site-nav > li > a {
        padding: .85rem 1.5rem;
        font-size: .95rem;
        border-radius: 0;
        display: block;
    }
    .mobile-menu-drawer .site-nav > li.active > a {
        border-bottom: none;
        border-left: 3px solid var(--gold);
        padding-left: calc(1.5rem - 3px);
        color: var(--gold);
        background: rgba(255, 255, 255, .06);
    }

    /* ══ DROPDOWN (falls under header) ══ */
    .mobile-menu-dropdown .site-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--mobile-header-height, 60px);
        left: 0;
        right: 0;
        background: var(--header-bg, var(--navy));
        padding: .5rem 0;
        gap: 0;
        border-top: 2px solid var(--gold);
        box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
        z-index: 400;
        max-height: calc(100vh - var(--mobile-header-height, 60px));
        overflow-y: auto;
    }
    .mobile-menu-dropdown .site-nav.open { display: flex; }
    .mobile-menu-dropdown .site-nav > li { border-bottom: 1px solid rgba(255, 255, 255, .07); list-style: none; }
    .mobile-menu-dropdown .site-nav > li > a { padding: .8rem 1.5rem; font-size: .95rem; display: block; }

    /* ── Accordéon mobile : li parent → flex pour aligner lien + toggle ── */
    .site-nav li.has-children {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
    }
    .site-nav li.has-children > a {
        flex: 1;
        min-width: 0;
    }
    .site-nav li.has-children > .sub-menu {
        flex-basis: 100%;
        width: 100%;
    }

    /* Bouton toggle ▾/▴ — visible uniquement sur mobile */
    .sub-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 46px;
        background: rgba(255, 255, 255, .07);
        border: none;
        border-left: 1px solid rgba(255, 255, 255, .07);
        cursor: pointer;
        color: rgba(255, 255, 255, .6);
        font-size: .95rem;
        transition: background .15s, color .15s;
        flex-shrink: 0;
        padding: 0;
    }
    .sub-toggle:hover,
    .sub-toggle[aria-expanded="true"] {
        background: rgba(255, 255, 255, .13);
        color: var(--gold);
    }

    /* ── Sous-menus → accordéon (fermés par défaut) ── */
    .site-nav .sub-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        border-top: 1px solid rgba(255, 255, 255, .06);
        min-width: 0;
        background: rgba(0, 0, 0, .22);
        border-radius: 0;
    }
    .site-nav .sub-menu.open { display: block; }

    /* Liens dans les sous-menus (indentation progressive par niveau) */
    .site-nav .sub-menu li a {
        padding: .65rem 1.5rem .65rem 2.25rem;
        color: rgba(255, 255, 255, .7);
        font-size: .875rem;
        border-bottom: 1px solid rgba(255, 255, 255, .05);
        display: block;
    }
    .site-nav .sub-menu .sub-menu li a          { padding-left: 3.25rem; }
    .site-nav .sub-menu .sub-menu .sub-menu li a { padding-left: 4.25rem; }
    .site-nav .sub-menu .sub-menu .sub-menu .sub-menu li a { padding-left: 5.25rem; }
    .site-nav .sub-menu li:last-child > a { border-bottom: none; }
    .site-nav .sub-menu li a:hover { background: rgba(255, 255, 255, .08); color: var(--gold); }

    /* Cacher la flèche › sur mobile (remplacée par le bouton sub-toggle) */
    .sub-menu li.has-children > a::after { display: none; }

    /* ── Footer ── */
    .footer-top {
        grid-template-columns: repeat(var(--mobile-footer-cols, 1), 1fr);
        gap: 1.75rem;
    }
    .footer-bottom { flex-direction: column; text-align: center; }

    /* ── Other layout ── */
    .posts-grid { grid-template-columns: 1fr; }
    .sidebar { grid-template-columns: 1fr; }
    .home-intro-features { grid-template-columns: 1fr; }
    .page-hero { padding: 3rem 1.25rem; }
    .domains-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .site-main { padding: 2rem 1.25rem; }
    .breadcrumb { padding: 0 1.25rem; }
}

@media (max-width: 480px) {
    .header-inner { padding: 0 .75rem; }
    .post-list-item { flex-direction: column; gap: .75rem; }
    .post-list-date { display: none; }
    .domains-grid { grid-template-columns: 1fr !important; }
    .footer-top { grid-template-columns: 1fr !important; }
    .site-main { padding: 1.5rem 1rem; }
    .page-hero { padding: 2.5rem 1rem; }
    .home-intro-grid { gap: 1.5rem; }
}

/* ── Print ── */
@media print {
    .site-header, .site-footer, .sidebar, .article-actions, .reading-progress, .breadcrumb-wrap { display: none !important; }
    body { background: #fff; color: #000; font-size: 11pt; }
    a { color: #000; text-decoration: underline; }
    .article-body h2 { border-bottom: 1pt solid #000; }
    .legal-disclaimer { border: 1pt solid #ccc; }
}

/* ── Pagination ── */
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: 2rem 0; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 2.2rem; height: 2.2rem; padding: 0 .6rem; border-radius: 4px; border: 1px solid var(--gold); background: transparent; color: var(--gold); text-decoration: none; font-size: .875rem; transition: background .15s, color .15s; }
.page-btn:hover { background: var(--gold); color: var(--navy); }
.page-btn.active { background: var(--gold); color: var(--navy); font-weight: 700; pointer-events: none; }

/* ── Category editorial blocks ── */
.cat-editorial { background: rgba(184,146,46,.07); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; padding: 1.5rem 1.75rem; margin: 1.75rem 0; line-height: 1.8; }
.cat-editorial h2, .cat-editorial h3 { color: var(--navy); font-family: 'Playfair Display', Georgia, serif; }
.cat-editorial-bottom { background: rgba(27,42,74,.05); border-left-color: var(--navy); }

/* ── Bouton « Revenir en haut » (mobile uniquement, apparaît au défilement) ── */
.back-to-top { display: none; }
@media (max-width: 900px) {
    .back-to-top {
        position: fixed; right: 24px; bottom: 84px; z-index: 2147482500;
        width: 44px; height: 44px; padding: 0; border: none; border-radius: 50%;
        background: var(--navy, #1b2a4a); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.28);
        display: flex; align-items: center; justify-content: center; cursor: pointer;
        opacity: 0; visibility: hidden; transform: translateY(8px);
        transition: opacity .2s ease, transform .2s ease, visibility .2s;
    }
    .back-to-top.show { opacity: 1; visibility: visible; transform: none; }
    .back-to-top svg { width: 22px; height: 22px; }
    .back-to-top:active { transform: scale(.94); }
}
