/* ==========================================================================
   etablissement.ma — Public institutional website & platform pages
   Modern editorial layout: light surfaces, deep-blue brand, saffron markers.
   Requires etab.css
   ========================================================================== */

/* Page frame: footer always at the bottom */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site > main { flex: 1 0 auto; outline: none; }
/* IBM Plex Sans Arabic reads small at 16px: public pages use 17px running text in Arabic */
:root[lang="ar"] .site { font-size: 1.0625rem; line-height: 1.8; }

/* -------------------------------------------------------------------------
   Utility bar (light)
   ------------------------------------------------------------------------- */
.utility-bar { background: var(--white); color: var(--gray-600); font-size: var(--text-xs); border-bottom: 1px solid var(--gray-100); }
.utility-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 38px; }
.utility-bar__info { display: flex; align-items: center; gap: var(--space-5); min-width: 0; }
.utility-bar__info span { display: inline-flex; align-items: center; gap: var(--space-2); white-space: nowrap; }
.utility-bar__info i { color: var(--brand-600); }
.utility-bar a { color: inherit; }
.utility-bar a:hover { color: var(--brand-700); }
.utility-bar__end { display: flex; align-items: center; gap: var(--space-3); }
.social { display: flex; align-items: center; gap: var(--space-1); }
.social a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: inherit; text-decoration: none; }
.social a:hover { background: var(--brand-50); color: var(--brand-700); }
.utility-bar .lang-switch--dark { border-color: var(--gray-200); }
.utility-bar .lang-switch--dark button { color: var(--gray-600); }
.utility-bar .lang-switch--dark button[aria-pressed="true"] { background: var(--brand-800); color: #fff; }
@media (max-width: 767px) { .utility-bar__info .hide-sm, .utility-bar .social { display: none; } }

/* -------------------------------------------------------------------------
   Masthead (identity row + navigation row)
   ------------------------------------------------------------------------- */
.masthead { background: rgba(255,255,255,.97); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 0 var(--gray-200), 0 8px 24px -18px rgba(15, 23, 42, .35); }
/* Blur lives on a pseudo-element: backdrop-filter on .masthead itself would make it the containing block of position:fixed children (e.g. the mobile menu), clipping them to its height. */
.masthead::before { content: ''; position: absolute; inset: 0; z-index: -1; backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); pointer-events: none; }
@media (min-width: 1024px) { .masthead { top: calc(-1 * var(--masthead-bar, 88px)); } }
.masthead__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-3); }
.identity { display: flex; align-items: center; gap: var(--space-4); min-width: 0; color: inherit; text-decoration: none !important; }
.identity__logo { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; }
.identity__text { display: flex; flex-direction: column; min-width: 0; padding-inline-start: var(--space-4); border-inline-start: 1px solid var(--gray-200); }
.identity__name { font-family: var(--font-ar); font-weight: 700; font-size: var(--text-lg); color: var(--ink); line-height: 1.4; letter-spacing: -.005em; }
.identity__name-alt { font-family: var(--font-fr); font-weight: 500; font-size: var(--text-sm); color: var(--gray-500); line-height: 1.35; }
.identity__id { font-size: var(--text-xs); color: var(--brand-700); font-weight: 600; margin-block-start: 3px; display: inline-flex; align-items: center; gap: 6px; }
.identity__id::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-500); }
.identity__name, .identity__name-alt { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.masthead__actions { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.masthead__actions .btn--contact { border-radius: var(--radius-full); padding-inline: var(--space-5); }
.menu-toggle { display: none; }
@media (max-width: 1023px) {
    .masthead__bar { padding-block: var(--space-3); }
    .identity__logo { width: 44px; height: 44px; }
    .identity__text { padding-inline-start: var(--space-3); }
    .identity__name { font-size: var(--text-base); }
    .identity__id { display: none; }
    .masthead__actions .btn--contact { display: none; }
    .menu-toggle { display: inline-flex; border-radius: var(--radius-full); }
}
@media (max-width: 420px) { .identity__name-alt { display: none; } }

/* Main nav — pill style */
.mainnav { border-top: 1px solid var(--gray-100); }
.mainnav__list { list-style: none; margin: 0; padding: 6px 0; display: flex; align-items: center; gap: var(--space-1); }
.mainnav__item { position: relative; }
.mainnav__link {
    display: inline-flex; align-items: center; gap: var(--space-2); height: 40px; padding: 0 var(--space-4);
    font-weight: 600; font-size: var(--text-sm); color: var(--gray-700); background: none; border: 0; border-radius: var(--radius-full);
    text-decoration: none !important; white-space: nowrap; transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.mainnav__link:hover { color: var(--brand-800); background: var(--gray-100); }
.mainnav__link.is-active { color: var(--brand-800); background: var(--brand-50); font-weight: 700; }
@media (min-width: 1024px) {
    /* Active page: a short saffron underline below the pill, so the state does not rely on colour alone */
    .mainnav__link { position: relative; }
    .mainnav__link.is-active::after { content: ''; position: absolute; inset-inline: 35%; bottom: -6px; height: 2px; border-radius: 2px; background: var(--accent-500); }
}
.mainnav__link .fa-chevron-down { font-size: 10px; opacity: .6; transition: transform var(--dur) var(--ease); }
.mainnav__link[aria-expanded="true"] .fa-chevron-down { transform: rotate(180deg); }
.mainnav__sub {
    position: absolute; inset-inline-start: 0; top: calc(100% + 6px); min-width: 250px; z-index: 20;
    list-style: none; margin: 0; padding: var(--space-2); background: var(--white);
    border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    display: none;
}
.mainnav__item.is-open > .mainnav__sub { display: block; animation: etab-rise 160ms var(--ease); }
.mainnav__sub::before { content: ''; position: absolute; inset-inline: 0; top: -8px; height: 8px; }
.mainnav__sub a { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius); color: var(--gray-700); font-size: var(--text-sm); font-weight: 500; text-decoration: none !important; }
.mainnav__sub a i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--brand-50); color: var(--brand-700); font-size: .85rem; }
.mainnav__sub a:hover, .mainnav__sub a.is-active { background: var(--gray-50); color: var(--brand-800); }
.mainnav__spacer { flex: 1; }
.mainnav__drawer-head { display: none; }

