/* ==========================================================================
   Alternative Magasine — systeme de design
   Charte : turquoise (#66FFFF → #006666) + vert du logo (#7A9A3A → #2FA07A)
   Equilibre 50/50 : le turquoise structure, le vert signe.
   Toutes les regles utilisent des proprietes logiques → RTL arabe natif.
   ========================================================================== */

:root {
    /* --- turquoise (charte) --- */
    --t-100: #E6FFFF;
    --t-200: #66FFFF;
    --t-300: #4DD9D9;
    --t-400: #33B3B3;
    --t-500: #1A8C8C;
    --t-600: #006666;
    --t-700: #054E4E;
    --t-800: #063F3F;
    --t-900: #042B2B;

    /* --- vert (logo) --- */
    --g-olive: #7A9A3A;
    --g-mid: #5C9A50;
    --g-emerald: #2FA07A;
    --g-deep: #157045;
    --g-soft: #60A176;
    --sky: #9AD1E5;

    /* --- neutres --- */
    --ink: #08211F;
    --ink-2: #123634;
    --muted: #587471;
    --muted-2: #8AA5A2;
    --line: #DCE9E7;
    --line-2: #EDF4F3;
    --paper: #FFFFFF;
    --canvas: #F5FAF9;
    --canvas-2: #EAF3F1;

    /* --- signatures --- */
    --grad-brand: linear-gradient(120deg, var(--g-olive) 0%, var(--g-mid) 45%, var(--g-emerald) 100%);
    --grad-teal: linear-gradient(120deg, var(--t-600) 0%, var(--t-500) 55%, var(--t-400) 100%);
    --grad-mix: linear-gradient(120deg, var(--g-emerald) 0%, var(--t-500) 55%, var(--t-400) 100%);

    --font-display: 'Fraunces', 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-ar: 'Cairo', 'Segoe UI', Tahoma, sans-serif;

    --maxw: 1220px;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 2px 10px -4px rgba(6, 63, 63, .18);
    --shadow: 0 18px 44px -30px rgba(6, 63, 63, .45);
    --shadow-lg: 0 34px 80px -44px rgba(6, 63, 63, .55);
    --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    background: var(--canvas);
    color: var(--ink);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

html[dir="rtl"] body { font-family: var(--font-ar); line-height: 1.9; }
html[dir="rtl"] .display, html[dir="rtl"] h1, html[dir="rtl"] h2,
html[dir="rtl"] h3, html[dir="rtl"] h4 { font-family: var(--font-ar); font-weight: 700; letter-spacing: 0; }

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--t-300); color: var(--t-900); }

:focus-visible {
    outline: 3px solid var(--t-500);
    outline-offset: 3px;
    border-radius: 4px;
}

/* -------------------------------------------------------------- structure */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(18px, 5vw, 44px); }
.section { padding-block: clamp(52px, 7vw, 96px); }
.section--tight { padding-block: clamp(36px, 5vw, 64px); }
.section--dark { background: var(--t-800); color: #EAF7F6; }
.section--canvas { background: var(--canvas-2); }

.display {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -.02em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.3; }

.lead { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--muted); font-weight: 400; }
.section--dark .lead { color: #A9D6D3; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: .74rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
    color: var(--t-600);
}
html[dir="rtl"] .eyebrow { letter-spacing: .04em; }
.eyebrow::before {
    content: ""; inline-size: 26px; block-size: 3px; border-radius: 3px; background: var(--grad-brand);
}
.section--dark .eyebrow { color: var(--t-300); }

.section-head { max-width: 680px; margin-block-end: clamp(28px, 4vw, 46px); }
.section-head .eyebrow { margin-block-end: 14px; }
.section-head h2 { margin-block-end: 12px; }

.head-row {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 24px; flex-wrap: wrap; margin-block-end: clamp(24px, 3vw, 40px);
}

