/*
 * noorwan.com, feuille unique. Direction « maquette A épurée » (M-56) : blanc, grande typographie,
 * beaucoup d'air, un message par écran. Mobile first (390 px), puis élargissements par min-width.
 * Propriétés logiques partout (inline = sens de lecture) : le RTL n'a besoin d'aucune feuille à part.
 * Police système (aucune police externe) ; IBM Plex Sans Arabic, hébergée ici, pour l'arabe.
 */

/* ---------- Police arabe hébergée sur le site (IBM Plex Sans Arabic, licence OFL : fonts/OFL.txt) ---------- */

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/IBMPlexSansArabic-Regular.woff2") format("woff2");
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/IBMPlexSansArabic-Medium.woff2") format("woff2");
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/IBMPlexSansArabic-SemiBold.woff2") format("woff2");
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/IBMPlexSansArabic-Bold.woff2") format("woff2");
}

/* ---------- Variables (maquette A) ---------- */

:root {
    --ink: #1D1D1F;
    /* Fond de page blanc cassé (v6, « trop blanc ») ; --paper reste blanc pour les panneaux posés dessus
       (formulaire, menu des langues, pastilles) et le texte sur fond sombre. Contraste AA vérifié :
       --muted 5,2:1 sur --page et 4,9:1 sur --mist, --link 5,1:1 et 4,8:1. */
    --page: #F6F5F1;
    --paper: #FFFFFF;
    --mist: #EEEDE8;
    --mist-2: #EDEDF0;
    --text: #515154;
    --muted: #66666B;
    --line: #E5E5EA;
    --line-2: #D2D2D7;
    --blue: #0071E3;
    --blue-hover: #0062C4;
    --link: #0066CC;
    --link-dark: #2997FF;
    --gold: #F5D58A;
    --night: #000000;
    --night-2: #111113;
    --night-line: #2A2A2C;
    --night-text: #F5F5F7;
    --night-muted: #A1A1A6;
    /* Carte sombre des expertises (planche « Nos expertises ») ; noir franc en thème sombre. */
    --motto-card: #1D1D1F;
    /* Arbre des applications (accueil) : écorce et houppier du dessin. */
    --tree-bark: #A89C86;
    --tree-canopy: #F3F2ED;

    /* Code couleur des univers : trait, texte, fond teinté. */
    --cons: #A8915F;
    --cons-text: #6F5B2E;
    --cons-tint: #F3EEE3;
    --sol: #7C93B2;
    --sol-text: #3D5A80;
    --sol-light: #9DB2CF;
    --sol-tint: #E9EEF5;
    --ed: #B07A84;
    --ed-text: #7D2E3B;
    --ed-tint: #F5E9EB;

    --error: #B3261E;
    --error-tint: #FCEEEE;
    --success: #1D6B3A;
    --success-tint: #EAF5EE;

    /* Rôles ajoutés pour le thème sombre (v9) : texte blanc sur le bleu, texte et survol des boutons noirs,
       en-tête translucide, filets, bandeau de consentement, gris du menu, point du logotype. */
    --white: #FFFFFF;
    --on-ink: #FFFFFF;
    --ink-hover: #000000;
    --nav-text: #333336;
    --header-bg: rgba(246, 245, 241, 0.82);
    --header-line: rgba(0, 0, 0, 0.08);
    --hairline: rgba(0, 0, 0, 0.05);
    --consent-bg: rgba(255, 255, 255, 0.96);
    --logo-dot: var(--blue);
    /* Charte commune (M-120) : bord des champs et des boutons en contour (3:1), voile sous un volet, anneau de focus. */
    --control-line: #86868B;
    --scrim: rgba(29, 29, 31, 0.36);
    --focus: #0071E3;

    --radius-btn: 3px;
    --radius-card: 28px;
    --gutter: 20px;
    --header-h: 48px;
    --panel-w: 400px;

    --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --ls-body: -0.01em;
    --ls-h: -0.035em;
    --ls-num: -0.05em;
    --lh-h: 1.05;
}

/*
 * Thème sombre (v9, charte graphique page 4). Deux blocs identiques (tests/run.sh le vérifie) :
 * choix manuel (data-theme="dark", posé par theme-init.js) et appareil sombre sans choix contraire.
 * Bleu action, or, sections noires (--night*) et traits des univers inchangés.
 * Contrastes AA vérifiés (WCAG, 4,5:1 au moins) :
 *   --text #A1A1A6 : 8,2 sur --page, 7,3 sur --mist, 6,6 sur --paper ;
 *   --muted #8E8E93 : 6,4 sur --page, 5,8 sur --mist, 5,2 sur --paper ;
 *   --link #2997FF : 7,0 sur --page, 6,3 sur --mist, 5,6 sur --paper ;
 *   --ink #F5F5F7 : 19,3 sur --page, 15,6 sur --paper ; boutons noirs inversés : #000 sur #F5F5F7, 19,3 ;
 *   univers : Consulting #D9C49A 9,0 sur son fond, Solutions #A9BCD6 8,3, Édition #D9A5AE 7,7 ;
 *   erreur #FF6B60 6,1 sur son fond et sur --paper ; réussite #4CD47A 8,4 sur son fond, 8,9 sur --paper ;
 *   texte blanc sur le bleu #0071E3 : 4,7 (inchangé) ; menu #D1D1D6 : 13,8 sur --page.
 */
:root {
    color-scheme: light;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --page: #000000;
    --mist: #111113;
    --mist-2: #161618;
    --paper: #1C1C1E;
    --line: #2A2A2C;
    --line-2: #3A3A3C;
    --ink: #F5F5F7;
    --text: #A1A1A6;
    --muted: #8E8E93;
    --link: #2997FF;
    --cons-tint: #2A2418;
    --cons-text: #D9C49A;
    --sol-tint: #1A2230;
    --sol-text: #A9BCD6;
    --ed-tint: #2C1C20;
    --ed-text: #D9A5AE;
    --error: #FF6B60;
    --error-tint: #2C1517;
    --success: #4CD47A;
    --success-tint: #10261A;
    --on-ink: #000000;
    --ink-hover: #FFFFFF;
    --nav-text: #D1D1D6;
    --header-bg: rgba(0, 0, 0, 0.78);
    --header-line: rgba(255, 255, 255, 0.12);
    --hairline: rgba(255, 255, 255, 0.08);
    --consent-bg: rgba(28, 28, 30, 0.96);
    --logo-dot: var(--link-dark);
    --motto-card: #000000;
    --tree-bark: #6B6253;
    --tree-canopy: #232325;
    --control-line: #7C7C80;
    --scrim: rgba(0, 0, 0, 0.6);
    --focus: #2997FF;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --page: #000000;
        --mist: #111113;
        --mist-2: #161618;
        --paper: #1C1C1E;
        --line: #2A2A2C;
        --line-2: #3A3A3C;
        --ink: #F5F5F7;
        --text: #A1A1A6;
        --muted: #8E8E93;
        --link: #2997FF;
        --cons-tint: #2A2418;
        --cons-text: #D9C49A;
        --sol-tint: #1A2230;
        --sol-text: #A9BCD6;
        --ed-tint: #2C1C20;
        --ed-text: #D9A5AE;
        --error: #FF6B60;
        --error-tint: #2C1517;
        --success: #4CD47A;
        --success-tint: #10261A;
        --on-ink: #000000;
        --ink-hover: #FFFFFF;
        --nav-text: #D1D1D6;
        --header-bg: rgba(0, 0, 0, 0.78);
        --header-line: rgba(255, 255, 255, 0.12);
        --hairline: rgba(255, 255, 255, 0.08);
        --consent-bg: rgba(28, 28, 30, 0.96);
        --logo-dot: var(--link-dark);
        --motto-card: #000000;
        --tree-bark: #6B6253;
        --tree-canopy: #232325;
        --control-line: #7C7C80;
        --scrim: rgba(0, 0, 0, 0.6);
        --focus: #2997FF;
    }
}