@media (max-width: 1023px) {
    .mainnav {
        position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 150; width: min(88vw, 360px); background: var(--white);
        border: 0; overflow-y: auto; box-shadow: var(--shadow-lg);
        transform: translateX(-100%); transition: transform 240ms var(--ease); visibility: hidden;
    }
    [dir="rtl"] .mainnav { transform: translateX(100%); }
    .mainnav.is-open { transform: none; visibility: visible; }
    .mainnav .container { padding: 0; }
    .mainnav__drawer-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--gray-100); }
    .mainnav__drawer-head strong { font-size: var(--text-md); }
    .mainnav__drawer-head .btn--on-dark { --btn-fg: var(--ink); --btn-bd: var(--gray-200); }
    .mainnav__list { flex-direction: column; align-items: stretch; gap: 2px; padding: var(--space-3); }
    .mainnav__link { width: 100%; height: 48px; justify-content: space-between; border-radius: var(--radius); font-size: var(--text-base); }
    .mainnav__sub { position: static; display: none; box-shadow: none; border: 0; padding: 0 0 var(--space-2); background: none; min-width: 0; }
    .mainnav__sub a { padding: var(--space-2) var(--space-4); }
    .mainnav__spacer { display: none; }
    .nav-scrim { position: fixed; inset: 0; z-index: 140; background: color-mix(in srgb, var(--brand-950) 40%, transparent); }
}

/* -------------------------------------------------------------------------
   Page head (light title area + breadcrumb)
   ------------------------------------------------------------------------- */
.page-head { position: relative; background: var(--white); border-bottom: 1px solid var(--gray-200); overflow: hidden; }
.page-head::after { content: ''; position: absolute; inset-block: 0; inset-inline-end: 0; width: 42%; background-image: radial-gradient(var(--brand-100) 1.2px, transparent 1.2px); background-size: 18px 18px; -webkit-mask-image: linear-gradient(to left, #000, transparent); mask-image: linear-gradient(to left, #000, transparent); pointer-events: none; }
[dir="rtl"] .page-head::after { -webkit-mask-image: linear-gradient(to right, #000, transparent); mask-image: linear-gradient(to right, #000, transparent); }
.page-head__inner { position: relative; z-index: 1; padding-block: var(--space-6) var(--space-8); }
.page-head h1 { color: var(--ink); font-size: var(--text-3xl); letter-spacing: -.01em; max-width: 30ch; }
.page-head__sub { color: var(--color-text-muted); margin-block-start: var(--space-2); max-width: 70ch; font-size: var(--text-md); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); list-style: none; margin: 0 0 var(--space-3); padding: 0; font-size: var(--text-xs); color: var(--color-text-subtle); }
.breadcrumb a { color: var(--gray-600); }
.breadcrumb a:hover { color: var(--brand-700); }
.breadcrumb li + li::before { content: '›'; margin-inline-end: var(--space-2); color: var(--gray-400); }
[dir="rtl"] .breadcrumb li + li::before { content: '‹'; }
.breadcrumb [aria-current] { color: var(--brand-700); font-weight: 600; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page-body { padding-block: var(--space-8) var(--section-y); }
.toolbar { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; justify-content: space-between; margin-block-end: var(--space-6); }
.toolbar .search { flex: 1 1 280px; max-width: 480px; display: flex; gap: var(--space-2); }
.toolbar .search .input-icon { flex: 1; }
.toolbar .search .input { border-radius: var(--radius-full); padding-inline-start: 2.6rem; }
.toolbar .search .btn { border-radius: var(--radius-full); }

/* -------------------------------------------------------------------------
   Home — intro + featured story
   ------------------------------------------------------------------------- */
.home-banner { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--brand-50), var(--paper)); }
.home-banner::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(var(--brand-100) 1.2px, transparent 1.2px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(ellipse at 20% 10%, #000 10%, transparent 65%); mask-image: radial-gradient(ellipse at 20% 10%, #000 10%, transparent 65%); pointer-events: none; }
.home-banner__inner { position: relative; display: grid; gap: var(--space-8); padding-block: var(--space-10) var(--space-16); align-items: center; }
@media (min-width: 960px) { .home-banner__inner.has-media { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--space-12); padding-block: var(--space-12) calc(var(--space-16) + var(--space-4)); } }
.home-banner__eyebrow { display: inline-flex; align-items: center; gap: var(--space-2); padding: 6px 14px; border-radius: var(--radius-full); background: var(--white); border: 1px solid var(--brand-100); color: var(--brand-700); font-weight: 600; font-size: var(--text-xs); box-shadow: var(--shadow-xs); }
.home-banner__eyebrow i { color: var(--accent-600); }
.home-banner__title { color: var(--ink); font-family: var(--font-ar); font-weight: 700; font-size: clamp(1.8rem, 1.1rem + 2.4vw, 2.85rem); margin-block-start: var(--space-4); line-height: 1.3; letter-spacing: -.01em; }
.home-banner__alt { color: var(--gray-500); font-family: var(--font-fr); font-weight: 500; font-size: var(--text-lg); margin-block-start: var(--space-2); }
.home-banner__text { color: var(--gray-600); margin-block-start: var(--space-5); max-width: 56ch; font-size: var(--text-md); line-height: var(--leading-loose); }
.home-banner__actions { margin-block-start: var(--space-8); display: flex; flex-wrap: wrap; gap: var(--space-3); }
.home-banner__actions .btn { border-radius: var(--radius-full); }
.home-banner__media { position: relative; border-radius: 20px; overflow: hidden; background: var(--white); box-shadow: 0 30px 60px -30px rgba(8, 63, 53, .45); border: 1px solid var(--gray-200); display: flex; flex-direction: column; }
.home-banner__media img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; }
.home-banner__caption { padding: var(--space-5) var(--space-6); color: var(--ink); display: flex; flex-direction: column; gap: var(--space-2); text-decoration: none !important; }
.home-banner__caption small { color: var(--brand-700); font-weight: 600; font-size: var(--text-xs); display: inline-flex; align-items: center; gap: 6px; }
.home-banner__caption small::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-500); }
.home-banner__caption strong { font-size: var(--text-lg); line-height: 1.5; font-weight: 700; }
.home-banner__caption:hover strong { color: var(--brand-700); }

