/* LA COQUE COMMUNE, SUITE (29/11/2026, coque 2) · chargée en dernier. L'en-tête unique, l'alerte sous le titre, « À valider » à une
   seule place et d'une seule forme, le rail de l'iPad sans libellé coupé. Voir studio-coque.js. */

/* ── l'en-tête unique : pastille, titre, sous-titre, recherche, une action blanche ── */
html body.s3 #view header.s3-hd{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;justify-content:flex-start!important;text-align:left!important;position:relative;gap:12px 16px!important;grid-template-columns:none!important;margin:0 0 20px!important;padding:0!important;min-height:48px!important;height:auto!important;background:none!important;border:0!important;box-shadow:none!important;width:auto!important;max-width:none!important;grid-column:1/-1;order:-3!important}
html body.s3 #view .s3-hd-pa{flex:none;width:44px;height:44px;border-radius:14px;display:grid;place-items:center;color:var(--s3-sig);background:color-mix(in srgb,var(--s3-sig) 13%,rgba(255,255,255,.03));border:1px solid color-mix(in srgb,var(--s3-sig) 30%,transparent)}
html body.s3 #view .s3-hd-pa svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
html body.s3 #view .s3-hd-t{flex:1 1 200px;min-width:0;display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center;gap:3px;margin:0!important;padding:0!important}
html body.s3 #view .s3-hd-t>h1{font-size:24px!important;line-height:1.15!important;margin:0!important;padding:0!important;font-weight:650!important;letter-spacing:-.02em!important;color:#f3f3f6!important;white-space:nowrap!important;max-width:100%}
html body.s3 #view .s3-hd-t>h1>span:not(.m-mot):not(.m-ch){display:inline}
html body.s3 #view .s3-hd-s{display:block!important;margin:0!important;padding:0!important;font-size:13px!important;line-height:1.35!important;font-weight:400!important;color:rgba(243,243,246,.62)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:100%!important}
html body.s3 #view .s3-hd-a{flex:none;display:flex!important;align-items:center!important;gap:8px!important;margin:0 0 0 auto!important;padding:0!important;min-width:0}
html body.s3 #view .s3-hd-x{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;margin:0;padding:0}
html body.s3 #view .s3-hd-x:not(:has(> :not([hidden]))){display:none}
html body.s3 #view .s3-hd-cache{display:none!important}

/* la recherche : le même champ de verre partout (« Chercher dans <appli> ») */
html body.s3 #view .s3-hd-q,html body.s3 #view .s3-hd-q:has(> label)>label{box-sizing:border-box!important;display:flex!important;align-items:center!important;gap:8px!important;height:44px!important;min-height:44px!important;width:260px!important;max-width:100%!important;margin:0!important;padding:0 14px!important;border-radius:14px!important;background:rgba(255,255,255,.045)!important;border:1px solid rgba(255,255,255,.14)!important;box-shadow:none!important;color:rgba(243,243,246,.6)!important;font-size:14px!important;font-weight:400!important;text-align:left!important;cursor:text;position:relative}
html body.s3 #view .s3-hd-q:has(> label){display:block!important;padding:0!important;background:none!important;border:0!important;height:auto!important;min-height:0!important}
html body.s3 #view .s3-hd-q:has(> label)>label{width:100%!important}
html body.s3 #view button.s3-hd-q{cursor:pointer}
html body.s3 #view .s3-hd-q svg{flex:none;width:16px!important;height:16px!important;fill:none;stroke:currentColor;stroke-width:1.9;opacity:.8;position:static!important}
html body.s3 #view .s3-hd-q input{flex:1 1 auto!important;min-width:0!important;width:100%!important;height:100%!important;margin:0!important;padding:0!important;border:0!important;outline:0!important;background:none!important;box-shadow:none!important;color:#f3f3f6!important;font-size:14px!important;position:static!important}
html body.s3 #view .s3-hd-q input::placeholder{color:rgba(243,243,246,.5)}
html body.s3 #view .s3-hd-q:focus-within{border-color:rgba(255,255,255,.3)!important}
html body.s3 #view .s3-hd-q>span:not([class]){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body.s3 #view .s3-hd[data-app="mails"] .s3-hd-q{width:420px!important}
html body.s3 #view .s3-hd[data-app="mails"] .s3-hd-q .mq-qi{display:grid;place-items:center}

