/* =========================================================
   ESPACE GRANDE ORIENTALE — FEUILLE DE STYLE PRINCIPALE
   Design professionnel • Bleu nuit • Orange
   Responsive PC, tablette, Android et iPhone
   ========================================================= */

/* 1. VARIABLES ET BASE */
:root {
    --navy: #101a2b;
    --navy2: #18263b;
    --blue: #d97920;
    --cyan: #e8892d;
    --gold: #f0a04a;
    --ink: #152238;
    --muted: #69778b;
    --line: #e8e5df;
    --paper: #f7f6f3;
    --white: #fff;
    --shadow: none;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
    overflow-x: clip;
}

body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding-bottom: env(safe-area-inset-bottom);
    font-family: Inter, Arial, sans-serif;
    color: var(--ink);
    background: #fff;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
video,
iframe {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1200px, calc(100% - 40px));
    margin-inline: auto;
    min-width: 0;
}

[hidden] {
    display: none !important;
}

/* 2. BARRE D'INFORMATION */
.topline {
    background: #061022;
    color: #c9d7eb;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.topline-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

/* 3. EN-TÊTE ET NAVIGATION */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid #eeeae4;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 86px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.brand img {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    object-fit: contain;
}

.brand span {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}

.brand strong {
    color: var(--navy);
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -.035em;
}

.brand small {
    max-width: 290px;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    color: #3c4a5e;
    font-size: 12px;
    font-weight: 700;
    transition: color .2s ease;
}

.nav-links a:hover {
    color: var(--blue);
}

.nav-toggle {
    display: none;
    border: 0;
    border-radius: 10px;
    padding: 10px 13px;
    background: #f4f2ed;
    color: var(--navy);
    font-size: 20px;
}

.nav-links.open {
    display: flex;
}

/* 4. BOUTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    padding: 13px 19px;
    font-size: 12px;
    font-weight: 800;
    transition: transform .2s ease, background .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #172338;
    background: linear-gradient(115deg, #d97920, #f2a64c);
}

.btn-light,
.btn-soft {
    color: var(--navy);
    background: #f0eee9;
}

/* 5. BANNIÈRE PRINCIPALE ET DIAPORAMA */
.hero {
    padding: 28px 0 44px;
    background: linear-gradient(135deg, #061022, #102b52);
}

.slider {
    position: relative;
    min-height: 470px;
    overflow: hidden;
    border-radius: 22px;
    background: #0b1c34;
}

.slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: clamp(28px, 6vw, 78px);
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.025);
    transition:
        opacity .8s ease,
        transform 5s ease,
        visibility .8s ease;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.slide-content {
    position: relative;
    z-index: 2;
    max-width: 690px;
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--blue);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .17em;
    text-transform: uppercase;
}

.slide .eyebrow,
.hero-fallback .eyebrow {
    color: #f0c66f;
}

.slide h1,
.hero-fallback h1 {
    max-width: 760px;
    margin: 18px 0;
    color: #fff;
    font-size: clamp(36px, 5.4vw, 68px);
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -.055em;
}

.slide p,
.hero-fallback p {
    max-width: 620px;
    margin: 0 0 27px;
    color: #d5e0ef;
    font-size: 16px;
}

.slider-controls {
    position: absolute;
    right: 26px;
    bottom: 24px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 14px;
}

.slider-controls > button {
    width: 35px;
    height: 35px;
    border: 1px solid #ffffff80;
    border-radius: 50%;
    color: #fff;
    background: #ffffff12;
    font-size: 25px;
    line-height: 1;
}

.slider-dots {
    display: flex;
    gap: 6px;
}

.slider-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #ffffff70;
}

.slider-dots button.active {
    width: 24px;
    background: var(--gold);
}

.hero-fallback {
    display: flex;
    min-height: 350px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 45px 20px;
    color: #fff;
}