.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); margin-block-start: calc(var(--space-10) * -1); position: relative; z-index: 2; }
.quick-link { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); color: var(--ink); font-weight: 600; font-size: var(--text-sm); text-decoration: none !important; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.quick-link i { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-50); color: var(--brand-700); flex-shrink: 0; }
.quick-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--brand-200); }
@media (max-width: 640px) {
    .quick-links { grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-block-start: calc(var(--space-8) * -1); }
    .quick-link { padding: var(--space-3); }
    .quick-link i { width: 34px; height: 34px; }
}

/* Headlines: one lead story + compact list */
.headlines { display: grid; gap: var(--space-6); }
@media (min-width: 900px) { .headlines { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
.lead-story { position: relative; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.lead-story__media { aspect-ratio: 16 / 9; background: var(--brand-50); overflow: hidden; display: grid; place-items: center; color: var(--brand-200); font-size: 2.5rem; }
/* Lead story without a picture: text-only lead, no empty image area */
.lead-story--text { justify-content: center; background: var(--pattern-star-brand), linear-gradient(160deg, var(--white) 40%, var(--brand-50)); border-top: 3px solid var(--brand-700); }
.lead-story--text .lead-story__body { padding: var(--space-8); gap: var(--space-4); }
.lead-story--text .lead-story__title { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem); }
.lead-story--text .article-card__excerpt { -webkit-line-clamp: 5; font-size: var(--text-base); }
.lead-story__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
.lead-story:hover .lead-story__media img { transform: scale(1.03); }
.lead-story__body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.lead-story__title { font-size: var(--text-xl); line-height: 1.45; }
.lead-story__title a { color: var(--ink); }
.lead-story__title a::after { content: ''; position: absolute; inset: 0; }
.lead-story__title a:hover { text-decoration: none; color: var(--brand-700); }
.headline-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.headline { position: relative; display: flex; gap: var(--space-4); align-items: center; padding: var(--space-3); background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.headline:hover { border-color: var(--brand-200); box-shadow: var(--shadow-sm); }
.headline__thumb { width: 96px; height: 72px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; background: var(--pattern-star-brand), linear-gradient(135deg, var(--brand-50), var(--brand-100)); display: grid; place-items: center; color: var(--brand-700); }
span.headline__thumb > i { opacity: .4; }
.headline__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.headline__title { font-weight: 600; line-height: 1.55; color: var(--ink); font-size: var(--text-base); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.headline__title a { color: inherit; }
.headline__title a::after { content: ''; position: absolute; inset: 0; }
.headline__title a:hover { text-decoration: none; color: var(--brand-700); }

/* Welcome (director) */
.welcome { display: grid; gap: var(--space-5); background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: var(--space-6); position: relative; overflow: hidden; }
.welcome::before { content: '\201D'; position: absolute; inset-inline-end: var(--space-5); top: -10px; font-size: 7rem; line-height: 1; color: var(--brand-50); font-family: Georgia, serif; pointer-events: none; }
@media (min-width: 720px) { .welcome { grid-template-columns: 120px minmax(0, 1fr); padding: var(--space-8); gap: var(--space-6); } }
.welcome__photo { position: relative; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--gray-100); border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--brand-100); }
@media (min-width: 720px) { .welcome__photo { width: 120px; height: 120px; } }
.welcome > div { position: relative; }
.welcome__quote { font-size: var(--text-md); line-height: var(--leading-loose); color: var(--gray-700); margin-block: var(--space-3) var(--space-5); }
.welcome__sign { display: flex; flex-direction: column; }
.welcome__sign strong { color: var(--ink); }
.welcome__sign span { font-size: var(--text-sm); color: var(--brand-700); font-weight: 600; }

/* Photo strip */
.photo-strip { display: grid; gap: var(--space-3); grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Fewer than five photos: equal columns instead of the mosaic, so no holes */
.photo-strip[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.photo-strip[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.photo-strip[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.photo-strip[data-count="1"] button { aspect-ratio: 21 / 9; }
.photo-strip[data-count="2"] button, .photo-strip[data-count="3"] button, .photo-strip[data-count="4"] button { aspect-ratio: 4 / 3; }
.photo-strip[data-count="1"] button:first-child, .photo-strip[data-count="2"] button:first-child,
.photo-strip[data-count="3"] button:first-child, .photo-strip[data-count="4"] button:first-child { grid-column: auto; grid-row: auto; }
.photo-strip button { padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: var(--gray-100); aspect-ratio: 1; }
.photo-strip button:first-child { grid-column: span 2; grid-row: span 2; }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.photo-strip button:hover img { transform: scale(1.05); }
@media (max-width: 760px) {
    .photo-strip, .photo-strip[data-count="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
    .photo-strip[data-count="3"] button:first-child { grid-column: span 2; aspect-ratio: 16 / 9; }
}

.pillars { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.pillar { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: var(--space-6); }
.pillar i { width: var(--icon-well); height: var(--icon-well); display: grid; place-items: center; border-radius: var(--icon-well-radius); background: var(--accent-100); color: var(--accent-700); font-size: 1.05rem; margin-block-end: var(--space-4); }
.pillar h3 { font-size: var(--text-md); margin-block-end: var(--space-2); }
.pillar p { color: var(--color-text-muted); font-size: var(--text-sm); }

.contact-band { display: grid; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
@media (min-width: 900px) { .contact-band { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.contact-band__info { padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-5); }
.contact-band__map { min-height: 300px; background: var(--gray-100); }
.contact-band__map iframe { width: 100%; height: 100%; min-height: 300px; border: 0; }
.contact-line { display: flex; gap: var(--space-3); align-items: flex-start; }
.contact-line i { width: var(--icon-well); height: var(--icon-well); flex-shrink: 0; display: grid; place-items: center; border-radius: var(--icon-well-radius); background: var(--brand-50); color: var(--brand-700); }
.contact-line small { display: block; font-size: var(--text-xs); color: var(--color-text-subtle); font-weight: 600; }
.contact-line span, .contact-line a { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }

.agenda .list__item { padding: var(--space-3) var(--space-4); gap: var(--space-3); }

/* Modernised shared blocks on public pages */
.site .date-block { border-radius: 12px; border-color: var(--brand-100); background: var(--brand-50); }
.site .date-block__day { color: var(--brand-800); }
.site .date-block__month { background: transparent; color: var(--brand-700); padding-top: 0; }
.site .article-card { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.site .article-card:hover { transform: translateY(-2px); }
.site .article-card__media img { transition: transform 500ms var(--ease); }
.site .article-card:hover .article-card__media img { transform: scale(1.04); }
.site .figure__value { color: var(--brand-800); }
.site .btn--primary, .site .btn--accent { border-radius: var(--radius-full); }

/* Article (post / event detail) */
.article { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.article__cover { aspect-ratio: 16 / 8; background: var(--gray-100); }
.article__cover img { width: 100%; height: 100%; object-fit: cover; }
.article__body { padding: var(--space-6); }
@media (min-width: 768px) { .article__body { padding: var(--space-10) var(--space-12); } }
.article__meta { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); align-items: center; font-size: var(--text-sm); color: var(--color-text-muted); margin-block-end: var(--space-5); }
.article__meta span { display: inline-flex; align-items: center; gap: var(--space-2); }
.article__meta i { color: var(--brand-600); }
.article__lead { font-size: var(--text-lg); color: var(--gray-700); line-height: var(--leading-base); margin-block-end: var(--space-6); }
.article__files { margin-block-start: var(--space-8); }
.article__share { margin-block-start: var(--space-8); padding-block-start: var(--space-6); border-top: 1px solid var(--gray-200); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.article__share .btn { border-radius: var(--radius-full); }
.article__share-label { font-weight: 600; font-size: var(--text-sm); color: var(--gray-600); margin-inline-end: var(--space-2); }

/* Director page */
.director { display: grid; gap: var(--space-8); }
@media (min-width: 900px) { .director { grid-template-columns: 280px minmax(0, 1fr); gap: var(--space-10); align-items: start; } }
.director__card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
@media (min-width: 900px) { .director__card { position: sticky; top: 90px; } }
.director__photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--gray-100); }
.director__id { padding: var(--space-4) var(--space-5); }
.director__id strong { display: block; font-size: var(--text-md); }
.director__id span { font-size: var(--text-sm); color: var(--brand-700); font-weight: 600; }
.director__text { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: var(--space-6); }
@media (min-width: 768px) { .director__text { padding: var(--space-10); } }

/* Gallery */
.gallery { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.gallery__item { position: relative; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; text-align: start; padding: 0; display: flex; flex-direction: column; transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.gallery__item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.gallery__media { aspect-ratio: 4 / 3; background: var(--gray-100); position: relative; overflow: hidden; }
.gallery__media img { width: 100%; height: 100%; object-fit: cover; }
.gallery__play { position: absolute; inset: 0; display: grid; place-items: center; }
.gallery__play i { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); color: var(--brand-800); font-size: 1.05rem; padding-inline-start: 3px; box-shadow: var(--shadow-md); }
.gallery__caption { padding: var(--space-3) var(--space-4); display: flex; flex-direction: column; gap: 2px; }
.gallery__caption strong { font-size: var(--text-sm); color: var(--ink); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gallery__caption small { font-size: var(--text-xs); color: var(--color-text-subtle); }

/* Media viewer */
.viewer { position: fixed; inset: 0; z-index: 250; background: rgba(4, 22, 18, .95); display: flex; flex-direction: column; }
.viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) var(--space-4); color: rgba(255,255,255,.85); }
.viewer__title { font-weight: 600; font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer__stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 var(--space-4) var(--space-6); min-height: 0; position: relative; }
.viewer__stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius); }
.viewer__frame { width: min(100%, 1000px); aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.viewer__frame iframe, .viewer__frame video { width: 100%; height: 100%; border: 0; }
.viewer__btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #fff; display: grid; place-items: center; }
.viewer__btn:hover { background: rgba(255,255,255,.16); }
.viewer__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.viewer__nav--prev { inset-inline-start: var(--space-4); }
.viewer__nav--next { inset-inline-end: var(--space-4); }
.viewer__meta { color: rgba(255,255,255,.6); font-size: var(--text-xs); text-align: center; padding-block-end: var(--space-4); }

/* Contact / about / location */
.contact-layout { display: grid; gap: var(--space-6); }
@media (min-width: 960px) { .contact-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--space-8); align-items: start; } }
.about-intro { font-size: var(--text-lg); line-height: var(--leading-loose); color: var(--gray-700); }
.map-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; display: grid; }
@media (min-width: 960px) { .map-card { grid-template-columns: 360px minmax(0, 1fr); } }
.map-card__info { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-5); border-bottom: 1px solid var(--gray-200); }
@media (min-width: 960px) { .map-card__info { border-bottom: 0; border-inline-end: 1px solid var(--gray-200); } }
.map-card__map { min-height: 400px; background: var(--gray-100); }
.map-card__map iframe { width: 100%; height: 100%; min-height: 400px; border: 0; }
.coords { font-family: var(--font-mono); font-size: var(--text-sm); background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: var(--space-3) var(--space-4); display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-4); }
.coords dt { color: var(--color-text-subtle); } .coords dd { margin: 0; text-align: end; }

/* -------------------------------------------------------------------------
   Footer (deep blue)
   ------------------------------------------------------------------------- */
.site-footer { background: var(--brand-950); color: rgba(255,255,255,.7); margin-block-start: auto; font-size: var(--text-sm); }
.site-footer__grid { display: grid; gap: var(--space-8); padding-block: var(--section-y) var(--space-10); grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
@media (min-width: 1024px) { .site-footer__grid { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: var(--space-10); } }
.site-footer h2 { color: #fff; font-size: var(--text-sm); font-family: var(--font-body); font-weight: 700; margin-block-end: var(--space-4); padding-block-end: var(--space-3); border-bottom: 1px solid rgba(255,255,255,.08); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.site-footer a { color: rgba(255,255,255,.8); }
.site-footer a:hover { color: #fff; }
.footer-identity { display: flex; gap: var(--space-3); align-items: flex-start; }
.footer-identity img { width: 48px; height: 48px; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; flex-shrink: 0; }
/* Platform logo is already a green square: no white frame around it */
.footer-identity img.etab-logo { background: none; padding: 0; transform: none; border-radius: 10px; }
.footer-identity strong { color: #fff; display: block; line-height: 1.45; }
.footer-identity span { font-size: var(--text-xs); }
.site-footer .social a { width: 38px; height: 38px; background: rgba(255,255,255,.06); }
.site-footer .social a:hover { background: rgba(255,255,255,.14); color: #fff; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.08); }
.site-footer__bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding-block: var(--space-5); font-size: var(--text-xs); }
.site-footer__bottom .etab-mark { color: #fff; font-size: var(--text-sm); }

/* Loader, error, to-top */
.app-loader { position: fixed; inset: 0; z-index: 400; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4); transition: opacity 300ms var(--ease), visibility 300ms; }
.app-loader.is-done { opacity: 0; visibility: hidden; }
.app-loader img { width: 64px; height: 64px; object-fit: contain; }
.app-loader__name { font-weight: 600; color: var(--ink); text-align: center; padding-inline: var(--space-6); }
.app-error { min-height: 100vh; display: grid; place-items: center; padding: var(--space-6); text-align: center; background: var(--paper); }
.app-error__box { max-width: 460px; }
.app-error__box .etab-mark { color: var(--brand-900); margin-block-end: var(--space-8); }
.app-error__box h1 { font-size: var(--text-2xl); margin-block-end: var(--space-3); }
.app-error__box p { color: var(--color-text-muted); margin-block-end: var(--space-6); }
.to-top { position: fixed; inset-block-end: var(--space-5); inset-inline-end: var(--space-5); z-index: 90; width: 46px; height: 46px; border-radius: 50%; background: var(--brand-800); color: #fff; border: 0; display: none; place-items: center; box-shadow: var(--shadow-md); }
.to-top.is-visible { display: grid; }

/* -------------------------------------------------------------------------
   Platform (etablissement.ma index)
   ------------------------------------------------------------------------- */
.platform-head { background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--gray-200); }
/* Blur lives on a pseudo-element: backdrop-filter on .platform-head itself would make it the containing block of position:fixed children (e.g. the mobile menu), clipping them to its height. */
.platform-head::before { content: ''; position: absolute; inset: 0; z-index: -1; backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); pointer-events: none; }
.platform-head__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 68px; }
.platform-head .etab-mark { color: var(--brand-900); font-size: var(--text-lg); text-decoration: none !important; }
.platform-head nav { display: flex; align-items: center; gap: var(--space-1); }
.platform-head nav a.navlink { color: var(--gray-700); font-weight: 600; font-size: var(--text-sm); padding: var(--space-2) var(--space-3); border-radius: var(--radius-full); }
.platform-head nav a.navlink:hover { color: var(--brand-800); text-decoration: none; background: var(--gray-100); }
.platform-head .lang-switch--dark { border-color: var(--gray-200); }
.platform-head .lang-switch--dark button { color: var(--gray-600); }
.platform-head .lang-switch--dark button[aria-pressed="true"] { background: var(--brand-800); color: #fff; }
.platform-head .btn--on-dark { --btn-bg: var(--brand-800); --btn-fg: #fff; --btn-bd: var(--brand-800); border-radius: var(--radius-full); }
@media (max-width: 860px) { .platform-head nav a.navlink { display: none; } }

.platform-hero { position: relative; overflow: hidden; background: radial-gradient(1000px 500px at 85% -10%, rgba(21, 144, 119, .45), transparent 60%), var(--brand-950); color: #fff; }
[dir="rtl"] .platform-hero { background: radial-gradient(1000px 500px at 15% -10%, rgba(21, 144, 119, .45), transparent 60%), var(--brand-950); }
.platform-hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1.2px, transparent 1.2px); background-size: 24px 24px; pointer-events: none; }
.platform-hero__grid { position: relative; display: grid; gap: var(--space-10); align-items: center; padding-block: var(--space-16) calc(var(--space-16) + var(--space-10)); }
@media (min-width: 1000px) { .platform-hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.platform-hero__inner { max-width: 640px; }
.platform-hero .eyebrow { display: inline-flex; padding: 6px 14px; border-radius: var(--radius-full); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: var(--accent-300) !important; }
.platform-hero h1 { color: #fff; font-size: clamp(1.8rem, 1.1rem + 2vw, 2.6rem); font-family: var(--font-ar); font-weight: 700; line-height: 1.35; letter-spacing: -.015em; margin-block: var(--space-5) var(--space-5); }
:root[lang="fr"] .platform-hero h1 { font-family: var(--font-fr); }
.platform-hero p { color: rgba(255,255,255,.78); font-size: var(--text-lg); max-width: 60ch; line-height: var(--leading-loose); }
.platform-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-block-start: var(--space-8); }
.platform-hero__actions .btn { border-radius: var(--radius-full); }
.platform-hero .preview-frame { box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); border-color: rgba(255,255,255,.15); transform: perspective(1400px) rotateY(-6deg); }
[dir="rtl"] .platform-hero .preview-frame { transform: perspective(1400px) rotateY(6deg); }
@media (max-width: 999px) { .platform-hero .preview-frame { display: none; } }

.principles { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-block-start: calc(var(--space-16) * -1); position: relative; }
.principle { padding: var(--space-6); background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.principle i { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-50); color: var(--brand-700); font-size: 1.1rem; margin-block-end: var(--space-4); }
.principle h3 { font-size: var(--text-md); margin-block-end: var(--space-2); }
.principle p { color: var(--color-text-muted); font-size: var(--text-sm); line-height: var(--leading-base); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); counter-reset: step; }
.step { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: var(--space-6); counter-increment: step; position: relative; }
.step::before { content: counter(step); font-weight: 700; color: #fff; font-size: var(--text-md); width: 40px; height: 40px; border-radius: 50%; background: var(--brand-800); display: grid; place-items: center; margin-block-end: var(--space-4); box-shadow: 0 0 0 6px var(--brand-50); }
.step h3 { font-size: var(--text-md); margin-block-end: var(--space-2); }
.step p { color: var(--color-text-muted); font-size: var(--text-sm); }

.preview-frame { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); color: var(--ink); }
.preview-frame__bar { display: flex; gap: 6px; padding: 10px 14px; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); align-items: center; direction: ltr; }
.preview-frame__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--gray-300); display: block; }
.preview-frame__bar span { margin-inline-start: var(--space-3); font-size: var(--text-xs); color: var(--gray-500); font-family: var(--font-fr); }

.access-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.access-card__body { padding: var(--space-6); }
@media (min-width: 768px) { .access-card__body { padding: var(--space-8); } }

/* -------------------------------------------------------------------------
   Mobile refinements
   ------------------------------------------------------------------------- */
@media (max-width: 640px) {
    .home-banner__inner { padding-block: var(--space-8) var(--space-12); gap: var(--space-6); }
    .home-banner__actions .btn { flex: 1 1 auto; }
    .page-head__inner { padding-block: var(--space-6) var(--space-8); }
    .page-head::after { display: none; }
    .page-body { padding-block: var(--space-6) var(--space-12); }
    .toolbar .search { max-width: none; }
    .headline__thumb { width: 80px; height: 64px; }
    .lead-story__body { padding: var(--space-5); }
    .contact-band__info { padding: var(--space-5); }
}

/* -------------------------------------------------------------------------
   Header search
   ------------------------------------------------------------------------- */
.search-toggle { border-radius: 50%; color: var(--gray-700); --btn-fg: var(--gray-700); }
.search-toggle:hover { --btn-bg: var(--brand-50); --btn-fg: var(--brand-800); }

/* -------------------------------------------------------------------------
   Home — news slider (image + text panel)
   ------------------------------------------------------------------------- */
.home-hero { padding-block: var(--space-5) 0; background: linear-gradient(180deg, var(--brand-50), var(--paper) 70%); }
.slider { position: relative; border-radius: var(--radius-xl); overflow: hidden; background: var(--brand-900); box-shadow: 0 30px 60px -32px rgba(8, 63, 53, .55); }
.slide { display: none; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); min-height: 440px; }
.slide.is-active { display: grid; animation: etab-fade 400ms var(--ease); }
.slide__media { position: relative; background: var(--brand-800); overflow: hidden; }
.slide__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide__panel { position: relative; color: #fff; padding: var(--space-10) var(--space-10) calc(var(--space-10) + 48px); display: flex; flex-direction: column; justify-content: center; gap: var(--space-4); background: linear-gradient(160deg, var(--brand-900), var(--brand-950)); }
.slide__panel::before { content: ''; position: absolute; inset: 0; background-image: var(--pattern-star); opacity: .06; pointer-events: none; }
.slide__panel > * { position: relative; }
.slide__meta { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; font-size: var(--text-xs); color: rgba(255,255,255,.7); }
.slide__meta .badge { background: var(--accent-500); color: var(--brand-950); }
.slide__title { color: #fff; font-size: clamp(1.3rem, 1rem + 1.1vw, 1.85rem); line-height: 1.5; letter-spacing: -.005em; }
.slide__title a { color: inherit; }
.slide__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.slide__title a:hover { text-decoration: none; }
.slide:hover .slide__title { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.slide__text { color: rgba(255,255,255,.8); font-size: var(--text-base); line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slide__more { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 600; font-size: var(--text-sm); color: var(--accent-300); }
.slider__controls { position: absolute; inset-block-end: var(--space-6); inset-inline-end: var(--space-10); z-index: 2; display: flex; align-items: center; gap: var(--space-3); }
.slider__btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; }
.slider__btn:hover { background: rgba(255,255,255,.2); }
.slider__dots { display: flex; gap: 6px; }
/* 24px tall hit area around an 8px visible pill */
.slider__dots { gap: 2px; }
.slider__dot { width: 20px; height: 24px; padding: 0; border: 0; background: none; display: grid; place-items: center; transition: width var(--dur) var(--ease); }
.slider__dot::before { content: ''; width: 8px; height: 8px; border-radius: var(--radius-full); background: rgba(255,255,255,.4); transition: width var(--dur) var(--ease), background var(--dur) var(--ease); }
.slider__dot[aria-current="true"] { width: 34px; }
.slider__dot[aria-current="true"]::before { width: 26px; background: var(--accent-500); }
@media (max-width: 860px) {
    .slide { grid-template-columns: 1fr; min-height: 0; }
    .slide__media { aspect-ratio: 16 / 9; }
    .slide__panel { padding: var(--space-6) var(--space-5) calc(var(--space-6) + 48px); }
    .slider__controls { inset-inline: var(--space-5); justify-content: space-between; }
}

/* -------------------------------------------------------------------------
   Home — section tiles with photos
   ------------------------------------------------------------------------- */
.home-tiles { padding-block: var(--space-6) var(--space-2); }
.tiles { display: grid; gap: var(--space-4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 11; background: var(--brand-50); text-decoration: none !important; border: 1px solid var(--gray-200); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.tile:hover { transform: var(--lift); box-shadow: var(--shadow-md); }
.tile__media { position: absolute; inset: 0; display: grid; place-items: center; padding-block-end: 44px; color: var(--brand-700); font-size: 2.2rem; background: var(--pattern-star-brand), linear-gradient(135deg, var(--brand-50), var(--brand-100)); }
.tile__media > i { opacity: .45; }
.tile__media:has(img) { padding: 0; }
.tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
.tile:hover .tile__media img { transform: scale(1.06); }
.tile__label { position: absolute; inset-inline: 0; inset-block-end: 0; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: color-mix(in srgb, var(--brand-900) 92%, transparent); color: #fff; font-weight: 600; font-size: var(--text-sm); }
.tile__label > i { color: var(--accent-300); }
.tile__label span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__label small { min-width: 24px; height: 22px; padding: 0 7px; border-radius: var(--radius-full); background: rgba(255,255,255,.16); display: inline-grid; place-items: center; font-size: 11px; }
.tile:hover .tile__label { background: var(--brand-800); }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); } .tile { aspect-ratio: 3 / 2; } }

/* Photo album captions */
.photo-strip button { position: relative; }
.photo-strip__cap { position: absolute; inset-inline: 0; inset-block-end: 0; padding: var(--space-6) var(--space-3) var(--space-2); background: linear-gradient(to top, rgba(4, 22, 18, .8), transparent); color: #fff; font-size: var(--text-xs); font-weight: 600; text-align: start; opacity: 0; transition: opacity var(--dur) var(--ease); }
.photo-strip button:first-child .photo-strip__cap, .photo-strip button:hover .photo-strip__cap, .photo-strip button:focus-visible .photo-strip__cap { opacity: 1; }
.photo-strip button:first-child .photo-strip__cap { font-size: var(--text-sm); padding: var(--space-10) var(--space-4) var(--space-3); }

/* -------------------------------------------------------------------------
   Platform — hero facts & FAQ
   ------------------------------------------------------------------------- */
.hero-facts { list-style: none; margin: var(--space-8) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); color: rgba(255,255,255,.82); font-size: var(--text-sm); }
.hero-facts li { display: inline-flex; align-items: center; gap: var(--space-2); }
.hero-facts i { color: var(--accent-300); }

.faq { display: flex; flex-direction: column; gap: var(--space-3); }
.faq__item { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.faq__item[open] { border-color: var(--brand-200); box-shadow: var(--shadow-sm); }
.faq__item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-5); font-weight: 600; color: var(--ink); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: '+'; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-800); font-weight: 700; font-size: 1.1rem; transition: transform var(--dur) var(--ease); }
.faq__item[open] summary::after { content: '−'; }
.faq__item summary:hover { color: var(--brand-800); }
.faq__item p { padding: 0 var(--space-5) var(--space-5); color: var(--gray-600); line-height: var(--leading-loose); }

/* Platform header on small phones: icon-only admin button, compact language switch */
@media (max-width: 560px) {
    .platform-head__inner { gap: var(--space-2); }
    .platform-head .etab-mark { font-size: var(--text-base); }
    .platform-head nav { gap: var(--space-2); }
    .platform-head nav .lang-switch { margin-inline: 0 !important; }
    .platform-head .lang-switch button { padding: 0 var(--space-2); }
    .platform-head .btn--on-dark span { display: none; }
    .platform-head .btn--on-dark { width: 36px; padding: 0; }
}

/* -------------------------------------------------------------------------
   Card language — one surface for news, notices, agenda, documents, media
   Same border, radius and hover on every interactive card.
   ------------------------------------------------------------------------- */
.site .list, .lead-story, .headline, .gallery__item, .pillar, .welcome, .contact-band,
.article, .director__card, .director__text, .map-card, .site .card, .site .figure-row {
    border-color: var(--color-border); border-radius: var(--radius-lg);
}
.site .article-card, .lead-story, .headline, .gallery__item {
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.site .article-card:hover, .lead-story:hover, .headline:hover, .gallery__item:hover {
    transform: var(--lift); box-shadow: var(--shadow-md); border-color: var(--brand-200);
}
.site .list { box-shadow: var(--shadow-xs); overflow: hidden; }
.site .list__item { transition: background var(--dur) var(--ease); }
.site .list__item:hover { background: var(--brand-50); }
.site .list__item:hover .list__end { color: var(--brand-700); }
.site .list__title { font-size: var(--text-base); }
.site .card__body { gap: var(--space-3); }
.site .article-card__title { font-size: var(--text-lg); line-height: 1.5; }
.site .article-card__excerpt { font-size: var(--text-sm); line-height: 1.75; }
.site .article-card__meta, .site .list__meta { color: var(--color-text-subtle); }
.welcome { box-shadow: var(--shadow-xs); }
.site .figure__value { font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); }

/* Gallery placeholder (item without a usable image) */
.gallery__media:not(:has(img)) { background: var(--pattern-star-brand), linear-gradient(135deg, var(--brand-50), var(--brand-100)); }

/* Touch targets on phones and tablets */
@media (max-width: 1023px) {
    .social a { width: 40px; height: 40px; }
    .section-head__link { min-height: 40px; }
}
@media (max-width: 640px) {
    .section-head { margin-block-end: var(--space-4); }
    .lead-story--text .lead-story__body { padding: var(--space-6) var(--space-5); }
    .slide__panel { padding: var(--space-6) var(--space-5) calc(var(--space-6) + 48px); }
    .slide__text { -webkit-line-clamp: 2; }
    .site .article-card__title { font-size: var(--text-md); }
    .headline__title { font-size: var(--text-sm); }
}

/* Tiles on phones: full label (no ellipsis); the section icon is already shown in the tile */
@media (max-width: 640px) {
    .tile__label { padding: var(--space-2) var(--space-3); gap: var(--space-2); font-size: var(--text-xs); line-height: 1.4; }
    .tile__label > i { display: none; }
    .tile__label span { white-space: normal; }
    .tile__media { padding-block-end: 36px; font-size: 1.9rem; }
}

/* Side column (agenda, documents): one step smaller titles so the main column leads */
@media (min-width: 1024px) { .split > aside .section-head__title { font-size: var(--text-lg); } }

/* -------------------------------------------------------------------------
   Platform landing — real product images and conversion path
   ------------------------------------------------------------------------- */
.btn--cta { --btn-bg: var(--accent-500); --btn-fg: var(--brand-950); --btn-bd: var(--accent-500); border-radius: var(--radius-full); }
.btn--cta:hover { --btn-bg: var(--accent-300); --btn-bd: var(--accent-300); }
.platform-head .btn--demo { --btn-bg: transparent; --btn-fg: var(--accent-700); --btn-bd: var(--accent-500); border-radius: var(--radius-full); }
.platform-head .btn--demo:hover { --btn-bg: var(--accent-100); }
.platform-hero h1 .hl { color: var(--accent-300); }

/* Hero image: the real admin dashboard in a browser frame */
.hero-shot { margin: 0; min-width: 0; }
.browser-frame { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 40px 80px -30px rgba(0,0,0,.65); }
.browser-frame__bar { display: flex; align-items: center; gap: 6px; padding: 9px 14px; background: var(--gray-100); border-bottom: 1px solid var(--gray-200); direction: ltr; }
.browser-frame__bar i { width: 10px; height: 10px; border-radius: 50%; background: #E5534B; flex-shrink: 0; }
.browser-frame__bar i:nth-child(2) { background: #E3A008; }
.browser-frame__bar i:nth-child(3) { background: #3FB950; }
.browser-frame__bar span { margin-inline-start: 10px; min-width: 0; max-width: 320px; flex: 1; padding: 3px 12px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-full); font-family: var(--font-fr); font-size: var(--text-xs); color: var(--gray-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser-frame img { display: block; width: 100%; height: auto; }
.hero-shot figcaption { margin-block-start: var(--space-3); text-align: center; font-size: var(--text-sm); color: rgba(255,255,255,.72); }
@media (max-width: 999px) { .hero-shot { max-width: 680px; } }

/* Steps: a real screenshot on each step */
.step__shot { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; border-radius: var(--radius); border: 1px solid var(--color-border); background: var(--gray-50); margin-block-end: var(--space-4); }

/* Live examples */
.examples { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.example-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; color: inherit; text-decoration: none !important; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.example-card:hover { transform: var(--lift); box-shadow: var(--shadow-md); border-color: var(--brand-200); }
.example-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--gray-100); border-bottom: 1px solid var(--color-border); }
.example-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 500ms var(--ease); }
.example-card:hover .example-card__media img { transform: scale(1.03); }
.example-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: var(--space-5) var(--space-6) var(--space-6); }
.example-card__body strong { font-size: var(--text-lg); color: var(--ink); }
.example-card__url { font-family: var(--font-fr); font-size: var(--text-sm); color: var(--color-text-subtle); }
.example-card .link-arrow { color: var(--brand-700); margin-block-start: var(--space-1); }
.examples__cta { display: flex; justify-content: center; margin-block-start: var(--space-8); }

/* Registration success screen */
.reg-done:focus { outline: none; }
.reg-done__head { display: flex; gap: var(--space-4); align-items: flex-start; margin-block-end: var(--space-6); }
.reg-done__head > i { font-size: 2rem; color: var(--success); margin-block-start: 2px; }
.reg-done__head h3 { font-size: var(--text-xl); }
.reg-done__head p { color: var(--color-text-muted); margin-block-start: var(--space-1); }
.reg-done__link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); margin-block-end: var(--space-3); background: var(--gray-50); border: 1px solid var(--color-border); border-radius: var(--radius); }
.reg-done__label { font-weight: 700; font-size: var(--text-sm); color: var(--gray-700); white-space: nowrap; }
.reg-done__label i { color: var(--brand-700); }
.reg-done__link a { font-weight: 600; overflow-wrap: anywhere; }
.reg-done h4 { font-size: var(--text-md); margin: var(--space-6) 0 var(--space-3); }
.reg-done__steps { list-style: none; margin: 0 0 var(--space-6); padding: 0; display: grid; gap: var(--space-2); }
.reg-done__steps a { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius); color: inherit; text-decoration: none !important; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.reg-done__steps a:hover { background: var(--brand-50); border-color: var(--brand-200); }
.reg-done__steps strong { display: block; color: var(--ink); }
.reg-done__steps small { display: block; font-size: var(--text-xs); color: var(--color-text-subtle); }
.reg-done__num { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--brand-800); color: #fff; font-weight: 700; }
@media (max-width: 560px) {
    .reg-done__link { grid-template-columns: 1fr; }
    .reg-done__link .btn { justify-self: start; }
    .platform-head .btn--demo span { display: none; }
    .platform-head .btn--demo { width: 36px; padding: 0; }
}
.platform-hero h1 .hl { white-space: nowrap; }
/* Small phones: logo, language switch and two icon buttons must fit in 360–420px */
@media (max-width: 420px) {
    .platform-head__inner { gap: 6px; }
    .platform-head .etab-mark { font-size: .92rem; gap: 6px; }
    .platform-head .etab-mark__glyph { width: 26px; height: 26px; }
    .platform-head nav { gap: 6px; }
    .platform-head .lang-switch button { padding: 0 7px; font-size: 11px; }
}
.platform-hero__inner { min-width: 0; }
@media (max-width: 560px) {
    .platform-hero__actions .btn { flex: 1 1 100%; white-space: normal; height: auto; min-height: 50px; padding-block: 12px; line-height: 1.4; text-align: center; }
}
@media (max-width: 560px) {
    .examples__cta .btn { white-space: normal; height: auto; min-height: 50px; padding-block: 12px; line-height: 1.4; text-align: center; }
}
/* Very small phones: the demo stays in the hero and in "live examples" */
@media (max-width: 380px) { .platform-head .btn--demo { display: none; } }
/* In-page anchors (#steps, #examples, #access…) land below the sticky platform header */
.platform-head ~ main [id] { scroll-margin-top: 84px; }
.platform-head nav a.navlink { white-space: nowrap; }
.platform-head .lang-switch { flex-shrink: 0; }
/* Medium desktops: keep the header on one line (these sections stay linked from the footer) */
@media (max-width: 1300px) { .platform-head nav a.navlink--wide { display: none; } }
@media (max-width: 1440px) { :root[lang="fr"] .platform-head nav a.navlink--wide { display: none; } }
@media (max-width: 1180px) { .platform-head nav a.navlink--mid { display: none; } }
@media (max-width: 960px) { :root[lang="fr"] .platform-head nav a.navlink { display: none; } }
/* Tablets: header buttons become icons (labels are in aria via title below) */
@media (max-width: 760px) {
    .platform-head .btn--on-dark span, .platform-head .btn--demo span { display: none; }
    .platform-head .btn--on-dark, .platform-head .btn--demo { width: 36px; padding: 0; }
}