/* l'action principale : un seul bouton blanc */
html body.s3 #view .s3-hd-pe{flex:none;margin:0!important;position:relative}
html body.s3 #view .s3-hd-a .s3-hd-b,html body.s3 #view .s3-hd-a .s3-hd-b.s3-hd-b{box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;height:44px!important;min-height:44px!important;width:auto!important;margin:0!important;padding:0 18px!important;border-radius:14px!important;border:0!important;background:#fff!important;color:#0b0c10!important;font-size:14px!important;font-weight:600!important;line-height:1!important;letter-spacing:0!important;white-space:nowrap!important;box-shadow:none!important;text-decoration:none!important}
html body.s3 #view .s3-hd-a .s3-hd-b:hover{background:#e9eaee!important}
html body.s3 #view .s3-hd-a .s3-hd-b svg{width:16px!important;height:16px!important;fill:none;stroke:currentColor!important;stroke-width:2.1}
html body.s3 #view .s3-hd-a .s3-hd-b *{color:inherit!important}
/* tout autre bouton resté dans l'en-tête est gris (une seule action blanche par écran) */
html body.s3 #view header.s3-hd button:not(.s3-hd-b):not(.s3-hd-q):not([class*="seg"] button):not([role=tab]).blanc,
html body.s3 #view header.s3-hd .s3-hd-x button.pri,html body.s3 #view header.s3-hd .s3-hd-x button.oui{background:rgba(255,255,255,.06)!important;color:#f3f3f6!important}
/* Mails : « Nouveau message » passe dans l'en-tête ; la barre garde ses dossiers */
html body.s3:has(#view .s3-hd[data-app="mails"]) #stuSide .mq-nv{display:none!important}

/* ── l'alerte, toujours juste sous le titre ── */
html body.s3 #view .s3-alerte{grid-column:1/-1;margin-top:0!important;order:-2!important}

/* ── « À valider » : en haut, pleine largeur, sous l'en-tête ; 3 lignes puis « Tout voir (N) » ; caché à 0 ── */
html body.s3 #view section.s3-ov.s3-ov-haut{grid-column:1/-1!important;grid-row:auto!important;order:-1!important;align-self:stretch!important;width:auto!important;max-width:none!important;height:auto!important;min-height:0!important;max-height:none!important;position:static!important;margin:0 0 20px!important;flex:none!important}
html body.s3 #view section.s3-ov[hidden]{display:none!important}
html body.s3 #view .s3-vide,html body.s3 #view .s3-ov-double{display:none!important}
html body .s3-ov .s3-ovr .s3-ovq{flex:1 1 auto;min-width:0}
html body .s3-ove{min-height:36px;min-width:74px;margin:0;padding:0 16px;border-radius:18px;border:1px solid rgba(255,255,255,.14);background:none;color:rgba(243,243,246,.78);font:600 14px/1 var(--a3-f,system-ui);cursor:pointer}
html body .s3-ove:hover{background:rgba(255,255,255,.06);color:#f3f3f6}
html body .s3-ovg{display:flex;align-items:center;gap:8px;flex:none}
@media (pointer:coarse){html body .s3-ove{min-height:44px}}
/* l'état vide qui a quelque chose à dire (Demandes) : une ligne, sans cadre */
html body section.s3-ov.s3-ov.s3-ov-vide{padding:0!important;background:none!important;border:0!important}
html body .s3-ovz{display:flex;align-items:center;gap:10px;margin:0;font-size:14px;color:rgba(243,243,246,.72)}
html body .s3-ovz i{width:28px;height:28px;flex:none;border-radius:14px;display:grid;place-items:center;background:rgba(48,209,88,.14);color:#30d158}
html body .s3-ovz svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
html body .s3-ovk{margin-left:auto;height:36px;padding:0 4px;border:0;background:none;color:#f3f3f6;font:500 14px/1 var(--a3-f,system-ui);cursor:pointer;white-space:nowrap}
html body .s3-ovk:hover{text-decoration:underline}
/* Mails : la carte du volet de lecture laisse la place à celle du haut */
html body.s3 #mqV .s3-ov{display:none!important}

/* ── iPhone : l'en-tête sur deux rangées, la recherche prend la largeur, l'action garde son texte ── */
@media (max-width:760px){
  html body.s3 #view header.s3-hd{gap:10px 12px!important;margin-bottom:16px!important}
  html body.s3 #view .s3-hd-pa{width:40px;height:40px;border-radius:12px}
  html body.s3 #view .s3-hd-pa svg{width:20px;height:20px}
  html body.s3 #view .s3-hd-t{flex:1 1 0}
  html body.s3 #view .s3-hd-a{flex:1 1 100%;margin:0!important;flex-wrap:wrap!important}
  html body.s3 #view .s3-hd-q,html body.s3 #view .s3-hd[data-app="mails"] .s3-hd-q{flex:1 1 0;width:auto!important;min-width:0;order:0!important}
  html body.s3 #view .s3-hd-pe,html body.s3 #view .s3-hd-a>.s3-hd-b{flex:1 1 100%!important;order:1!important}
  html body.s3 #view span.s3-hd-pe,html body.s3 #view div.s3-hd-pe{display:flex!important}
  html body.s3 #view .s3-hd-pe>.s3-hd-b{flex:1 1 auto!important;max-width:none!important;justify-content:center!important}
  html body.s3 #view .s3-hd-pe>.s3-hd-b,html body.s3 #view .s3-hd-a>.s3-hd-b{width:100%!important}
  html body.s3 #view .s3-hd-pa{align-self:center!important;margin:0!important}
  html body.s3 #mq:has(> .s3-hd) .mq-fab{display:none!important}
  html body.s3 #view .s3-hd-q input{font-size:16px!important}
  html body.s3 #view .s3-hd-a .s3-hd-b{padding:0 14px!important}
  html body.s3 #view .s3-hd-s{font-size:13px!important}
  html body.s3 #view section.s3-ov.s3-ov-haut{margin-bottom:16px!important}
}
@media (min-width:761px) and (max-width:1180px){
  html body.s3 #view .s3-hd-q{width:220px!important}
  html body.s3 #view .s3-hd[data-app="mails"] .s3-hd-q{width:300px!important}
}

/* ── le rail de l'iPad (charte 15) : boutons de la largeur du rail, libellé court jamais coupé ── */
html body .stu-side .ecx-nav>button[data-mo] .s3-mc{display:none}
@media (min-width:861px) and (max-width:1180px){
  html body.stu-on.lin.rail-on .stu-side[data-mode="projet"] .ecx-nav>button[data-mo]:not(.lin-retour),
  html body.stu-on.lin.rail-on .stu-side[data-mode="projet"] .ecx-nav>button.s3-mpl{box-sizing:border-box!important;width:100%!important;max-width:none!important;min-height:58px!important;margin:0 0 2px!important;padding:8px 0 6px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;overflow:visible!important;border-radius:14px!important;position:relative!important}
  html body.stu-on.lin.rail-on .stu-side[data-mode="projet"] .ecx-nav>button[data-mo]:not(.lin-retour)>span.stu-long{display:none!important}
  html body.stu-on.lin.rail-on .stu-side[data-mode="projet"] .ecx-nav>button[data-mo]:not(.lin-retour)>span.s3-mc{display:block!important;max-width:100%!important;overflow:visible!important;text-overflow:clip!important;white-space:nowrap!important;font-size:11.5px!important;line-height:1.1!important;letter-spacing:-.02em!important;text-align:center}
  html body.stu-on.lin.rail-on .stu-side[data-mode="projet"] .ecx-nav>button.s3-mpl>span.stu-long{display:block!important;max-width:100%!important;overflow:visible!important;text-overflow:clip!important;font-size:11.5px!important}
  html body.stu-on.lin.rail-on .stu-side[data-mode="projet"] .ecx-nav>button[data-mo]:not(.lin-retour)>.ecx-nb{position:absolute;top:4px;right:8px}
  html body.stu-on.lin.rail-on .stu-side[data-mode="projet"] .ecx-nav>button.lin-retour{width:100%!important;max-width:none!important;box-sizing:border-box!important}
  html body.stu-on.lin.verre.stu2.s3 .stu-side{padding-left:6px!important;padding-right:6px!important}
}

/* ── les places laissées par la carte : la rangée se referme (Finance : le lien du Journal passe au-dessus des échéances) ── */
html body.s3 #view .fnx-r1:has(> .fnx-avw:not(:has(.s3-ov))){grid-template-columns:minmax(0,1fr)}
html body.s3 #view .fnx-avw:not(:has(.s3-ov))>.fnx-avj{align-self:flex-end}

/* Mails : le crayon rond du téléphone double « Nouveau message » du bandeau */
html body.s3 #mq header.s3-hd .mq-nvt{display:none!important}

/* Mails sur le rail de l'iPad : même forme que les autres applis (icône au-dessus, libellé court entier, largeur du rail) */
@media (min-width:861px) and (max-width:1180px){
  html body.s3[data-page="mails"] #stuSide.stu-side[data-mode="projet"] .ecx-nav>button[data-mo].mq-dos:not(.lin-retour){box-sizing:border-box!important;width:100%!important;max-width:none!important;height:auto!important;min-height:58px!important;margin:0 0 2px!important;padding:8px 0 6px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;overflow:visible!important}
  html body.s3[data-page="mails"] #stuSide.stu-side[data-mode="projet"] .ecx-nav>button[data-mo].mq-dos:not(.lin-retour)>span.s3-mc{display:block!important;max-width:100%!important;overflow:visible!important;text-overflow:clip!important;white-space:nowrap!important;font-size:11px!important;line-height:1.1!important;letter-spacing:-.03em!important;text-align:center}
  html body.s3[data-page="mails"] #stuSide.stu-side[data-mode="projet"] .ecx-nav>button[data-mo].mq-dos:not(.lin-retour)>.ecx-nb{top:3px!important;left:auto!important;right:6px!important}
}
/* 29/11 (coque 3) · règle 15 : les puces des sous-pages collées sous l'en-tête (et l'alerte), avant « À valider » ; les applis en flex
   ou en grille gardent cet ordre (la carte est à order:-1, les puces la précèdent dans le document au même rang) */
html body.s3 #view .s3-puces{order:-1!important;grid-row:auto!important;grid-column:1/-1!important}