/* 6. PUBLICITÉS SOUS LE DIAPORAMA */
.ad-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding-top: 26px;
}

.ad-strip:empty {
    display: none;
}

.ad-banner {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 120px;
    align-items: center;
    overflow: hidden;
    border-radius: 12px;
    color: #fff;
    background: var(--navy);
}

.ad-banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .42;
    transition: transform .4s ease;
}

.ad-banner:hover img {
    transform: scale(1.04);
}

.ad-banner span {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 22px;
}

.ad-banner small {
    color: #f1c56a;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .14em;
}

.ad-banner strong {
    font-size: 19px;
    line-height: 1.3;
}

.ad-banner em {
    color: #d2deef;
    font-size: 11px;
    font-style: normal;
}

.ad-banner-placeholder {
    justify-content: space-between;
    gap: 20px;
    padding-right: 24px;
    background: linear-gradient(115deg, #101a2b, #233b5a 70%, #e8892d);
}

.ad-banner-placeholder b {
    position: relative;
    z-index: 1;
    margin: 16px 24px 16px 0;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
}

/* 7. SECTIONS ET TITRES */
.section {
    padding-top: 78px;
    padding-bottom: 80px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.section-heading h2,
.cta-inner h2 {
    margin: 10px 0;
    color: var(--navy);
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.045em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.count-pill {
    flex-shrink: 0;
    border-radius: 30px;
    padding: 9px 13px;
    color: var(--muted);
    background: #f7f6f3;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* 8. RECHERCHE ET OUTILS DES PUBLICATIONS */
.publication-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: -8px 0 24px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(420px, 100%);
    min-width: 0;
    border-radius: 999px;
    padding: 0 14px;
    color: #8b99ab;
    background: #f4f2ed;
}

.search-box > span {
    flex-shrink: 0;
    font-size: 23px;
}

.search-box input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 13px 0;
    color: var(--ink);
    background: transparent;
    font-size: 12px;
}

#search-status {
    color: var(--muted);
    font-size: 10px;
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 22px 0 0;
}

.load-more-wrap button[hidden] {
    display: none !important;
}

.load-more-wrap button:disabled {
    opacity: .6;
    cursor: wait;
}

/* 9. GRILLE PRINCIPALE DES PUBLICATIONS */
.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 285px;
    align-items: start;
    gap: 28px;
    width: 100%;
    min-width: 0;
}

.content-layout > div,
.content-layout > aside {
    min-width: 0;
}

.publication-grid,
#publication-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 18px;
    width: 100%;
    min-width: 0;
}

.publication-card {
    min-width: 0;
    overflow: hidden;
    background: #f7f6f3;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transition: transform .22s ease, background .22s ease;
}

.publication-card:hover {
    transform: translateY(-3px);
    background: #f3eee7;
    box-shadow: none;
}

.pub-image {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #18263b;
}

.pub-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.publication-card:hover .pub-image img {
    transform: scale(1.035);
}

.image-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #ffffff80;
    background: linear-gradient(135deg, #09172d, #2464ad);
    font-size: 40px;
    font-weight: 900;
    letter-spacing: .1em;
}

.featured-label {
    position: absolute;
    top: 12px;
    left: 12px;
    border-radius: 5px;
    padding: 5px 8px;
    color: #6f3b0c;
    background: #f5d7b7;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .1em;
}

.pub-body {
    min-width: 0;
    padding: 16px;
    overflow-wrap: anywhere;
}

.category-tag {
    display: inline-flex;
    max-width: 100%;
    border-radius: 5px;
    padding: 5px 8px;
    color: #8d4d12;
    background: #f8e9d8;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.pub-body h3 {
    margin: 10px 0 8px;
    color: var(--navy);
    font-size: clamp(14px, 1.5vw, 19px);
    line-height: 1.3;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}

.pub-body h3 a {
    overflow-wrap: anywhere;
}

.pub-body h3 a:hover {
    color: var(--blue);
}