/* -------------------------------------------------------------- boutons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; font-size: .95rem; cursor: pointer;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--grad-mix); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { box-shadow: 0 16px 34px -18px rgba(26, 140, 140, .8); }
.btn--ghost { border-color: var(--line); background: var(--paper); color: var(--ink); }
.btn--ghost:hover { border-color: var(--t-400); color: var(--t-600); }
.btn--light { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .3); backdrop-filter: blur(6px); }
.btn--light:hover { background: rgba(255, 255, 255, .24); }
.btn--sm { padding: 9px 18px; font-size: .86rem; }
.btn--block { width: 100%; }

.arrow { transition: transform .25s var(--ease); }
html[dir="rtl"] .arrow { transform: scaleX(-1); }
.btn:hover .arrow { transform: translateX(4px); }
html[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(4px); }

/* -------------------------------------------------------------- entete */
.skip {
    position: absolute; inset-block-start: -60px; inset-inline-start: 12px; z-index: 300;
    background: var(--t-800); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 10px;
    transition: inset-block-start .2s;
}
.skip:focus { inset-block-start: 0; }

.site-header {
    position: sticky; inset-block-start: 0; z-index: 120;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(14px);
    border-block-end: 1px solid var(--line);
    transition: box-shadow .3s, background .3s;
}
.site-header.is-stuck { box-shadow: 0 10px 30px -24px rgba(6, 63, 63, .5); }

.header-inner { display: flex; align-items: center; gap: 22px; min-height: 74px; }

.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand img { height: 42px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.brand-tag { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); }
html[dir="rtl"] .brand-tag { letter-spacing: .02em; }

.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav a {
    padding: 9px 14px; border-radius: 999px; font-size: .93rem; font-weight: 500;
    color: var(--ink-2); transition: background .2s, color .2s;
}
.nav a:hover { background: var(--canvas-2); color: var(--t-600); }
.nav a.is-active { color: var(--t-600); background: var(--t-100); }

.header-tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.icon-btn {
    inline-size: 40px; block-size: 40px; display: grid; place-items: center;
    border-radius: 50%; border: 1px solid var(--line); background: var(--paper);
    cursor: pointer; transition: border-color .2s, color .2s, background .2s;
}
.icon-btn:hover { border-color: var(--t-400); color: var(--t-600); }

.lang-switch { display: flex; align-items: center; gap: 2px; background: var(--canvas-2); border-radius: 999px; padding: 3px; }
.lang-switch a {
    padding: 6px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600;
    color: var(--muted); transition: background .2s, color .2s;
}
.lang-switch a.is-active { background: var(--paper); color: var(--t-600); box-shadow: var(--shadow-sm); }

.burger { display: none; }

/* recherche escamotable */
.search-bar {
    display: none; padding-block: 14px 18px; border-block-start: 1px solid var(--line-2);
}
.search-bar.is-open { display: block; }
.search-bar form { display: flex; gap: 10px; }
.search-bar input {
    flex: 1; padding: 13px 18px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--canvas); outline: none;
}
.search-bar input:focus { border-color: var(--t-400); background: var(--paper); }

/* -------------------------------------------------------------- banniere */
.hero { position: relative; overflow: hidden; background: var(--t-900); color: #fff; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media video, .hero__media img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(1100px 520px at 78% 12%, rgba(77, 217, 217, .30), transparent 62%),
        linear-gradient(105deg, rgba(4, 43, 43, .95) 0%, rgba(6, 63, 63, .88) 42%, rgba(21, 112, 69, .62) 100%);
}
html[dir="rtl"] .hero::after { background:
        radial-gradient(1100px 520px at 22% 12%, rgba(77, 217, 217, .30), transparent 62%),
        linear-gradient(255deg, rgba(4, 43, 43, .95) 0%, rgba(6, 63, 63, .88) 42%, rgba(21, 112, 69, .62) 100%); }