/* L'arabe ne supporte pas l'interlettrage serré : tout revient à zéro, interligne plus large. */
:root[lang="ar"] {
    --font: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Geeza Pro', sans-serif;
    --ls-body: 0;
    --ls-h: 0;
    --ls-num: 0;
    --lh-h: 1.3;
}

/* ---------- Base ---------- */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-block-start: calc(var(--header-h) + 8px);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.5;
    letter-spacing: var(--ls-body);
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* <picture> des illustrations (version claire et sombre) : sans boîte propre, l'image garde sa mise en page. */
picture {
    display: contents;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3,
h4,
p,
ul,
ol {
    margin: 0;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

main:focus {
    outline: none;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    inset-inline-start: 12px;
    inset-block-start: -100px;
    z-index: 100;
    padding: 12px 18px;
    background: var(--ink);
    color: var(--on-ink);
    border-radius: var(--radius-btn);
}

.skip-link:focus {
    inset-block-start: 12px;
    color: var(--on-ink);
}

.wrap {
    max-width: 1080px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* Texte à fournir par Marwan : surligné pour ne pas passer inaperçu. */
.todo {
    padding: 1px 6px;
    border-radius: var(--radius-btn);
    background: #FFE9A8;
    color: #5C4400;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 0;
}

/* ---------- Typographie ---------- */

.h1,
.h2 {
    font-weight: 650;
    line-height: var(--lh-h);
    letter-spacing: var(--ls-h);
    text-wrap: balance;
}

.h1 {
    font-size: clamp(44px, 11vw, 96px);
}

.h1-soft {
    display: block;
    color: var(--muted);
}

.h2 {
    font-size: clamp(34px, 8.5vw, 72px);
}

.eyebrow {
    margin-block-end: 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

:root[lang="ar"] .eyebrow {
    letter-spacing: 0;
}

.eyebrow.eyebrow-muted {
    color: var(--muted);
}

.eyebrow.eyebrow-gold {
    color: var(--gold);
}

.lead {
    max-width: 720px;
    margin: 20px auto 0;
    color: var(--text);
    font-size: clamp(19px, 4.6vw, 26px);
    line-height: 1.35;
    letter-spacing: var(--ls-body);
    text-wrap: pretty;
}

/* Liens « › » de la maquette : bleus, sans soulignement, flèche orientée selon le sens de lecture. */
.links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 28px;
    margin-block-start: 28px;
    font-size: 18px;
}

.more {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--link);
}

/* « › » est un caractère miroir : en arabe, l'algorithme bidi le retourne de lui-même. */
.more::after {
    content: "\00a0\203A";
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding-inline: 22px;
    border: 0;
    border-radius: var(--radius-btn);
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    text-decoration: none;
}

.btn-blue {
    background: var(--blue);
    color: var(--white);
}

.btn-blue:hover {
    background: var(--blue-hover);
    color: var(--white);
}

.btn-dark {
    background: var(--ink);
    color: var(--on-ink);
}

.btn-dark:hover {
    background: var(--ink-hover);
    color: var(--on-ink);
}

.btn-outline {
    border: 1px solid var(--control-line);
    background: var(--paper);
    color: var(--ink);
}

.btn-outline:hover {
    border-color: var(--ink);
    color: var(--ink);
}

/* « Continuer avec Noorwan » : toujours le bleu d'action, sur tous les sites et dans les deux thèmes (M-116). */
.btn-connect {
    background: #0071E3;
    color: #FFFFFF;
}

.btn-connect:hover {
    background: #0062C4;
    color: #FFFFFF;
}

.btn-block {
    width: 100%;
}

/* ---------- En-tête fixe (charte commune M-120) : Menu, logo, liens dès 900 px, langue, thème, Connexion ---------- */

.site-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 50;
    border-block-end: 1px solid var(--header-line);
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
}

.header-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    height: var(--header-h);
    padding-inline: 4px;
}

/* Le logo reste en latin et de gauche à droite dans toutes les langues. Mot-symbole commun des sites Noorwan :
   20 px, graisse 600, interlettrage -4,5 %. */
.logo {
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1;
}

.logo:hover {
    color: var(--ink);
    text-decoration: none;
}

.logo-dot {
    color: var(--logo-dot);
}

.header-bar .logo {
    margin-inline: 4px auto;
}

.nav-desktop {
    display: none;
    gap: 32px;
    margin-inline-end: auto;
    font-size: 13px;
}

.nav-desktop a {
    color: var(--nav-text);
}

.nav-desktop a:hover {
    color: var(--ink);
    text-decoration: none;
}

/* Onglet de la page affichée : plus gras, souligné d'un trait bleu. */
.nav-desktop a[aria-current="page"] {
    color: var(--ink);
    font-weight: 600;
    box-shadow: 0 6px 0 -4px var(--blue);
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Menu des langues : <details> natif, utilisable sans JavaScript ; site.js ajoute Échap et le clic extérieur. */
.lang-menu {
    position: relative;
}

.lang-menu summary {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 44px;
    height: 44px;
    padding-inline: 8px;
    color: var(--ink);
    font: 600 13px/1 var(--font);
    letter-spacing: 0.02em;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.lang-menu summary::-webkit-details-marker {
    display: none;
}

.lang-menu summary:hover {
    color: var(--muted);
}

.lang-chevron {
    flex: none;
    transition: transform 0.15s;
}

.lang-menu[open] .lang-chevron {
    transform: rotate(180deg);
}

/* La liste s'aligne sur le bord extérieur du bouton (à droite en LTR, à gauche en RTL). */
.lang-list {
    position: absolute;
    inset-block-start: calc(100% + 4px);
    inset-inline-end: 0;
    z-index: 60;
    min-width: 168px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
}

.lang-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding-inline: 12px;
    border-radius: 8px;
    color: var(--ink);
    font: 500 15px/1.2 var(--font);
    letter-spacing: 0;
    text-align: start;
}

.lang-list a[lang="ar"] {
    font-family: 'IBM Plex Sans Arabic', var(--font);
}

.lang-list a:hover {
    background: var(--mist);
    text-decoration: none;
}

.lang-list a:focus-visible {
    outline-offset: -2px;
}

/* Langue courante : coche à la fin de la ligne (bords physiques : la coche ne se retourne pas en RTL). */
.lang-list a[aria-current="true"] {
    background: var(--sol-tint);
    font-weight: 650;
}

.lang-list a[aria-current="true"]::after {
    content: "";
    width: 10px;
    height: 6px;
    margin-block-start: -3px;
    border-bottom: 2px solid var(--blue);
    border-left: 2px solid var(--blue);
    transform: rotate(-45deg);
}

/* Bouton Menu (trois traits) : ouvre le volet du menu ; laisse la place aux liens dès 900 px. */
.menu-toggle,
.panel-close {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-btn);
    color: var(--ink);
}