.pub-body > p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
}

.pub-meta {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-top: 0;
    color: #8290a3;
    font-size: 10px;
    overflow-wrap: anywhere;
}

.pub-meta time {
    overflow-wrap: anywhere;
}

.view-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #52647b;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.article-meta .view-count {
    color: #52647b;
    font-size: 12px;
}

.pub-actions {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
}

.pub-actions .read-more {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 0;
}

.read-more {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    color: var(--blue);
    font-size: 11px;
    font-weight: 900;
}

.read-more span {
    font-size: 18px;
}

.copy-pub-link {
    max-width: 100%;
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 9px 11px;
    color: #172338;
    background: #e8892d;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    white-space: normal;
    overflow-wrap: anywhere;
    transition: background .2s ease, transform .2s ease;
}

.copy-pub-link:hover {
    transform: translateY(-2px);
    background: #f3a34d;
}

.pub-actions .copy-feedback {
    flex-basis: 100%;
    color: #8d4d12;
    font-size: 10px;
}

.copy-feedback {
    color: #8d4d12;
    font-size: 12px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 45px 24px;
    border: 1px dashed #ded8cf;
    border-radius: 12px;
    text-align: center;
    background: #f8f6f2;
}

.empty-state > span {
    color: var(--blue);
    font-size: 30px;
}

.empty-state h3 {
    margin: 8px 0;
    color: var(--navy);
}

.empty-state p {
    color: var(--muted);
    font-size: 12px;
}

/* 10. BARRE LATÉRALE ET PUBLICITÉS PREMIUM */
.sidebar {
    display: grid;
    min-width: 0;
    gap: 20px;
}

.side-card,
.contact-card {
    min-width: 0;
    border-radius: 12px;
    padding: 22px;
    background: #f7f6f3;
}

.side-card h3,
.contact-card h3 {
    margin: 9px 0 8px;
    color: var(--navy);
    font-size: 21px;
    line-height: 1.25;
    letter-spacing: -.03em;
}

.side-card > p,
.contact-card p {
    margin: 0 0 17px;
    color: var(--muted);
    font-size: 12px;
}