.hero__inner {
    position: relative; padding-block: clamp(76px, 12vw, 156px);
    display: grid; gap: 34px; align-items: end; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
}
.hero__text { max-width: 640px; }
.hero .eyebrow { color: var(--t-200); }
.hero .eyebrow::before { background: var(--t-200); }
.hero h1 { margin-block: 18px 20px; color: #fff; }
.hero p { color: #C6E8E6; font-size: clamp(1.02rem, 1.5vw, 1.2rem); max-width: 54ch; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-block-start: 30px; }

.hero__card {
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
    backdrop-filter: blur(14px); border-radius: var(--radius); padding: 22px 24px;
}
.hero__card .k { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--t-200); }
.hero__card h3 { font-family: var(--font-display); margin-block: 10px 8px; color: #fff; font-size: 1.3rem; }
.hero__card p { color: #B9DEDC; font-size: .95rem; }
.hero__card a { display: inline-flex; align-items: center; gap: 8px; margin-block-start: 14px; color: var(--t-200); font-weight: 600; font-size: .92rem; }

.hero__scroll {
    position: absolute; inset-block-end: 22px; inset-inline-start: 50%; transform: translateX(-50%);
    color: rgba(255, 255, 255, .6); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
}

.video-toggle {
    position: absolute; inset-block-end: 22px; inset-inline-end: 24px; z-index: 3;
    inline-size: 42px; block-size: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(4, 43, 43, .45); color: #fff; display: grid; place-items: center; cursor: pointer;
    backdrop-filter: blur(6px);
}

/* -------------------------------------------------------------- cartes */
.grid { display: grid; gap: clamp(20px, 2.4vw, 30px); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.card {
    background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--line); }

.card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--t-800); }
.card__media img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }

.card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__title { font-family: var(--font-display); font-size: 1.22rem; line-height: 1.28; font-weight: 600; }
.card:hover .card__title { color: var(--t-600); }
.card__excerpt { color: var(--muted); font-size: .95rem; flex: 1; }
.card__meta { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted-2); margin-block-start: 4px; }
.card__meta .dot { inline-size: 3px; block-size: 3px; border-radius: 50%; background: currentColor; }