.menu-toggle:hover,
.panel-close:hover {
    background: var(--mist);
    color: var(--ink);
    text-decoration: none;
}

/* Bouton « Connexion » : ouvre le volet de connexion (fin de ligne). */
.account-toggle {
    display: inline-flex;
    flex: none;
    align-items: center;
    min-height: 44px;
    padding-inline: 8px;
    border-radius: var(--radius-btn);
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.account-toggle:hover {
    background: var(--mist);
    color: var(--ink);
    text-decoration: none;
}

/* Bouton du thème (v9) : rond de 44 px dans la barre, sur toutes les largeurs.
   L'icône annonce le thème vers lequel on bascule, comme sur les autres sites : croissant de lune en clair,
   soleil en sombre (data-shown, theme-init.js). */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

.theme-toggle[hidden] {
    display: none;
}

.theme-toggle-bar {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.theme-toggle-bar:hover {
    background: var(--mist);
}

.theme-icon {
    flex: none;
}

.theme-toggle[data-shown="dark"] .theme-icon-moon,
.theme-toggle:not([data-shown="dark"]) .theme-icon-sun {
    display: none;
}

/* ---------- Volets (M-118) : menu en début de ligne, options en fin de ligne, jamais de fenêtre centrée ---------- */

/* Sans JavaScript, le volet visé par l'adresse (:target) s'ouvre ; avec, site.js pose .is-open. */
.panel-layer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 80;
}

:root:not(.js-panels) .panel-layer:target,
.panel-layer.is-open {
    display: block;
}

:root.has-panel {
    overflow: hidden;
}

.panel-scrim {
    position: absolute;
    inset: 0;
    background: var(--scrim);
}

/* Plein écran au téléphone, 400 px au plus au-delà ; côtés logiques : en arabe, le menu passe à droite. */
.panel {
    position: absolute;
    inset-block: 0;
    display: flex;
    flex-direction: column;
    width: min(100%, var(--panel-w));
    background: var(--paper);
    color: var(--ink);
    overflow: hidden;
}

.panel-start .panel {
    inset-inline-start: 0;
    border-inline-end: 1px solid var(--line);
}

.panel-end .panel {
    inset-inline-end: 0;
    border-inline-start: 1px solid var(--line);
}

.panel-head {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding-inline: 24px 8px;
    border-block-end: 1px solid var(--line);
}

.panel-title {
    font-size: 17px;
    font-weight: 600;
}

.panel-body {
    flex: 1;
    padding: 16px 24px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.panel-foot {
    flex: none;
    padding: 16px 24px;
    border-block-start: 1px solid var(--line);
}

.panel-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    border-block-end: 1px solid var(--line);
    color: var(--ink);
    font-size: 17px;
}

.panel-list a:hover {
    color: var(--ink);
    text-decoration: none;
}

/* « › » est un caractère miroir : en arabe, il se retourne de lui-même. */
.panel-list a::after {
    content: "\203A";
    color: var(--muted);
}

/* Rubrique de la page affichée : en bleu et plus grasse. */
.nav-mobile a[aria-current="page"] {
    color: var(--link);
    font-weight: 600;
}

.panel-group {
    margin-block: 24px 4px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

:root[lang="ar"] .panel-group {
    letter-spacing: 0;
}

/* Volet de connexion : logotype Connect (noorwan. puis Connect, en bleu), présentation, bouton bleu. */
.panel-connect {
    display: grid;
    align-content: start;
    gap: 16px;
    padding-block-start: 32px;
}

.connect-lockup {
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1;
    text-align: left;
}

.connect-lockup-name {
    display: block;
    margin-block-start: 4px;
    color: var(--logo-dot);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.panel-lead {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
}

.panel-text {
    color: var(--text);
}

/* ---------- Lanceur des sites (M-121) : bouton « grille » de l'en-tête, entre le thème et « Connexion » ---------- */

/* Bouton rond de 44 px, comme le thème ; il ouvre le volet #launcher-panel (ancre sans JavaScript). */
.launcher-toggle {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--ink);
}

.launcher-toggle:hover,
.launcher-toggle[aria-expanded="true"] {
    background: var(--mist);
    color: var(--ink);
    text-decoration: none;
}

/* Grille de tuiles, trois par ligne : pastille ronde à la couleur du site, sa lettre, son nom dessous. */
.launcher-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}

.launcher-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 96px;
    padding: 10px 4px;
    border-radius: 14px;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.25;
    text-align: center;
}