.premium-ad {
    display: flex;
    flex-direction: column;
    position: relative;
    margin-top: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.premium-ad:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.premium-ad img {
    width: 100%;
    height: 145px;
    border-radius: 9px;
    object-fit: cover;
    background: #eef2f7;
}

.premium-badge {
    align-self: flex-start;
    margin-top: 10px;
    border-radius: 4px;
    padding: 4px 6px;
    color: #6f3b0c;
    background: #f5d7b7;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .1em;
}

.premium-ad strong {
    margin-top: 8px;
    color: var(--navy);
    font-size: 14px;
}

.premium-ad small {
    color: var(--muted);
    font-size: 10px;
}

.premium-ad p {
    margin: 7px 0;
    color: var(--muted);
    font-size: 11px;
}

.premium-ad em {
    margin-top: 5px;
    color: var(--blue);
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
}

.ad-placeholder {
    margin-top: 15px;
    border-radius: 10px;
    padding: 20px;
    background: #f7f0e8;
}

.ad-placeholder strong {
    color: var(--navy);
    font-size: 14px;
}

.ad-placeholder p {
    color: var(--muted);
    font-size: 11px;
}

.ad-placeholder a {
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
}

.contact-card {
    color: #fff;
    background: linear-gradient(135deg, #101a2b, #25354b);
}

.contact-card .eyebrow {
    color: #f2c66b;
}

.contact-card h3 {
    color: #fff;
}

.contact-card p {
    color: #c6d3e6;
}

.contact-card .btn {
    width: 100%;
    padding: 12px 8px;
    font-size: 10px;
}

/* 11. PUBLICATIONS MISES EN AVANT */
.premium-featured {
    padding-top: 42px;
    padding-bottom: 8px;
}

.premium-featured-heading {
    margin-bottom: 20px;
}

.premium-featured-heading h2 {
    margin: 8px 0;
    color: var(--navy);
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -.04em;
}

.premium-featured-heading h2 span {
    color: #d97920;
}

.premium-featured-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.premium-featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.premium-featured-card {
    display: block;
    min-width: 0;
    overflow: hidden;
    background: #f7f6f3;
    transition: transform .22s ease;
}

.premium-featured-card:hover {
    transform: translateY(-3px);
}

.premium-featured-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #18263b;
}

.premium-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.premium-featured-card:hover .premium-featured-image img {
    transform: scale(1.035);
}

.premium-featured-image > span {
    position: absolute;
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 6px 9px;
    color: #172338;
    background: #f0a04a;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .1em;
}

.premium-featured-copy {
    padding: 14px 15px 16px;
}

.premium-featured-copy small {
    color: #8b5b2c;
    font-size: 10px;
    font-weight: 800;
}

.premium-featured-copy h3 {
    margin: 8px 0 12px;
    color: var(--navy);
    font-size: 17px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.premium-featured-copy > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #273a54;
    font-size: 11px;
    font-weight: 800;
}

.premium-featured-copy b {
    color: #d97920;
    font-size: 18px;
}

/* 12. BANDE D'APPEL À L'ACTION */
.cta-band {
    border-block: 0;
    background: #f7f6f3;
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding-block: 48px;
}

.cta-inner h2 {
    max-width: 700px;
    font-size: 32px;
}

.cta-inner p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

/* 13. PIED DE PAGE */
.site-footer {
    padding: 25px 0;
    color: #c5d2e5;
    background: #101a2b;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-size: 10px;
}

.footer-brand strong {
    color: #fff;
}

.footer-brand small {
    color: #9eafc8;
}

.footer-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.site-footer a:not(.brand) {
    color: #8dc7ff;
}

/* 14. PAGE ARTICLE */
.article-page {
    max-width: 900px;
    padding-top: 38px;
    padding-bottom: 80px;
}

.back-link {
    display: inline-block;
    margin-bottom: 22px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
}

.article-detail {
    max-width: 820px;
    margin: auto;
    min-width: 0;
}

.article-detail h1 {
    margin: 15px 0;
    color: var(--navy);
    font-size: clamp(32px, 5vw, 55px);
    line-height: 1.08;
    letter-spacing: -.05em;
    overflow-wrap: anywhere;
}

.article-meta {
    margin-bottom: 25px;
    color: var(--muted);
    font-size: 11px;
}

.article-cover {
    width: 100%;
    max-height: 500px;
    margin-bottom: 25px;
    object-fit: cover;
}

.article-lead {
    color: #52627a;
    font-size: 18px;
    line-height: 1.8;
    font-weight: 600;
}

.article-content {
    margin: 28px 0 38px;
    color: #34445b;
    font-size: 15px;
    line-height: 2;
    white-space: normal;
    overflow-wrap: anywhere;
}

.article-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 24px;
}

/* 15. LIENS SOCIAUX FLOTTANTS */
.floating-socials {
    position: fixed;
    z-index: 80;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
}

.social-link {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #101a2b;
    transition: transform .2s ease, background .2s ease;
}

.social-link span {
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
}

.social-link:hover {
    transform: translateY(-3px);
    color: #101a2b;
    background: #d97920;
}

.social-contact {
    color: #101a2b;
    background: #e8892d;
}

/* 16. CONNEXION ET AUTHENTIFICATION */
.admin-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at 10% 5%, #e2edff, transparent 40%), #f4f7fc;
}

.auth-card {
    display: flex;
    width: min(460px, 100%);
    flex-direction: column;
    gap: 12px;
    padding: 35px;
    border-radius: 18px;
    background: #fff;
}

.auth-card h1 {
    margin: 0;
    color: var(--navy);
    font-size: 29px;
    line-height: 1.2;
    letter-spacing: -.04em;
}

