/* La coquille du site, d'après Urbi (retour de MA du 14 octobre 2026 : « j'aime beaucoup la navigation, le design des
   sections et les animations de urbi.ae, je n'utiliserais pas leur couleur »).
   - Page claire ; les sections sombres sont des panneaux arrondis posés dessus, avec une marge, comme les panneaux d'Urbi.
   - Barre du haut : nom à gauche, liens au centre avec un menu déroulant « Plateforme », bouton en pilule avec sa flèche
     dans une pastille ; au défilement, la barre devient une bande claire flottante.
   - Ouverture : un cadre sombre arrondi qui se resserre au défilement pendant que les quatre durées glissent des côtés.
   - Titres qui montent mot à mot, masqués par leur ligne. */

/* ---------- Page et panneaux ---------- */
html { background: var(--page); }
body { background: var(--page); }
.section:not(.jour), .tete-page, .pied, .panneau {
  margin-inline: var(--marge-panneau);
  border-radius: var(--rayon-panneau);
  overflow: clip;
}
.section:not(.jour) + .section:not(.jour) { margin-top: var(--marge-panneau); }
.pied { margin-bottom: var(--marge-panneau); display: flow-root; } /* flow-root : le logo géant est rogné par le bas du panneau, sans manger la marge */
.pixels { display: none !important; }
/* Un panneau sombre entre en montant légèrement et en reprenant sa pleine largeur (scripts/coquille.js, --entree). */
.js-mouvement [data-panneau] { transform: translateY(calc((1 - var(--entree, 1)) * 48px)) scale(calc(0.965 + var(--entree, 1) * 0.035)); transform-origin: 50% 0; }

/* ---------- Barre du haut ---------- */
.barre { height: var(--barre); background: transparent; border-bottom: 0; transition: none; }
.barre__rang { position: relative; height: calc(var(--barre) - 2 * var(--marge-panneau)); margin-top: var(--marge-panneau); width: min(100% - 2 * var(--marge-panneau), 1560px); padding-inline: clamp(12px, 1.6vw, 24px); border-radius: 18px; border: var(--trame) solid transparent; transition: background-color 360ms var(--courbe), border-color 360ms var(--courbe), box-shadow 360ms var(--courbe); }
/* CTA visible dès 1024 px (masqué sous 1023) : flush à droite seulement dans cette plage. */
@media (min-width: 1024px) {
  .barre__rang { padding-inline: clamp(12px, 1.6vw, 24px) 0; }
}
.barre.est-collee { background: transparent; border: 0; }
/* Bande claire flottante, une fois sorti de l'ouverture */
/* JS pose aussi la classe .jour sur la barre flottante : ses jetons deviennent ceux des sections claires. */
.barre.est-flottante .barre__rang { background: color-mix(in srgb, var(--fond) 98%, transparent); border-color: color-mix(in srgb, var(--texte) 12%, transparent); box-shadow: 0 8px 30px color-mix(in srgb, var(--texte) 10%, transparent); }
.barre.est-flottante { color: var(--texte); }
.marque { font-size: 1.5rem; gap: 0; align-items: center; letter-spacing: -0.035em; color: var(--texte); }
/* Le logo « Hub ia » : le H en deux pilules et la sphère du hub, puis « ub ia » en minuscules dans la police du logo,
   arrondie comme les pilules. Le H a la hauteur des capitales de cette police, avec un léger dépassement (formes rondes). */