.launcher-tile bdi {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.launcher-tile:hover {
    background: var(--mist);
    color: var(--ink);
    text-decoration: none;
}

/* Site courant (noorwan.com) : il reste dans la liste, sur un fond doux. */
.launcher-tile[aria-current="page"] {
    background: var(--sol-tint);
    font-weight: 600;
}

/* Icône du site en 48 px (famille commune, coins de l'icône respectés), trait fin en sombre. La pastille est cachée
   tant que l'icône se charge ; si elle ne se charge pas, site.js pose .is-failed et la pastille la remplace. */
.launcher-icon {
    display: block;
    flex: none;
    width: 48px;
    height: 48px;
}

.launcher-img {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 10.5px;
}

[data-theme="dark"] .launcher-img {
    box-shadow: 0 0 0 1px var(--line);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .launcher-img {
        box-shadow: 0 0 0 1px var(--line);
    }
}

.launcher-icon .launcher-dot,
.launcher-icon.is-failed .launcher-img {
    display: none;
}

.launcher-icon.is-failed .launcher-dot {
    display: block;
}

.launcher-dot {
    flex: none;
}

/* Trait fin qui détache la pastille du fond, dans les deux thèmes. */
.launcher-dot circle {
    stroke: var(--line);
    stroke-width: 1;
}

.launcher-dot text {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
}

/* « Mon compte Connect », tout en bas. */
.launcher-account {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    color: var(--link);
    font-size: 15px;
    font-weight: 500;
}

/* « › » est un caractère miroir : en arabe, il se retourne de lui-même. */
.launcher-account::after {
    content: "\203A";
    margin-inline-start: 6px;
}

/* Dès 640 px : panneau de 328 px sous l'en-tête, comme sur Connect, son bord de fin aligné sur celui du bouton
   « grille » (--launcher-end, posé par site.js ; 8 px sans script) ; pas de croix (Échap, toucher à côté et le bouton
   ferment) ; le voile reste (transparent) pour qu'un toucher à côté ferme. Au téléphone, volet de fin de ligne plein
   écran, avec sa croix. */
@media (min-width: 640px) {
    .panel-launcher .panel-scrim {
        background: transparent;
    }

    .panel-launcher .panel-close {
        display: none;
    }

    .panel-launcher .panel {
        inset-block: calc(var(--header-h) + 4px) auto;
        inset-inline-end: var(--launcher-end, 8px);
        width: 328px;
        max-height: calc(100vh - var(--header-h) - 16px);
        border: 1px solid var(--line);
        border-radius: 14px;
    }

    .panel-launcher .panel-head {
        min-height: 48px;
        padding-inline: 16px 4px;
        border-block-end: 0;
    }

    .panel-launcher .panel-title {
        font-size: 15px;
    }

    .panel-launcher .panel-body {
        padding: 0 12px 8px;
    }

    .panel-launcher .panel-foot {
        padding: 0 12px;
    }
}

/* En-tête à 390 px : avec le lanceur, rien ne passe à la ligne ni ne déborde. */
@media (max-width: 419px) {
    .header-bar {
        gap: 0;
    }

    .lang-menu summary {
        padding-inline: 6px;
    }

    .account-toggle {
        padding-inline: 6px;
    }
}

/* ---------- Écrans : un message par écran, centré ---------- */

.screen {
    padding-block: 88px;
    text-align: center;
}

.screen-mist {
    background: var(--mist);
}

.screen-dark {
    background: var(--night);
    color: var(--night-text);
}

.screen-dark .lead {
    color: var(--night-muted);
}

.screen-dark .more,
.screen-dark a:not(.btn) {
    color: var(--link-dark);
}

.screen-dark :focus-visible {
    outline-color: var(--link-dark);
}

/* Haut de page de l'accueil : la promesse, puis l'illustration (une lampe éclaire les trois univers), arrondie en haut. */
.hero {
    padding-block: 96px 0;
    overflow: hidden;
}

.hero-visual {
    width: min(100% - 2 * var(--gutter), 1040px);
    margin: 48px auto 0;
    aspect-ratio: 16 / 11;
    border-radius: 28px 28px 0 0;
    background: var(--mist);
    overflow: hidden;
}

/* Illustrations dessinées (assets/img) : décoratives, recadrées sans déformation. */
.illus {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* La scène se lit dans le sens de la page : miroir en arabe. */
[dir="rtl"] .illus {
    transform: scaleX(-1);
}

@media (min-width: 768px) {
    .hero-visual {
        aspect-ratio: 16 / 10;
    }
}

/* Univers : grand numéro fin, petit titre teinté, illustration dessinée en bas d'écran. */
.universe {
    padding-block-end: 0;
    overflow: hidden;
}

.num {
    margin-block-end: 8px;
    font-size: clamp(64px, 16vw, 128px);
    font-weight: 200;
    line-height: 1;
    letter-spacing: var(--ls-num);
}

.tone-consulting .eyebrow,
.tone-consulting .num {
    color: var(--cons-text);
}

.tone-solutions .eyebrow {
    color: var(--sol-light);
}

.tone-solutions .num {
    color: var(--sol);
}

.tone-edition .eyebrow,
.tone-edition .num {
    color: var(--ed-text);
}

/* Noorwan Connect (résumé de l'accueil, v6) : bleu du lien, illustration sans miroir comme sur sa page. */
.tone-connect .eyebrow,
.tone-connect .num {
    color: var(--link);
}

[dir="rtl"] .tone-connect .illus {
    transform: none;
}

.shape {
    width: min(100% - 2 * var(--gutter), 760px);
    margin: 48px auto 0;
    aspect-ratio: 2 / 1;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
}

/* Les cinq expertises du Consulting en cartes illustrées (planche « Nos expertises », variante 1) :
   carte blanche aux coins de 24 px, pictogramme dans une pastille de 64 px (dessinée dans le SVG, version sombre à côté),
   puis une sixième carte sombre « Clarifier avant d'accélérer. ». Une colonne à 390 px, deux dès 768 px, trois dès 1024 px.
   Pictogrammes sans miroir en arabe (classe propre, pas .illus). */
.expertises {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-block-start: 8px;
    text-align: start;
}

.expertise {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border-radius: 24px;
    background: var(--paper);
}

.expertise-icon {
    display: block;
    width: 64px;
    height: 64px;
}

.expertise strong {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: var(--ls-body);
}

.expertise span {
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

/* Carte sombre : noir doux en clair, noir franc en sombre (les cartes blanches y deviennent #1C1C1E), filet pour la détacher. */
.expertise-motto {
    justify-content: flex-end;
    background: var(--motto-card);
    box-shadow: inset 0 0 0 1px var(--hairline);
    color: var(--night-text);
}

.expertise-motto strong {
    font-size: 22px;
}

.expertise-motto span {
    color: var(--night-muted);
}

@media (min-width: 768px) {
    .expertises {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .expertises {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ---------- Produits de Solutions : une ligne par produit (disposition A, 20/11/2026) ---------- */

/* Inteek, Reserva, Noorwan Connect, Noor l'un sous l'autre, même gabarit et même poids, beaucoup d'air entre les lignes
   (un message par écran). Téléphone : illustration au-dessus du texte, centrés. Ordinateur (834 px) : deux colonnes,
   illustration côté début puis côté fin en alternance ; la grille suit le sens de la page, donc juste en arabe. */
.product-rows {
    width: min(100% - 2 * var(--gutter), 1080px);
    margin-inline: auto;
}

.product-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    padding-block: 88px;
    text-align: center;
    scroll-margin-block-start: calc(var(--header-h) + 8px);
}

.product-row + .product-row {
    border-block-start: 1px solid var(--line);
}

.product-row-visual {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
}

.product-row-visual img {
    display: block;
    width: 100%;
    height: auto;
}

/* Inteek : sa scène se lit dans le sens de la page, en miroir en arabe comme avant. */
[dir="rtl"] .mirror-rtl img {
    transform: scaleX(-1);
}

.product-row-body {
    min-width: 0;
}

.product-name {
    font-size: clamp(34px, 8vw, 56px);
}

.product-text {
    max-width: 520px;
    margin: 16px auto 0;
    color: var(--text);
    font-size: clamp(18px, 4.4vw, 22px);
    line-height: 1.4;
    text-wrap: pretty;
}

.product-row .links {
    margin-block-start: 20px;
}

.badge-confidential {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-block-start: 14px;
    padding: 4px 12px;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: var(--sol-text);
    font-size: 12px;
    font-weight: 600;
}

.soon-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 16px;
    padding: 28px var(--gutter) 64px;
    color: var(--muted);
    font-size: 15px;
}

.soon-label {
    color: var(--sol-text);
    font-weight: 600;
}

.soon-row ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.soon-row li {
    padding: 4px 14px;
    border: 1px dashed var(--line-2);
    border-radius: 999px;
}

/* ---------- Édition sur l'accueil : la trilogie ---------- */

.shelf {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-block-start: 48px;
}

.shelf li {
    width: 96px;
}

.cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.cover-soon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    aspect-ratio: 2 / 3;
    padding: 10px 8px;
    border: 1.5px dashed var(--ed);
    border-radius: 3px;
    color: var(--ed-text);
    text-align: start;
}

.cover-soon-label {
    font-size: 11px;
    font-weight: 600;
}

.cover-soon-title {
    color: var(--ink);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.15;
}

.shelf-caption {
    margin-block-start: 16px;
    color: var(--muted);
    font-size: 14px;
}

/* ---------- Étapes sur fond sombre (prestation de la page Édition) ---------- */

.steps {
    display: grid;
    gap: 0;
    max-width: 820px;
    margin: 56px auto 0;
    text-align: start;
}

.steps li {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    padding-block: 18px;
    border-block-start: 1px solid var(--night-line);
}

.step-num {
    grid-row: span 2;
    color: var(--gold);
    font-size: 18px;
    font-weight: 400;
}

.steps strong {
    color: var(--night-text);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.steps li > span:last-child {
    color: var(--night-muted);
    font-size: 15px;
}

/* ---------- De l'idée à l'action : trois étapes illustrées ---------- */

.method-steps {
    display: grid;
    gap: 40px;
    max-width: 1080px;
    margin: 56px auto 0;
    text-align: start;
}

.method-steps li {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 12px;
    align-content: start;
}

.step-visual {
    grid-column: 1 / -1;
    margin-block-end: 20px;
    aspect-ratio: 16 / 11;
    border-radius: 20px;
    background: var(--mist);
    overflow: hidden;
}

.method-num {
    grid-row: span 2;
    color: var(--muted);
    font-size: 20px;
    font-weight: 300;
    line-height: 1.25;
}

.method-steps strong {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.step-text {
    margin-block-start: 6px;
    color: var(--text);
    font-size: 16px;
}

/* Trois points forts de « Pourquoi Noorwan ». */
.why-points {
    display: grid;
    gap: 28px;
    max-width: 980px;
    margin: 48px auto 0;
    text-align: start;
}

.why-points li {
    display: grid;
    gap: 6px;
    padding-inline-start: 16px;
    border-inline-start: 2px solid var(--gold);
}

.why-points strong {
    color: var(--night-text);
    font-size: 19px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.why-points span {
    color: var(--night-muted);
    font-size: 15px;
}

@media (min-width: 834px) {
    .why-points {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 32px;
    }
}

/* ---------- Arbre des applications (accueil, 27/11/2026) ----------
   Dessin SVG dans la page (app/layout/tree.php), décoratif ; noms et liens en HTML posés par-dessus en pourcentage
   du dessin (centre de chaque nœud, .tree-at-*). Téléphone : arbre vertical (360 x 520) ; dès 768 px : arbre large
   (1000 x 560). En arabe, le dessin passe en miroir et inset-inline-start suit le sens de lecture. Aucune animation :
   rien à couper pour prefers-reduced-motion. Couleurs par variables (thème sombre compris). */

.tree-screen {
    background: var(--paper);
}

.tree {
    position: relative;
    width: min(100% - 2 * var(--gutter), 400px);
    margin: 48px auto 0;
    aspect-ratio: 360 / 520;
}

.tree-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.tree-art-wide {
    display: none;
}

[dir="rtl"] .tree-art {
    transform: scaleX(-1);
}

.tree-canopy {
    fill: var(--tree-canopy);
}

.tree-ground,
.tree-root {
    fill: none;
    stroke: var(--line-2);
    stroke-width: 2;
    stroke-linecap: round;
}

.tree-bark {
    fill: var(--tree-bark);
}

.tree-limb,
.tree-twig {
    fill: none;
    stroke-linecap: round;
}

.tree-limb {
    stroke-width: 10;
}

.tree-twig {
    stroke-width: 5;
}

.tree-limb-cons {
    stroke: var(--cons);
}

.tree-limb-sol {
    stroke: var(--sol);
}

.tree-limb-ed {
    stroke: var(--ed);
}

.tree-leaf {
    stroke-width: 1.5;
}

.tree-leaf-cons {
    fill: var(--cons-tint);
    stroke: var(--cons);
}

.tree-leaf-sol {
    fill: var(--sol-tint);
    stroke: var(--sol);
}

.tree-leaf-ed {
    fill: var(--ed-tint);
    stroke: var(--ed);
}

.tree-bud-cons {
    fill: var(--cons);
}

.tree-bud-sol {
    fill: var(--sol);
}

.tree-bud-ed {
    fill: var(--ed);
}

/* Nœuds : centrés sur leur point du dessin (le décalage horizontal s'inverse en arabe). */
.tree-node {
    position: absolute;
    transform: translate(-50%, -50%);
}

[dir="rtl"] .tree-node {
    transform: translate(50%, -50%);
}

/* Tronc et branches : pastilles de 44 px, texte dans la couleur de l'univers. */
.tree-trunk,
.tree-branch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding-inline: 18px;
    border-radius: 22px;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.tree-trunk {
    background: var(--ink);
    color: var(--on-ink);
}

.tree-branch {
    border: 1px solid var(--line-2);
    background: var(--paper);
}

.tree-branch-consulting {
    color: var(--cons-text);
}

.tree-branch-solutions {
    color: var(--sol-text);
}

.tree-branch-edition {
    color: var(--ed-text);
}

/* Applications : icône de 48 px (famille commune, pastille de secours) et nom dessous. */
.tree-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 76px;
    padding: 4px;
    border-radius: 14px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.tree-app:hover bdi {
    text-decoration: underline;
}

.tree-app:hover {
    text-decoration: none;
}

/* Positions sur l'arbre vertical (centre du nœud, en % du dessin 360 x 520). */
.tree-at-noorwan {
    inset-inline-start: 50%;
    inset-block-start: 82.7%;
}

.tree-at-consulting {
    inset-inline-start: 17.2%;
    inset-block-start: 57.7%;
}

.tree-at-solutions {
    inset-inline-start: 50%;
    inset-block-start: 48%;
}

.tree-at-edition {
    inset-inline-start: 82.8%;
    inset-block-start: 57.7%;
}

.tree-at-reserva {
    inset-inline-start: 19.4%;
    inset-block-start: 18.3%;
}

.tree-at-inteek {
    inset-inline-start: 50%;
    inset-block-start: 10.6%;
}

.tree-at-connect {
    inset-inline-start: 80.6%;
    inset-block-start: 18.3%;
}

@media (min-width: 768px) {
    .tree {
        width: min(100% - 2 * var(--gutter), 1000px);
        margin-block-start: 64px;
        aspect-ratio: 1000 / 560;
    }

    .tree-art-narrow {
        display: none;
    }

    .tree-art-wide {
        display: block;
    }

    .tree-trunk,
    .tree-branch {
        font-size: 17px;
    }

    /* Positions sur l'arbre large (en % du dessin 1000 x 560). */
    .tree-at-noorwan {
        inset-block-start: 84%;
    }

    .tree-at-consulting {
        inset-inline-start: 15%;
        inset-block-start: 46.8%;
    }

    .tree-at-solutions {
        inset-block-start: 51.8%;
    }

    .tree-at-edition {
        inset-inline-start: 85%;
        inset-block-start: 46.8%;
    }

    .tree-at-reserva {
        inset-inline-start: 33%;
        inset-block-start: 20%;
    }

    .tree-at-inteek {
        inset-block-start: 12.9%;
    }

    .tree-at-connect {
        inset-inline-start: 67%;
        inset-block-start: 20%;
    }
}

/* ---------- Bandeau « Un projet en tête ? » ---------- */

.cta-visual {
    width: min(100%, 520px);
    margin: 28px auto 0;
    aspect-ratio: 3 / 2;
    border-radius: 20px;
    overflow: hidden;
}

/* v8 : sur téléphone, le titre vient avant la photo (ordre du document) ;
   à partir de 768 px, la photo repasse au-dessus, comme avant. */
@media (min-width: 768px) {
    .wrap-photo {
        display: flex;
        flex-direction: column;
    }

    .wrap-photo > .cta-visual {
        order: -1;
        margin: 0 auto 32px;
    }
}

/* Photo : recadrée sans déformation, jamais en miroir (contrairement aux illustrations dessinées). */
.photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.links-cta {
    margin-block-start: 36px;
}

.cta-mail {
    margin-block-start: 20px;
    color: var(--muted);
    font-size: 14px;
}

.cta-mail a {
    color: var(--muted);
}

/* ---------- Pied de page commun (charte commune M-120) ---------- */

.site-footer {
    padding-block: 40px 24px;
    background: var(--mist);
    color: var(--text);
    font-size: 14px;
}

.footer-brand {
    display: grid;
    justify-items: start;
    gap: 8px;
}

.footer-tagline {
    color: var(--text);
}

/* Quatre colonnes au plus, deux par ligne au téléphone. */
.footer-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
    margin-block: 24px;
}

.footer-h {
    margin-block-end: 8px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

.footer-cols a,
.footer-legal a,
.footer-legal button {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    color: var(--text);
}

.footer-cols a:hover,
.footer-legal a:hover {
    color: var(--ink);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    padding-block-start: 16px;
    border-block-start: 1px solid var(--line);
    color: var(--muted);
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
}

.footer-legal a {
    color: var(--muted);
}

/* ---------- Pages intérieures : en-tête centré ---------- */

.page-hero {
    padding-block: 72px 48px;
    text-align: center;
}

.page-hero .lead {
    font-size: clamp(18px, 4.2vw, 23px);
}

.page-hero .links {
    margin-block-start: 28px;
}

.section {
    padding-block: 64px;
}

.section-title {
    margin-block-end: 36px;
    text-align: center;
}

/* ---------- Pages légales ---------- */

.h1-legal {
    font-size: clamp(36px, 8vw, 64px);
}

.section-legal {
    padding-block-start: 0;
}

.legal-updated {
    margin-block-start: 14px;
    color: var(--muted);
    font-size: 14px;
}

.legal {
    max-width: 760px;
    margin-inline: auto;
}

.legal h2 {
    margin-block: 40px 12px;
    font-size: 24px;
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

:root[lang="ar"] .legal h2 {
    letter-spacing: 0;
}

.legal h2:first-child {
    margin-block-start: 0;
}

.legal p,
.legal li {
    color: var(--text);
    font-size: 16px;
}

.legal p + p,
.legal ul + p,
.legal p + ul {
    margin-block-start: 12px;
}

.legal ul {
    display: grid;
    gap: 8px;
    padding-inline-start: 22px;
    list-style: disc;
}

/* Encadré « Page en cours de mise à jour ». */
.legal-notice {
    display: grid;
    gap: 10px;
    margin-block-end: 40px;
    padding: 22px 24px;
    border: 1px solid var(--line-2);
    border-inline-start: 4px solid var(--ink);
    border-radius: 12px;
    background: var(--mist);
}

.legal .legal-notice h2 {
    margin: 0;
    font-size: 19px;
}

.legal .legal-notice ul {
    gap: 4px;
}

/* ---------- Largeurs moyennes et grandes ---------- */

@media (min-width: 600px) {
    .footer-cols {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .shelf li {
        width: 128px;
    }

    .steps li {
        grid-template-columns: 1fr;
        align-content: start;
    }

    .step-num {
        grid-row: auto;
    }

    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 24px;
    }
}

@media (min-width: 834px) {
    :root {
        --gutter: 32px;
    }

    .screen {
        padding-block: 128px;
    }

    .hero {
        padding-block: 128px 0;
    }

    .universe {
        padding-block-end: 0;
    }

    .product-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 64px;
        padding-block: 128px;
        text-align: start;
    }

    /* Une ligne sur deux : illustration côté fin. */
    .product-row:nth-child(even) .product-row-visual {
        order: 1;
    }

    .product-row .product-text,
    .product-row .inteek-text,
    .product-row .modules {
        margin-inline: 0;
    }

    .product-row .modules,
    .product-row .links {
        justify-content: flex-start;
    }

    .steps {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .steps strong {
        font-size: 18px;
    }

    .method-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 32px;
    }

    .section {
        padding-block: 96px;
    }

    .page-hero {
        padding-block: 112px 64px;
    }
}

/* ---------- Page Solutions ---------- */

.h1-page {
    font-size: clamp(40px, 9.5vw, 80px);
}

.eyebrow.eyebrow-sol {
    color: var(--sol-text);
}

.section-mist {
    background: var(--mist);
}

.h2-section {
    font-size: clamp(30px, 6.5vw, 52px);
}

.page-connect {
    margin-block-start: 18px;
    color: var(--muted);
    font-size: 15px;
}

/* Notre façon de faire : trois principes en colonnes, numéros dans le ton Solutions. */
.principles {
    display: grid;
    gap: 28px;
    max-width: 960px;
    margin-inline: auto;
    text-align: center;
}

.principle-num {
    display: block;
    margin-block-end: 6px;
    color: var(--sol);
    font-size: 40px;
    font-weight: 200;
    line-height: 1;
    letter-spacing: var(--ls-num);
}

.principles h3 {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.015em;
}

:root[lang="ar"] .principles h3 {
    letter-spacing: 0;
}

.principles p {
    max-width: 320px;
    margin: 8px auto 0;
    color: var(--text);
    font-size: 16px;
}

.inteek-text {
    max-width: 640px;
    margin: 16px auto 0;
    color: var(--muted);
    font-size: 17px;
}

.modules-title {
    margin-block-start: 48px;
    color: var(--sol-text);
    font-size: 14px;
    font-weight: 600;
}

.modules {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 760px;
    margin: 16px auto 0;
}

.modules li {
    padding: 10px 18px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: var(--paper);
    font-size: 16px;
}

@media (min-width: 700px) {
    .principles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ---------- Page Consulting (v6) ---------- */

/* Haut de page : comme l'accueil, l'illustration du Consulting ferme l'écran, arrondie en haut. */
.consulting-hero {
    padding-block-end: 0;
    overflow: hidden;
}

/* Photo d'en-tête des pages Consulting, Solutions, Édition et Contact (classe has-photo, posée seulement quand l'image existe) :
   image sans texte en fond, voile sombre dégradé vers le bas, titre et liens en HTML par-dessus, mêmes couleurs dans les deux
   thèmes. Texte en bas de l'image au téléphone comme sur ordinateur. Jamais en miroir en arabe. */
.page-hero.has-photo {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: min(600px, 88svh);
    padding-block: 120px 56px;
    overflow: hidden;
    color: var(--night-text);
}

.hero-photo {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--night-2);
}

.hero-photo::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.22) 100%);
    content: "";
}

.hero-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero.has-photo .eyebrow,
.page-hero.has-photo .h1,
.page-hero.has-photo .lead,
.page-hero.has-photo .page-connect,
.page-hero.has-photo .cta-mail {
    color: var(--night-text);
}

.page-hero.has-photo .more,
.page-hero.has-photo .page-connect a,
.page-hero.has-photo .cta-mail a {
    color: var(--white);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-hero.has-photo .btn-dark {
    background: var(--white);
    color: var(--night-2);
}

.page-hero.has-photo .btn-dark:hover {
    background: var(--night-text);
    color: var(--night);
}

@media (min-width: 768px) {
    .page-hero.has-photo {
        min-height: min(680px, 82svh);
        padding-block: 160px 80px;
    }
}

.accomp-writing {
    max-width: 640px;
    margin: 20px auto 0;
    font-size: 16px;
}

.tone-edition .shelf-caption {
    max-width: 640px;
    margin-inline: auto;
}

/* ---------- Page Noorwan Connect ---------- */

/* Haut de page : comme l'accueil, l'illustration ferme l'écran, arrondie en haut. */
.connect-hero {
    padding-block-end: 0;
    overflow: hidden;
}

.eyebrow.eyebrow-connect,
.connect-section .eyebrow {
    color: var(--sol-text);
}

.screen-dark.connect-section .eyebrow {
    color: var(--gold);
}

.connect-already {
    margin-block-start: 14px;
    color: var(--muted);
    font-size: 15px;
}

.connect-hero-visual {
    aspect-ratio: 16 / 10;
}

/* Les scènes de Noorwan Connect n'ont pas de sens de lecture et portent des coches : pas de miroir en arabe. */
[dir="rtl"] .connect-hero-visual .illus,
[dir="rtl"] .connect-visual .illus {
    transform: none;
}

/* Illustration d'une section : un cadre arrondi, blanc sur fond gris, gris sur fond blanc, noir sur fond noir. */
.connect-visual {
    width: min(100%, 520px);
    margin: 40px auto 0;
    aspect-ratio: 16 / 11;
    border-radius: 20px;
    background: var(--mist);
    overflow: hidden;
}

.screen-mist .connect-visual {
    background: var(--paper);
}

.screen-dark .connect-visual {
    background: var(--night-2);
}

/* Trois points par section, numérotés, en colonnes sur grand écran. */
.connect-points {
    display: grid;
    gap: 28px;
    max-width: 720px;
    margin: 48px auto 0;
    text-align: start;
}

.connect-points li {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 12px;
    align-content: start;
}

.connect-num {
    grid-row: span 2;
    min-width: 1.4em;
    font-variant-numeric: tabular-nums;
    color: var(--sol);
    font-size: 20px;
    font-weight: 300;
    line-height: 1.25;
}

.connect-points strong {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

:root[lang="ar"] .connect-points strong {
    letter-spacing: 0;
}

.connect-point-text {
    margin-block-start: 6px;
    color: var(--text);
    font-size: 16px;
}

.screen-dark .connect-num {
    color: var(--gold);
}

.screen-dark .connect-points strong {
    color: var(--night-text);
}

.screen-dark .connect-point-text {
    color: var(--night-muted);
}

.connect-note {
    max-width: 720px;
    margin: 36px auto 0;
    padding: 16px 20px;
    border-radius: 14px;
    background: var(--paper);
    color: var(--text);
    font-size: 16px;
}

/* « Bientôt » : même pastille que les produits à venir, sans date. */
.badge-soon {
    display: inline-block;
    margin-block-end: 14px;
    padding: 4px 14px;
    border: 1px dashed var(--line-2);
    border-radius: 999px;
    color: var(--sol-text);
    font-size: 14px;
    font-weight: 600;
}

.connect-final {
    border-block-start: 1px solid var(--line);
}

@media (min-width: 834px) {
    .connect-points {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 32px;
        max-width: 1000px;
    }

    .connect-visual {
        margin-block-start: 56px;
    }
}

/* ---------- Page Édition ---------- */

.catalogue-head {
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
}


.collection {
    padding-block-start: 32px;
    border-block-start: 1px solid var(--line-2);
}

.collection + .collection {
    margin-block-start: clamp(48px, 7vw, 80px);
}

.collection-head {
    max-width: 760px;
    margin-block-end: 28px;
}

.collection-head h3 {
    color: var(--ed-text);
    font-size: clamp(26px, 5vw, 36px);
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

:root[lang="ar"] .collection-head h3 {
    letter-spacing: 0;
}

.collection-text {
    margin-block-start: 12px;
    color: var(--text);
    font-size: 16px;
}

.books {
    display: grid;
    gap: 16px;
}

.book {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 18px;
    padding: 24px;
    border-radius: 20px;
    background: var(--mist);
}

.book .cover,
.book .cover-soon {
    width: 46%;
}

.book-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.book h4 {
    font-size: 24px;
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

:root[lang="ar"] .book h4 {
    letter-spacing: 0;
}

.book-sub {
    margin-block-start: -4px;
    color: var(--muted);
    font-size: 14px;
}

.book-flag {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--ed-tint);
    color: var(--ed-text);
    font-size: 12px;
    font-weight: 600;
}

.book-lead {
    margin-block-start: 6px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.book-summary {
    color: var(--text);
    font-size: 15px;
}

.book-status {
    margin-block-start: 6px;
    color: var(--ed-text);
    font-size: 14px;
    font-weight: 500;
}

.book-buy {
    margin-block-start: 10px;
    min-height: 44px;
    padding-inline: 18px;
    font-size: 14px;
}

@media (min-width: 520px) {
    .book {
        grid-template-columns: minmax(96px, 30%) 1fr;
    }

    .book .cover,
    .book .cover-soon {
        width: 100%;
    }
}

@media (min-width: 900px) {
    .books {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- Page Contact ---------- */

/* Formulaire sur un panneau blanc, au centre, sur une colonne de lecture confortable. */
.contact-wrap {
    max-width: 760px;
}

.contact-form {
    display: grid;
    gap: 22px;
    padding: 24px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--paper);
}

.field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.field-row {
    display: grid;
    gap: 22px;
}

.field label,
.consents legend {
    font-size: 15px;
    font-weight: 600;
}

.optional {
    color: var(--muted);
    font-weight: 400;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--control-line);
    border-radius: var(--radius-btn);
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    letter-spacing: 0;
}

/* Champs au format latin (e-mail, téléphone) : alignés selon la langue de la page. */
.field input[dir="ltr"] {
    text-align: start;
}

[dir="rtl"] .field input[dir="ltr"] {
    text-align: right;
}

.field textarea {
    min-height: 160px;
    resize: vertical;
}

.field select {
    appearance: none;
    padding-inline-end: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23515154' stroke-width='1.6'/%3E%3C/svg%3E");
    background-position: right 16px center;
    background-repeat: no-repeat;
}

[dir="rtl"] .field select {
    background-position: left 16px center;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--blue);
    outline: 2px solid rgba(0, 113, 227, 0.25);
    outline-offset: 0;
}

.field [aria-invalid="true"] {
    border-color: var(--error);
}

.field-error {
    color: var(--error);
    font-size: 14px;
}

.form-note {
    color: var(--muted);
    font-size: 14px;
}

.consents {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.consents legend {
    padding-inline: 6px;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 16px;
    cursor: pointer;
}

.check input {
    flex: none;
    width: 22px;
    height: 22px;
    margin: 1px 0 0;
    accent-color: var(--blue);
}

.form-submit {
    display: grid;
    justify-items: start;
    gap: 14px;
}

/* Champ piège : hors écran, jamais affiché ni lu. */
.hp {
    position: absolute;
    inset-inline-start: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert {
    display: grid;
    gap: 6px;
    margin-block-end: 28px;
    padding: 20px 22px;
    border-inline-start: 4px solid;
    border-radius: 12px;
}

.alert:focus {
    outline: none;
}

.alert-title {
    font-weight: 650;
}

.alert ul {
    margin-block-start: 4px;
    padding-inline-start: 20px;
    list-style: disc;
}

.alert a {
    color: inherit;
    text-decoration: underline;
}

.alert-error {
    border-color: var(--error);
    background: var(--error-tint);
    color: var(--error);
}

.alert-success {
    border-color: var(--success);
    background: var(--success-tint);
    color: var(--success);
}

@media (min-width: 640px) {
    .field-row {
        grid-template-columns: 1fr 1fr;
    }

    .contact-form {
        padding: 40px;
        border-radius: var(--radius-card);
    }
}

/* ---------- Choix de cookies commun (M-129) : bandeau en bas, volet « Choisir » de fin de ligne ---------- */

/* Pleine largeur en bas de l'écran, sans voile : la personne peut lire le site avant de choisir. */
.consent {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 70;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-block-start: 1px solid var(--line);
    background: var(--consent-bg);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
}

.consent[hidden] {
    display: none;
}

.consent-inner {
    display: grid;
    gap: 12px;
    max-width: 1040px;
    margin-inline: auto;
}

.consent-text {
    color: var(--ink);
    font-size: 15px;
    line-height: 1.45;
}

.consent-text a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* « Tout accepter » et « Tout refuser » : côte à côte, même forme, aucun choix mis en avant ; « Choisir » dessous. */
.consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
}

.btn-consent {
    min-height: 44px;
    padding-inline: 12px;
    font-size: 15px;
}

.consent-choose {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    color: var(--link);
    font-size: 15px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.consent-choose:hover {
    text-decoration: underline;
}

@media (min-width: 760px) {
    .consent-inner {
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 24px;
    }

    .btn-consent {
        min-width: 148px;
    }
}

/* Volet « Choisir » : un interrupteur par usage, sa description dessous le nom. */
.consent-choice {
    display: grid;
    align-content: start;
    gap: 0;
}

.consent-choice .panel-text {
    margin-block-end: 16px;
}

.consent-switch {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-block: 16px;
    border-block-start: 1px solid var(--line);
    cursor: pointer;
}

.consent-switch:last-of-type {
    border-block-end: 1px solid var(--line);
    margin-block-end: 16px;
}

.consent-switch-text {
    display: grid;
    flex: 1;
    gap: 2px;
    min-width: 0;
}

.consent-switch-name {
    font-weight: 600;
}

.consent-switch-hint {
    color: var(--text);
    font-size: 14px;
    line-height: 1.4;
}

/* Interrupteur : case à cocher redessinée (rôle switch), pastille qui suit le sens de lecture. */
.switch {
    position: relative;
    flex: none;
    width: 51px;
    height: 31px;
    margin: 0;
    border-radius: 31px;
    background: var(--control-line);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.switch::before {
    content: "";
    position: absolute;
    inset-block-start: 2px;
    inset-inline-start: 2px;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #FFFFFF;
    transition: inset-inline-start 0.2s;
}

.switch:checked {
    background: var(--blue);
}

.switch:checked::before {
    inset-inline-start: 22px;
}

.switch:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .switch,
    .switch::before {
        transition: none;
    }
}

.consent-manage-open {
    margin-block-start: 8px;
}

/* ---------- Installer l'application sans magasin (M-132) : barre en bas, comme le bandeau des cookies ---------- */

/* Même place et même fond que le bandeau des cookies, qu'elle ne recouvre jamais (site.js attend le choix) ;
   sans voile ; cachée tant que site.js ne l'ouvre pas, donc jamais sans JavaScript. */
.install-bar {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 70;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-block-start: 1px solid var(--line);
    background: var(--consent-bg);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
}

.install-bar[hidden],
.install-bar [hidden] {
    display: none;
}

.install-inner {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    max-width: 1040px;
    margin-inline: auto;
}

/* L'icône encre se perd sur le fond sombre : anneau d'un pixel, comme dans le lanceur. */
.install-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    box-shadow: 0 0 0 1px var(--line);
}

.install-body {
    min-width: 0;
}

.install-title {
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}

.install-text {
    margin-block-start: 2px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
}

/* Mode d'emploi de l'iPhone : deux lignes, chacune avec son dessin. */
.install-steps {
    display: grid;
    gap: 4px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.install-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.4;
}

.install-glyph {
    flex: none;
    color: var(--link);
}

.install-actions {
    display: flex;
    grid-column: 1 / -1;
    gap: 8px;
}

.btn-install {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    padding-inline: 12px;
    font-size: 15px;
    white-space: nowrap;
}

/* La forme qui ne sert pas sur cet appareil (Android ou iPhone) est cachée. */
.install-bar[data-mode="android"] [data-install-for="ios"],
.install-bar[data-mode="ios"] [data-install-for="android"] {
    display: none;
}

@media (min-width: 760px) {
    .install-inner {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        align-items: center;
        gap: 16px;
    }

    .install-actions {
        grid-column: auto;
    }

    .btn-install {
        min-width: 148px;
    }
}

@media print {
    .install-bar {
        display: none;
    }
}

/* Entrée « Installer l'application » du volet du menu : comme les liens de la liste, montrée par site.js. */
.panel-install[hidden] {
    display: none;
}

.panel-install-btn {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 0;
    border: 0;
    border-block-end: 1px solid var(--line);
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: 17px;
    text-align: start;
    cursor: pointer;
}

/* Grand écran (charte commune) : les liens principaux remplacent le bouton Menu, l'en-tête prend ses marges. */
@media (min-width: 900px) {
    .header-bar {
        padding-inline: 24px;
    }

    .header-bar .logo {
        margin-inline: 0 32px;
    }

    .nav-desktop {
        display: flex;
    }

    .menu-toggle {
        display: none;
    }

    .site-footer {
        padding-block: 56px 28px;
    }
}