.auth-card p {
    margin: 0 0 7px;
    color: var(--muted);
    font-size: 12px;
}

.auth-card label,
.admin-form label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #33445d;
    font-size: 11px;
    font-weight: 800;
}

.auth-card input,
.admin-form input:not([type="checkbox"]):not([type="file"]),
.admin-form textarea,
.admin-form select {
    width: 100%;
    min-width: 0;
    border: 1px solid #e6e1d8;
    border-radius: 10px;
    padding: 12px 13px;
    outline: none;
    color: var(--ink);
    background: #f4f2ed;
    font-size: 12px;
}

.auth-card input:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    outline: 2px solid #e8892d;
    outline-offset: 1px;
    border-color: #e8892d;
    box-shadow: none;
}

.full {
    width: 100%;
    margin-top: 7px;
}

/* 17. TABLEAU DE BORD ADMINISTRATEUR */
.admin-dashboard {
    background: #f3f6fb;
}

.admin-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 18px max(20px, calc((100% - 1200px) / 2));
    color: #fff;
    background: #071327;
}

.admin-brand {
    font-size: 17px;
    font-weight: 900;
}

.admin-brand small {
    display: block;
    color: #9db3d1;
    font-size: 9px;
    font-weight: 500;
}

.admin-top > div {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
}

.admin-top a:last-child {
    color: #7dc4ff;
}

.admin-container {
    width: min(1200px, calc(100% - 32px));
    margin: 35px auto 70px;
}

.admin-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.admin-heading h1 {
    margin: 5px 0;
    color: var(--navy);
    font-size: 36px;
    letter-spacing: -.05em;
}

.admin-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.admin-tabs a {
    border-radius: 8px;
    padding: 10px 14px;
    color: #3d4f68;
    background: #e7edf6;
    font-size: 11px;
    font-weight: 800;
}

.admin-tabs a:hover {
    color: var(--blue);
    background: #dceaff;
}

.admin-panel {
    margin: 18px 0;
    border-radius: 15px;
    padding: 25px;
    background: #fff;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.panel-title h2 {
    margin: 4px 0;
    color: var(--navy);
    font-size: 22px;
    letter-spacing: -.03em;
}

.admin-form {
    display: block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
    margin-bottom: 18px;
}

.form-grid .span-2 {
    grid-column: 1 / -1;
}

.admin-form input[type="file"] {
    max-width: 100%;
    padding: 8px 0;
    font-size: 11px;
}

.admin-form label small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.admin-form textarea {
    resize: vertical;
    line-height: 1.6;
}

.admin-form .check-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 9px;
    padding-top: 18px;
}

.check-label input {
    accent-color: var(--blue);
}

/* 18. TABLEAUX ADMINISTRATEURS */
.table-wrap {
    max-width: 100%;
    margin-top: 25px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    text-align: left;
}