.logo { display: inline-block; font-family: var(--police-logo); font-weight: var(--graisse-logo); line-height: 1; letter-spacing: -0.01em; white-space: nowrap; }
.logo__h { display: inline-block; height: calc(var(--cap-logo) * 1.04em); width: auto; vertical-align: baseline; margin-right: 0.06em; translate: 0 0.02em; overflow: visible; }
.logo__h rect { fill: currentColor; }
.sph-1 { stop-color: var(--sphere-clair); } .sph-2 { stop-color: var(--accent); } .sph-3 { stop-color: var(--sphere-sombre); }
.barre__liens { gap: 2px; align-items: center; }
.barre__liens > li > a, .barre__deroulant > button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; color: var(--texte); font-family: var(--police-interface); font-weight: var(--graisse-interface); font-size: var(--t-s); text-decoration: none; cursor: pointer; transition: background-color var(--duree) var(--courbe); }
.barre__liens > li > a:hover, .barre__deroulant > button:hover, .barre__deroulant > button[aria-expanded="true"] { background: color-mix(in srgb, var(--texte) 10%, transparent); }
.barre__liens a[aria-current="page"] { box-shadow: none; background: color-mix(in srgb, var(--texte) 10%, transparent); }
.barre__deroulant { position: static; } /* le menu se centre sur la barre entière, pas sur le bouton : il ne sort jamais de l’écran */
.barre__deroulant > button svg { width: 12px; height: 12px; transition: transform var(--duree) var(--courbe); }
.barre__deroulant > button[aria-expanded="true"] svg { transform: rotate(180deg); }
/* Le menu « Plateforme » : trois colonnes de pièces, comme le menu « Products » d'Urbi */
.menu-plateforme { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%); width: min(880px, calc(100vw - 32px)); padding: var(--e-4); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--e-2) var(--e-4); background: var(--surface); color: var(--texte); border-radius: 18px; border: var(--trame) solid var(--bordure); box-shadow: 0 24px 60px color-mix(in srgb, var(--texte) 18%, transparent); }
.menu-plateforme[hidden] { display: none; }
.menu-plateforme h3 { grid-row: 1; font-family: var(--police-interface); font-size: 0.8125rem; font-weight: 400; color: var(--texte-doux); padding: 4px 12px; letter-spacing: 0; }
.menu-plateforme ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.menu-plateforme a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--texte); }
.menu-plateforme a b { font-family: var(--police-interface); font-weight: 600; font-size: var(--t-s); }
.menu-plateforme a span { font-size: 0.8125rem; color: var(--texte-doux); line-height: 1.35; }
.menu-plateforme a:hover { background: var(--fond); }
.menu-plateforme__tout svg { width: 18px; height: 18px; flex: none; }
/* Les trois colonnes, sur grand écran seulement : dans le menu du téléphone, les pièces s'empilent. */
@media (min-width: 1024px) {
  .menu-plateforme h3:nth-of-type(1), .menu-plateforme ul:nth-of-type(1) { grid-column: 1; }
  .menu-plateforme h3:nth-of-type(2), .menu-plateforme ul:nth-of-type(2) { grid-column: 2; }
  .menu-plateforme h3:nth-of-type(3), .menu-plateforme ul:nth-of-type(3) { grid-column: 3; }
}
.menu-plateforme__tout { grid-column: 1 / -1; display: flex !important; justify-content: space-between; align-items: center; border-top: var(--trame) solid var(--bordure); border-radius: 0 0 12px 12px !important; margin-top: var(--e-2); }
.barre__droite { gap: var(--e-3); }
.barre__droite .tel { color: var(--texte-doux); }
.tel { display: inline-flex; align-items: center; min-height: var(--cible); } /* chaque lien de téléphone est une cible de 44 px */
.barre__menu { display: none; }

/* ---------- Boutons : pilule, flèche dans une pastille (Urbi) ---------- */
.bouton { border-radius: 999px; padding: 6px 6px 6px 22px; gap: 14px; min-height: 52px; }
.bouton__fleche { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--sur-accent); color: var(--accent); flex: none; transition: transform 360ms var(--courbe-sortie); }
.bouton__fleche svg { width: 18px; height: 18px; }
.bouton:hover .bouton__fleche { transform: translateX(3px) rotate(-45deg); }
.bouton:hover svg { transform: none; }
.barre__droite { align-self: stretch; display: flex; align-items: center; }
.barre__droite .bouton {
  /* Pilule lime complète, collée au bord droit de la barre (un seul arrondi à droite). */
  align-self: center;
  min-height: calc(100% - 4px);
  height: calc(100% - 4px);
  margin-block: 0;
  margin-right: calc(-1 * var(--trame));
  padding: 4px 4px 4px 16px;
  gap: 10px;
  border-radius: 999px; /* quatre coins arrondis ; le droit se fond dans la pilule du menu */
  box-sizing: border-box;
}
.barre__droite .bouton .bouton__fleche { width: 34px; height: 34px; }
@media (max-width: 1024px) {
  .barre__droite { align-self: center; }
}
.bouton--clair { background: transparent; color: var(--texte); border-color: color-mix(in srgb, var(--texte) 30%, transparent); }
.bouton--clair .bouton__fleche { background: var(--texte); color: var(--fond); }