.tag {
    display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
    padding: 5px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700;
    letter-spacing: .09em; text-transform: uppercase;
    background: var(--t-100); color: var(--t-600);
}
html[dir="rtl"] .tag { letter-spacing: 0; }
.tag--green { background: #E9F3E7; color: var(--g-deep); }
.tag--blue { background: #E7F3F8; color: #0B4A63; }
.tag--gold { background: #EAF7F5; color: #0E4B45; }
.tag--floating { position: absolute; inset-block-start: 14px; inset-inline-start: 14px; background: rgba(255, 255, 255, .93); }

.play-badge {
    position: absolute; inset: 0; display: grid; place-items: center;
    background: linear-gradient(180deg, rgba(4, 43, 43, .1), rgba(4, 43, 43, .5));
}
.play-badge span {
    inline-size: 58px; block-size: 58px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255, 255, 255, .92); color: var(--t-700);
    transition: transform .3s var(--ease);
}
.card:hover .play-badge span { transform: scale(1.1); }

/* article a la une */
.headline {
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(22px, 3vw, 44px); align-items: center;
    background: var(--paper); border: 1px solid var(--line-2); border-radius: calc(var(--radius) + 6px);
    overflow: hidden; box-shadow: var(--shadow-sm);
}
.headline__media { position: relative; aspect-ratio: 4 / 3; block-size: 100%; }
.headline__media img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.headline__body { padding: clamp(24px, 3vw, 46px) clamp(24px, 3vw, 46px) clamp(24px, 3vw, 46px) 0; }
html[dir="rtl"] .headline__body { padding-inline: 0 clamp(24px, 3vw, 46px); }
.headline__body h2 { font-family: var(--font-display); margin-block: 14px 14px; font-size: clamp(1.6rem, 2.8vw, 2.3rem); line-height: 1.16; }
.headline__body p { color: var(--muted); }
.headline__body .card__meta { margin-block-start: 18px; }

/* rubriques */
.cat-card {
    position: relative; overflow: hidden; border-radius: var(--radius);
    padding: 26px 24px 24px; color: #fff; min-block-size: 168px;
    display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.cat-card::before { content: ""; position: absolute; inset: 0; z-index: -1; }
.cat-card--teal::before { background: var(--grad-teal); }
.cat-card--green::before { background: var(--grad-brand); }
.cat-card--blue::before { background: linear-gradient(120deg, #0B4A63, #2C7F9E 60%, var(--sky)); }
.cat-card--gold::before { background: linear-gradient(120deg, #0E4B45, var(--t-500) 55%, var(--t-300)); }
.cat-card h3 { font-family: var(--font-display); font-size: 1.35rem; }
.cat-card p { font-size: .88rem; color: rgba(255, 255, 255, .82); }
.cat-card .count { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }

/* -------------------------------------------------------------- filtres */
.filters { display: flex; gap: 9px; flex-wrap: wrap; margin-block-end: 30px; }
.filters a {
    padding: 9px 17px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--paper); font-size: .87rem; font-weight: 500; color: var(--muted);
    transition: all .22s;
}
.filters a:hover { border-color: var(--t-400); color: var(--t-600); }
.filters a.is-active { background: var(--t-800); border-color: var(--t-800); color: #fff; }

/* -------------------------------------------------------------- article */
.article-hero { background: var(--t-800); color: #fff; padding-block: clamp(46px, 6vw, 78px) clamp(120px, 14vw, 180px); }
.article-hero .tag { background: rgba(255, 255, 255, .16); color: #DFF6F5; }
.article-hero h1 { margin-block: 18px 18px; max-width: 22ch; }
.article-hero .lead { color: #B4DCDA; max-width: 62ch; }
.article-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-block-start: 26px; font-size: .88rem; color: #93C4C1; }
.article-meta .who { display: flex; align-items: center; gap: 10px; }
.article-avatar {
    inline-size: 40px; block-size: 40px; border-radius: 50%; background: var(--grad-brand);
    display: grid; place-items: center; font-weight: 700; color: #fff; font-size: .85rem;
}

.article-shell { margin-block-start: clamp(-100px, -10vw, -140px); position: relative; z-index: 2; padding-block-end: clamp(40px, 6vw, 80px); }
.article-figure { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); background: #000; }
.article-figure img { inline-size: 100%; }

.article-layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 280px;
    gap: clamp(28px, 4vw, 56px); margin-block-start: clamp(30px, 4vw, 52px);
}

.prose { max-width: 72ch; font-size: 1.08rem; }
.prose > * + * { margin-block-start: 1.25em; }
.prose h2, .prose h3 {
    font-family: var(--font-display); font-weight: 600; line-height: 1.22;
    margin-block-start: 1.9em; color: var(--ink);
}
.prose h2 { font-size: 1.7rem; }
.prose h3 { font-size: 1.32rem; }
.prose p { color: #24403E; }
.prose a { color: var(--t-600); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-inline-start: 1.3em; display: grid; gap: .55em; }
.prose li { color: #24403E; }
.prose li::marker { color: var(--t-400); }
.prose blockquote {
    border-inline-start: 4px solid transparent;
    border-image: var(--grad-brand) 1;
    padding-inline-start: 24px; margin-block: 1.8em;
    font-family: var(--font-display); font-size: 1.28rem; line-height: 1.42; color: var(--t-700);
}
.prose figure { margin-block: 2em; }
.prose figure img { border-radius: var(--radius-sm); }
.prose figcaption { font-size: .86rem; color: var(--muted-2); margin-block-start: 10px; }
.prose .note {
    background: var(--canvas-2); border-radius: var(--radius-sm); padding: 18px 22px;
    font-size: .98rem; color: var(--ink-2);
}

.aside { display: grid; gap: 26px; align-content: start; position: sticky; inset-block-start: 100px; }
.aside__box { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 20px 22px; }
.aside__box h4 { font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); margin-block-end: 14px; }
html[dir="rtl"] .aside__box h4 { letter-spacing: .03em; }
.aside__list { display: grid; gap: 14px; }
.aside__list a { display: grid; gap: 4px; font-size: .93rem; font-weight: 500; line-height: 1.35; }
.aside__list a:hover { color: var(--t-600); }
.aside__list span { font-size: .78rem; color: var(--muted-2); font-weight: 400; }

.share { display: flex; gap: 8px; flex-wrap: wrap; }
.share a, .share button {
    inline-size: 38px; block-size: 38px; border-radius: 50%; border: 1px solid var(--line);
    background: var(--paper); display: grid; place-items: center; cursor: pointer;
    transition: all .2s; color: var(--muted);
}
.share a:hover, .share button:hover { border-color: var(--t-400); color: var(--t-600); transform: translateY(-2px); }

.tags-row { display: flex; gap: 8px; flex-wrap: wrap; margin-block-start: 34px; }
.tags-row a { padding: 6px 14px; border-radius: 999px; background: var(--canvas-2); font-size: .82rem; color: var(--muted); }
.tags-row a:hover { background: var(--t-100); color: var(--t-600); }

/* -------------------------------------------------------------- lecteur video */
.player { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.player video { inline-size: 100%; display: block; }
.player__bar {
    position: absolute; inset-inline: 0; inset-block-end: 0; padding: 14px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .78));
    display: flex; align-items: center; gap: 12px;
    opacity: 0; transition: opacity .3s;
}
.player:hover .player__bar, .player.is-paused .player__bar { opacity: 1; }
.player__btn { background: none; border: 0; color: #fff; cursor: pointer; display: grid; place-items: center; }
.player__progress { flex: 1; block-size: 4px; border-radius: 4px; background: rgba(255, 255, 255, .25); cursor: pointer; }
.player__progress i { display: block; block-size: 100%; border-radius: 4px; background: var(--t-300); inline-size: 0; }
.player__time { color: #fff; font-size: .78rem; font-variant-numeric: tabular-nums; }
.player__big {
    position: absolute; inset: 0; display: grid; place-items: center; border: 0; cursor: pointer;
    background: rgba(4, 43, 43, .25); transition: opacity .3s;
}
.player__big span { inline-size: 74px; block-size: 74px; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--t-700); display: grid; place-items: center; }
.player.is-playing .player__big { opacity: 0; pointer-events: none; }

/* -------------------------------------------------------------- formulaires */
.form-grid { display: grid; gap: 18px; }
.form-row { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 7px; }
.field label { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
    padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--paper); outline: none; transition: border-color .2s, box-shadow .2s;
    inline-size: 100%;
}
.field textarea { min-block-size: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--t-400); box-shadow: 0 0 0 4px rgba(51, 179, 179, .14);
}
.field .err { font-size: .8rem; color: #C0392B; display: none; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #E08076; }
.field.has-error .err { display: block; }
.hp { position: absolute; inset-inline-start: -9999px; opacity: 0; }

.alert { padding: 14px 18px; border-radius: 12px; font-size: .93rem; }
.alert--ok { background: #E7F6EF; color: #14664A; }
.alert--err { background: #FCECEA; color: #A93226; }

.sent-card { text-align: center; padding: clamp(34px, 5vw, 60px); }
.sent-card .check {
    inline-size: 68px; block-size: 68px; border-radius: 50%; margin-inline: auto;
    background: var(--grad-brand); display: grid; place-items: center; color: #fff; margin-block-end: 20px;
}

/* newsletter */
.news {
    background: var(--t-800); color: #fff; border-radius: calc(var(--radius) + 6px);
    padding: clamp(30px, 4vw, 52px); display: grid; gap: 26px;
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: center;
    position: relative; overflow: hidden;
}
.news::before {
    content: ""; position: absolute; inset-block-start: -40%; inset-inline-end: -10%;
    inline-size: 460px; block-size: 460px; border-radius: 50%;
    background: radial-gradient(circle, rgba(77, 217, 217, .28), transparent 70%);
}
.news h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.news p { color: #A9D6D3; margin-block-start: 10px; }
.news form { display: flex; gap: 10px; position: relative; }
.news input {
    flex: 1; padding: 14px 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .1); color: #fff; outline: none;
}
.news input::placeholder { color: #8FBCBA; }
.news input:focus { border-color: var(--t-300); background: rgba(255, 255, 255, .16); }
.news .msg { font-size: .86rem; margin-block-start: 10px; color: var(--t-200); min-block-size: 1.2em; }

/* -------------------------------------------------------------- pagination */
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-block-start: 44px; flex-wrap: wrap; }
.pager a, .pager span {
    min-inline-size: 42px; block-size: 42px; padding-inline: 14px; border-radius: 12px;
    display: grid; place-items: center; border: 1px solid var(--line); background: var(--paper);
    font-size: .9rem; font-weight: 500; color: var(--muted);
}
.pager a:hover { border-color: var(--t-400); color: var(--t-600); }
.pager .is-active { background: var(--t-800); border-color: var(--t-800); color: #fff; }
.pager .is-disabled { opacity: .4; }

.empty { text-align: center; padding: clamp(44px, 7vw, 88px); color: var(--muted); }
.empty svg { margin-inline: auto; margin-block-end: 18px; color: var(--line); }

/* -------------------------------------------------------------- pied */
.site-footer { background: var(--t-900); color: #B7D8D6; padding-block: clamp(46px, 6vw, 74px) 30px; }
.footer-grid {
    display: grid; gap: clamp(26px, 3vw, 48px);
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    padding-block-end: 34px; border-block-end: 1px solid rgba(255, 255, 255, .1);
}
.site-footer img.footer-logo { block-size: 62px; inline-size: auto; margin-block-end: 16px; }
.site-footer h4 { color: #fff; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin-block-end: 16px; }
html[dir="rtl"] .site-footer h4 { letter-spacing: .03em; }
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer a:hover { color: var(--t-200); }
.site-footer p { font-size: .92rem; max-width: 40ch; }
.socials { display: flex; gap: 10px; margin-block-start: 20px; }
.socials a {
    inline-size: 38px; block-size: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18);
    display: grid; place-items: center; transition: all .2s;
}
.socials a:hover { background: rgba(255, 255, 255, .1); border-color: var(--t-300); color: var(--t-200); transform: translateY(-2px); }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    flex-wrap: wrap; padding-block-start: 22px; font-size: .85rem; color: #7FA9A7;
}

.to-top {
    position: fixed; inset-block-end: 26px; inset-inline-end: 26px; z-index: 90;
    inline-size: 46px; block-size: 46px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--t-800); color: #fff; display: grid; place-items: center;
    opacity: 0; pointer-events: none; transform: translateY(12px);
    transition: opacity .3s, transform .3s; box-shadow: var(--shadow);
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }

.progress-bar {
    position: fixed; inset-block-start: 0; inset-inline-start: 0; z-index: 200;
    block-size: 3px; inline-size: 0; background: var(--grad-brand);
}

/* -------------------------------------------------------------- tiroir mobile */
/* Place hors de <header> : le backdrop-filter de l'en-tete creerait un bloc
   conteneur qui emprisonnerait un enfant en position: fixed. */

.drawer-backdrop {
    position: fixed; inset: 0; z-index: 190;
    background: rgba(4, 43, 43, .55);
    backdrop-filter: blur(3px);
    opacity: 0; transition: opacity .3s var(--ease);
}
.drawer-backdrop.is-open { opacity: 1; }

.drawer {
    position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 200;
    inline-size: min(88vw, 380px);
    display: flex; flex-direction: column;
    background: #FFFFFF;                      /* opaque : jamais de transparence */
    box-shadow: -24px 0 60px -30px rgba(4, 43, 43, .55);
    transform: translateX(103%);
    transition: transform .34s var(--ease), visibility .34s;
    visibility: hidden;
    overscroll-behavior: contain;
}
html[dir="rtl"] .drawer {
    transform: translateX(-103%);
    box-shadow: 24px 0 60px -30px rgba(4, 43, 43, .55);
}
.drawer.is-open,
html[dir="rtl"] .drawer.is-open {
    /* Le selecteur RTL ci-dessus est plus specifique (attribut + classe) que
       « .drawer.is-open » seul : il faut donc le repeter ici, sinon le tiroir
       reste hors ecran en arabe. */
    transform: none;
    visibility: visible;
}

.drawer__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 18px; background: var(--t-800); color: #fff;
    padding-block-start: calc(16px + env(safe-area-inset-top, 0px));
}
.drawer__brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.drawer__brand img { flex: 0 0 auto; }
.drawer__brand span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.drawer__brand b { font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.drawer__brand small {
    font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--t-300);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html[dir="rtl"] .drawer__brand small { letter-spacing: .02em; }
.drawer__close {
    flex: 0 0 auto; inline-size: 38px; block-size: 38px; display: grid; place-items: center;
    border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer;
}
.drawer__close:hover { background: rgba(255, 255, 255, .2); }

.drawer__body { flex: 1; overflow-y: auto; padding: 16px 18px; display: grid; gap: 18px; align-content: start; }

.drawer__search { position: relative; display: flex; align-items: center; }
.drawer__search svg { position: absolute; inset-inline-start: 15px; color: var(--muted-2); pointer-events: none; }
.drawer__search input {
    inline-size: 100%; padding: 13px 16px; padding-inline-start: 44px;
    border-radius: 999px; border: 1px solid var(--line); background: var(--canvas); outline: none;
}
.drawer__search input:focus { border-color: var(--t-400); background: var(--paper); }

.drawer__nav { display: grid; gap: 4px; }
.drawer__nav a {
    display: flex; align-items: center; gap: 13px;
    padding: 11px 14px; border-radius: 12px;
    font-size: .99rem; font-weight: 500; color: var(--ink);
    transition: background .2s, color .2s;
}
.drawer__nav a svg { inline-size: 21px; block-size: 21px; flex: 0 0 auto; fill: var(--t-500); }
.drawer__nav a:hover { background: var(--canvas-2); }
.drawer__nav a.is-active { background: var(--t-100); color: var(--t-600); font-weight: 600; }
.drawer__nav a.is-active svg { fill: var(--t-600); }

.drawer__section h3 {
    font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: var(--muted-2); margin-block-end: 12px;
}
html[dir="rtl"] .drawer__section h3 { letter-spacing: .03em; }

.drawer__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    padding: 8px 14px; border-radius: 999px; font-size: .86rem; font-weight: 600;
    background: var(--t-100); color: var(--t-600);
}
.chip--green { background: #E9F3E7; color: var(--g-deep); }
.chip--blue { background: #E7F3F8; color: #0B4A63; }
.chip--gold { background: #EAF7F5; color: #0E4B45; }

.drawer__langs { display: flex; gap: 8px; flex-wrap: wrap; }
.drawer__langs a {
    padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
    font-size: .9rem; color: var(--muted);
}
.drawer__langs a.is-active {
    background: var(--t-800); border-color: var(--t-800); color: #fff; font-weight: 600;
}

.drawer__foot {
    padding: 16px 18px; border-block-start: 1px solid var(--line-2); background: var(--canvas);
    display: grid; gap: 14px; justify-items: center;
    padding-block-end: calc(16px + env(safe-area-inset-bottom, 0px));
}
.drawer__socials { display: flex; gap: 10px; }
.drawer__socials a {
    inline-size: 38px; block-size: 38px; border-radius: 50%; border: 1px solid var(--line);
    display: grid; place-items: center; color: var(--muted); background: var(--paper);
}
.drawer__socials a:hover { border-color: var(--t-400); color: var(--t-600); }
.drawer__mail { font-size: .84rem; color: var(--muted-2); }

@media (min-width: 781px) {
    .drawer, .drawer-backdrop { display: none; }
}

/* -------------------------------------------------------------- animations */
/* Sans JavaScript, le contenu reste visible : l'animation n'est activee que
   lorsque la classe .js est posee par le script en tete de page. */
.reveal { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
    .article-layout { grid-template-columns: 1fr; }
    .aside { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
    .hero__inner { grid-template-columns: 1fr; }
    .news { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .headline { grid-template-columns: 1fr; }
    .headline__media { aspect-ratio: 16 / 9; }
    .headline__body { padding: 26px 24px 30px; }
    html[dir="rtl"] .headline__body { padding: 26px 24px 30px; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
    body { font-size: 16px; }
    .burger { display: grid; }
    .header-inner { gap: 10px; }
    .brand { min-width: 0; }
    .brand img { height: 34px; }
    .brand-tag { display: none; }
    .brand-name { font-size: .98rem; white-space: nowrap; }
    .lang-switch a { padding: 6px 8px; font-size: .72rem; }
    .nav { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .news form { flex-direction: column; }
    .news input, .news .btn { inline-size: 100%; }
}

@media (max-width: 560px) {
    .lang-switch { display: none; }
}

@media print {
    .site-header, .site-footer, .aside, .to-top, .share, .progress-bar { display: none !important; }
    body { background: #fff; }
    .article-hero { background: #fff; color: #000; padding-block: 20px; }
}