th {
    color: #64748b;
    background: #f4f7fb;
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

td,
th {
    padding: 12px;
    border-bottom: 1px solid #edf0f5;
}

td:first-child {
    color: #24354e;
    font-weight: 700;
}

.status {
    border-radius: 20px;
    padding: 4px 8px;
    font-size: 9px;
    font-weight: 800;
}

.status.published {
    color: #168553;
    background: #e3f8ee;
}

.status.draft {
    color: #97640c;
    background: #fff4db;
}

.mini-tag {
    border-radius: 4px;
    padding: 3px 5px;
    color: #a06d12;
    background: #fff2d0;
    font-size: 8px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.actions a {
    color: var(--blue);
    font-weight: 800;
}

.actions form {
    display: inline;
}

.link-danger {
    border: 0;
    padding: 0;
    color: #cf3347;
    background: none;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.simple-list {
    margin-top: 22px;
    border-top: 1px solid var(--line);
}

.simple-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.simple-row > span:first-child {
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

.simple-row small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
}

.alert {
    margin: 15px 0;
    border-radius: 9px;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 700;
}

.alert.success {
    color: #167448;
    background: #e6f8ef;
}

.alert.error {
    color: #b42332;
    background: #fff0f0;
}

.admin-footnote {
    padding: 15px;
    color: var(--muted);
    font-size: 10px;
}

.admin-footnote code {
    border-radius: 4px;
    padding: 3px 5px;
    background: #e6ebf4;
}

/* 19. TABLETTE */
@media (max-width: 900px) {
    .nav-links {
        gap: 16px;
    }

    .content-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .premium-featured-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pub-image {
        aspect-ratio: 1 / 1;
        height: auto;
    }

    .slider {
        min-height: 410px;
    }
}

/* 20. ANDROID ET IPHONE */
@media (max-width: 700px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding-right: max(14px, env(safe-area-inset-right));
        padding-left: max(14px, env(safe-area-inset-left));
    }

    .topline-inner {
        gap: 8px;
        font-size: 9px;
        letter-spacing: .04em;
    }

    .nav-wrap {
        min-height: 68px;
        gap: 10px;
    }

    .brand {
        gap: 9px;
    }

    .brand img {
        width: 43px;
        height: 43px;
    }

    .brand strong {
        font-size: 14px;
    }

    .brand small {
        max-width: 58vw;
        font-size: 9px;
    }

    .nav-toggle {
        display: block;
        flex-shrink: 0;
    }

    .nav-links {
        position: absolute;
        top: 68px;
        right: 14px;
        left: 14px;
        z-index: 60;
        display: none;
        max-width: calc(100vw - 28px);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border-radius: 12px;
        padding: 15px;
        background: #fff;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 12px;
        border-bottom: 1px solid #f0f2f6;
    }

    .nav-links a:last-child {
        border-bottom: 0;
    }

    .hero {
        padding: 12px 0 20px;
    }

    .slider {
        min-height: 370px;
        margin-right: calc(-1 * max(14px, env(safe-area-inset-right)));
        margin-left: calc(-1 * max(14px, env(safe-area-inset-left)));
        border-radius: 0;
    }

    .slide {
        padding: 24px 20px 65px;
    }

    .slide h1,
    .hero-fallback h1 {
        font-size: clamp(31px, 9vw, 42px);
    }

    .slide p,
    .hero-fallback p {
        font-size: 13px;
    }

    .slider-controls {
        right: 15px;
        bottom: 15px;
    }

    .hero-fallback {
        min-height: 285px;
        padding: 25px 0;
    }

    .ad-strip {
        grid-template-columns: 1fr;
        gap: 10px;
        padding-top: 12px;
    }

    .ad-banner {
        min-height: 105px;
        border-radius: 0;
    }

    .ad-banner span {
        padding: 15px;
    }

    .ad-banner strong {
        font-size: 16px;
    }

    .ad-banner-placeholder {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 0 0 14px;
    }

    .ad-banner-placeholder b {
        margin: 0 15px;
        white-space: normal;
    }

    .premium-featured {
        padding-top: 28px;
        padding-bottom: 0;
    }

    .premium-featured-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .premium-featured-copy {
        padding: 10px;
    }

    .premium-featured-copy h3 {
        margin: 6px 0 9px;
        font-size: 13px;
    }

    .premium-featured-copy small {
        font-size: 9px;
    }

    .premium-featured-image > span {
        top: 7px;
        left: 7px;
        padding: 5px 7px;
        font-size: 8px;
    }

    /* PUBLICATIONS : la section prend toute la largeur disponible */
    #publications {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-top: 35px;
        padding-bottom: 40px;
    }

    #publications > .section-heading,
    #publications > .publication-tools {
        margin-right: 14px;
        margin-left: 14px;
    }

    #publications .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        margin-bottom: 20px;
    }

    #publications .section-heading h2 {
        font-size: 31px;
    }

    #publications .publication-tools {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        margin-top: 0;
    }

    #publications .search-box {
        width: 100%;
    }

    #publications .content-layout {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
    }

    #publications .content-layout > div {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
    }

    #publications .sidebar {
        display: none;
    }

    #publications #publication-grid,
    #publications .publication-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0 8px;
    }

    #publications .publication-card {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
        border-radius: 0;
        transform: none;
    }

    #publications .publication-card:hover {
        transform: none;
    }

    #publications .pub-image {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        overflow: hidden;
    }

    #publications .pub-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    #publications .pub-body {
        min-width: 0;
        padding: 10px;
        overflow-wrap: anywhere;
    }

    #publications .pub-body h3 {
        margin: 8px 0;
        font-size: clamp(12px, 3.5vw, 15px);
        line-height: 1.28;
    }

    #publications .pub-body > p {
        margin-bottom: 10px;
        font-size: 11px;
        line-height: 1.5;
    }

    #publications .pub-meta {
        align-items: flex-start;
        gap: 4px;
        font-size: 9px;
        overflow-wrap: anywhere;
    }

    #publications .category-tag {
        padding: 4px 6px;
        font-size: 8px;
    }

    #publications .pub-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    #publications .copy-pub-link {
        max-width: 100%;
        padding: 8px 9px;
        font-size: 9px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    #publications .read-more {
        font-size: 10px;
    }

    .view-count {
        font-size: 9px;
    }

    .sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    .cta-inner {
        align-items: flex-start;
        flex-direction: column;
        padding-block: 35px;
    }

    .cta-inner h2 {
        font-size: 28px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 13px;
    }

    .site-footer .container {
        padding-top: 22px;
        padding-bottom: calc(22px + env(safe-area-inset-bottom));
    }

    .article-page {
        padding-top: 25px;
    }

    .article-detail h1 {
        font-size: 34px;
    }

    .article-lead {
        font-size: 16px;
    }

    .article-share {
        align-items: stretch;
    }

    .article-share .btn {
        width: 100%;
    }

    .copy-feedback {
        width: 100%;
        text-align: center;
    }

    .admin-top {
        padding: 14px 16px;
    }

    .admin-top > div {
        flex-wrap: wrap;
        justify-content: flex-end;
        font-size: 10px;
    }

    .admin-container {
        width: calc(100% - 24px);
        margin-top: 22px;
    }

    .admin-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-heading h1 {
        font-size: 30px;
    }

    .admin-panel {
        padding: 17px;
    }

    .form-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .form-grid .span-2 {
        grid-column: auto;
    }

    .simple-row {
        align-items: flex-start;
    }

    .actions {
        gap: 8px;
    }

    .auth-card {
        padding: 25px 20px;
    }

    .floating-socials {
        right: max(9px, env(safe-area-inset-right));
        bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px));
        gap: 7px;
    }

    .social-link {
        width: 39px;
        height: 39px;
    }
}

/* 21. PETITS ÉCRANS */
@media (max-width: 360px) {
    .container {
        width: 100%;
        padding-right: 10px;
        padding-left: 10px;
    }

    #publications > .section-heading,
    #publications > .publication-tools {
        margin-right: 10px;
        margin-left: 10px;
    }

    #publications #publication-grid,
    #publications .publication-grid {
        gap: 7px;
        padding-right: 6px;
        padding-left: 6px;
    }

    #publications .pub-body {
        padding: 8px;
    }

    #publications .pub-body h3 {
        font-size: 12px;
    }

    #publications .pub-body > p {
        font-size: 10px;
    }

    #publications .copy-pub-link {
        padding: 7px 8px;
        font-size: 9px;
    }

    .premium-featured-grid {
        gap: 7px;
    }

    .premium-featured-copy h3 {
        font-size: 12px;
    }
}

/* 22. ACCESSIBILITÉ : LIMITER LES ANIMATIONS */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }
}