/* ---------- Ouverture : le cadre qui se resserre (Urbi) ---------- */
.ouverture { min-height: 0; height: 190svh; padding: 0; display: block; overflow: visible; background: transparent; isolation: auto; }
.ouverture__collant { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; overflow: clip; }
.ouverture__cadre { position: relative; width: calc(100% - 2 * var(--marge-panneau)); height: calc(100svh - 2 * var(--marge-panneau)); border-radius: var(--rayon-panneau); overflow: clip; isolation: isolate; background: var(--fond); color: var(--texte); display: grid; grid-template-rows: 1fr; transform: scale(calc(1 - var(--p, 0) * 0.33)); transform-origin: 50% 50%; will-change: transform; }
.ouverture__cadre .ouverture__corps { align-self: center; padding-top: var(--barre); }
.ouverture__chiffres { position: absolute; inset: 0; pointer-events: none; }
.ouverture__chiffre { position: absolute; width: clamp(150px, 13.5vw, 206px); padding: var(--e-4); background: var(--surface); color: var(--texte); border-radius: 18px; border: var(--trame) solid var(--bordure); display: grid; gap: 4px; }
/* Les durées glissent des côtés au défilement, seulement quand les animations sont permises. */
.js-mouvement .ouverture__chiffre { opacity: calc((var(--p, 0) - 0.52) * 4); transform: translateX(calc((1 - min(1, max(0, var(--p, 0) - 0.4) * 2.5)) * var(--depuis, 40px))); }
.ouverture__chiffre b { font-family: var(--police-titres); font-weight: var(--graisse-titres); font-size: clamp(1.5rem, calc(0.8rem + 1.4vw), 2.25rem); letter-spacing: -0.04em; line-height: 1; }
.ouverture__chiffre span { font-family: var(--police-interface); font-size: 0.875rem; color: var(--texte-doux); }
.ouverture__chiffre:nth-child(1) { left: calc(var(--marge-panneau) + 10px); top: 20%; --depuis: -60px; }
.ouverture__chiffre:nth-child(2) { left: calc(var(--marge-panneau) + 24px); bottom: 16%; --depuis: -60px; }
.ouverture__chiffre:nth-child(3) { right: calc(var(--marge-panneau) + 10px); top: 42%; --depuis: 60px; }
@media (max-width: 1024px) {
  .ouverture { height: auto; }
  .ouverture__collant { position: relative; height: auto; display: block; }
  .ouverture__cadre { transform: none; height: auto; min-height: calc(100svh - 2 * var(--marge-panneau)); margin: var(--marge-panneau) auto 0; }
  .ouverture__chiffres { position: relative; inset: auto; display: grid; grid-template-columns: 1fr 1fr; gap: var(--marge-panneau); padding: var(--marge-panneau); }
  .ouverture__chiffre, .ouverture__chiffre:nth-child(n) { position: relative; inset: auto; width: auto; opacity: 1; transform: none; }
}
/* Sans animation ou sans JavaScript : les trois durées en rangée sous le cadre (deux par rangée sous 1 024 px). */
.no-mouvement .ouverture, html:not(.js) .ouverture { height: auto; }
.no-mouvement .ouverture__collant, html:not(.js) .ouverture__collant { position: relative; height: auto; }
.no-mouvement .ouverture__cadre, html:not(.js) .ouverture__cadre { transform: none; }
.no-mouvement .ouverture__chiffres, html:not(.js) .ouverture__chiffres { position: relative; inset: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--marge-panneau); padding: var(--marge-panneau); }
.no-mouvement .ouverture__chiffre, .no-mouvement .ouverture__chiffre:nth-child(n), html:not(.js) .ouverture__chiffre, html:not(.js) .ouverture__chiffre:nth-child(n) { position: relative; inset: auto; width: auto; opacity: 1; transform: none; }
@media (max-width: 1024px) { .no-mouvement .ouverture__chiffres, html:not(.js) .ouverture__chiffres { grid-template-columns: 1fr 1fr; } }

/* ---------- Titres : mots masqués qui montent (Urbi, « split ») ---------- */
.mot-masque { display: inline-block; overflow: clip; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.js-mouvement [data-mots]:not([data-mots="defile"]) .mot { opacity: 1; transform: translateY(108%); transition: transform 1000ms var(--courbe-sortie); transition-delay: calc(var(--m, 0) * 45ms); }
.js-mouvement [data-mots].est-visible:not([data-mots="defile"]) .mot { transform: none; }

/* ---------- Cartes arrondies ---------- */
.calcul, .console, .protections, .indicateurs, .machines__noeuds, .fiche-dep { border-radius: var(--rayon); overflow: clip; }
.bulle, .brouillon, .sources li, .etampe { border-radius: 12px; }
.protections { gap: var(--e-3); background: transparent; border: 0; }
.protections li { border-radius: var(--rayon); border: var(--trame) solid var(--bordure); }
.dossiers li { border-radius: 0; }

/* ---------- Téléphone et tablette (jusqu’à 1 023 px) : bouton « Menu » et panneau (Urbi) ---------- */
@media (max-width: 1023px) {
  :root { --barre: 76px; }
  .barre { height: var(--barre); }
  .barre__rang { flex-wrap: nowrap; }
  .barre__nav, .barre__droite .tel, .barre__droite .bouton { display: none; }
  .barre__droite { margin-left: auto; }
  .barre__menu { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; margin-left: auto; border-radius: 999px; border: var(--trame) solid color-mix(in srgb, var(--texte) 30%, transparent); background: transparent; color: var(--texte); font-family: var(--police-interface); font-weight: var(--graisse-interface); cursor: pointer; }
  .barre.menu-ouvert .barre__nav { display: block; width: auto; position: fixed; inset: calc(var(--barre) + 4px) var(--marge-panneau) auto; max-height: calc(100svh - var(--barre) - 20px); overflow: auto; padding: var(--e-4); background: var(--surface); color: var(--texte); border-radius: 20px; border: var(--trame) solid var(--bordure); }
  .barre.menu-ouvert .barre__liens { flex-direction: column; align-items: stretch; }
  .barre.menu-ouvert .barre__liens > li > a, .barre.menu-ouvert .barre__deroulant > button { color: var(--texte); font-size: 1.25rem; min-height: 52px; justify-content: space-between; width: 100%; }
  .barre.menu-ouvert .menu-plateforme { position: static; transform: none; width: auto; grid-template-columns: 1fr; box-shadow: none; border: 0; padding: 0 0 var(--e-2); }
  .barre.menu-ouvert .menu-plateforme h3 { grid-row: auto; }
  .barre.menu-ouvert .barre__mobile-actions { display: grid; gap: var(--e-3); margin-top: var(--e-4); }
}
.barre__mobile-actions { display: none; }

/* ---------- Le lien « Plateforme » : un lien simple sans script, un bouton de menu avec script ---------- */
.barre__deroulant > button { display: none; }
.js .barre__deroulant > button { display: inline-flex; }
.js .barre__lien-plateforme { display: none; }

/* ---------- Le H à sphère, en grand, quand la toile ne tourne pas ---------- */
.ouverture__statique rect { fill: var(--jambage); }

/* ---------- La scène des départements : un panneau clair, un ton plus soutenu que la page (Mind Robotics) ---------- */
.panneau-clair { margin-inline: var(--marge-panneau); border-radius: var(--rayon-panneau); overflow: clip; background: color-mix(in srgb, var(--texte) 5%, var(--fond)); }
.panneau-clair .departements__plan .sol { fill: color-mix(in srgb, var(--texte) 5%, var(--fond)); }

/* ---------- Le pied : le nom géant au H à sphère, et le bouton du jeu ---------- */
.pied__signe { position: relative; }
.pied__signe .jeu-ouvrir { position: absolute; right: var(--gouttiere); top: var(--e-6); z-index: 1; }
/* Le logo géant du pied, rogné par le bas du panneau ; le bouton du jeu garde sa place à droite. */
.pied__marque .logo { font-size: clamp(3.5rem, 20vw, 22rem); margin-bottom: -0.16em; }
@media (max-width: 1023px) { .pied__signe .jeu-ouvrir, .pied__signe .jeu-annonce { position: static; margin: var(--e-4) var(--gouttiere) 0; } .pied__signe .jeu-annonce { text-align: left; max-width: none; } }

/* ---------- Petits écrans : le bouton tient dans 320 px ---------- */
@media (max-width: 380px) { .bouton { padding-left: 16px; gap: 10px; font-size: var(--t-s); } .bouton__fleche { width: 34px; height: 34px; } }

/* ---------- Les trois temps de l'appel : des cases, sans fond gris avant leur entrée ---------- */
.appel__etapes { gap: var(--e-3); background: transparent; border: 0; }
.appel__etapes li { border: var(--trame) solid color-mix(in srgb, var(--texte) 16%, transparent); border-radius: var(--rayon); padding: var(--e-6) !important; }

/* ---------- Mettre les animations en pause ---------- */
.bascule-mouvement { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: var(--trame) solid color-mix(in srgb, var(--texte) 26%, transparent); background: transparent; color: var(--texte-doux); font-family: var(--police-interface); font-size: 0.75rem; cursor: pointer; }
.bascule-mouvement svg { width: 12px; height: 12px; }
.tete-page .bascule-mouvement { margin-top: var(--e-6); justify-self: start; grid-column: 1 / -1; }
.bascule-mouvement:hover { color: var(--texte); border-color: var(--texte); }
.bascule-mouvement[aria-pressed="true"] svg path { d: path("M4 3l9 5-9 5z"); fill: currentColor; stroke: none; }
.ouverture__cadre > .bascule-mouvement { position: absolute; left: var(--gouttiere); bottom: var(--e-4); z-index: 2; }
.pause-mouvement *, .pause-mouvement *::before, .pause-mouvement *::after { animation-play-state: paused !important; }

/* ---------- Un bouton sans flèche garde des marges égales ---------- */
.bouton:not(:has(.bouton__fleche)) { padding: 6px 22px; }

/* ---------- Le haut des pages intérieures : un panneau sombre, comme le cadre de l’accueil ---------- */
.tete-page { margin-top: var(--marge-panneau); background: var(--fond); color: var(--texte); }

/* ---------- Le sommaire des pages intérieures : une seconde barre flottante, claire et arrondie, sous celle du haut ---------- */
.sommaire.jour { top: calc(var(--barre) + 2px); margin: var(--marge-panneau) var(--marge-panneau) 0; border: var(--trame) solid color-mix(in srgb, var(--texte) 12%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--fond) 94%, transparent); box-shadow: 0 8px 30px color-mix(in srgb, var(--texte) 10%, transparent); color: var(--texte); }
.sommaire.jour ol { width: 100%; padding-inline: clamp(8px, 1.2vw, 18px); }

/* ---------- Six pages dans la barre (Plateforme, Solution, Infrastructure privée, Diagnostic, Contact) ---------- */
.barre__liens > li > a, .barre__deroulant > button { white-space: nowrap; }
@media (max-width: 1279px) { .barre__droite .tel { display: none; } .barre__liens > li > a, .barre__deroulant > button { padding: 0 10px; } }

/* Sans script, la barre ne flotte pas : elle garde un fond sombre pour rester lisible sur les sections claires. */
html:not(.js) .barre__rang { background: color-mix(in srgb, var(--fond) 97%, transparent); border-color: color-mix(in srgb, var(--texte) 14%, transparent); }
