/* Panorama : sélection d'entreprise et identité persistante. */
/* Navigation : structure constante, repères propres à chaque entreprise. */
:root { --largeur-menu: 276px; }
.cadre { background: var(--fond); }
.menu-panorama {
  --nuit: #142821; --nuit-2: #223b31; --nuit-3: #314b3d;
  --nuit-texte: #dce6df; --nuit-titre: #98afa1; --nuit-trait: #385044;
  --identite-menu-texte-selection: #e2f4a6;
  background: #142821; color: #dce6df; overflow: hidden;
  border-right: 1px solid #294237; scrollbar-width: thin;
}
.nav-marque { display: flex; align-items: center; gap: 12px; min-height: 96px; padding: 24px 22px; color: #f5f8f1; text-decoration: none; flex: none; }
.nav-marque:hover { color: #fff; }
.nav-embleme { position: relative; display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px 11px 11px 3px; color: #172b23; background: #d7ef88; font-size: 28px; font-weight: 800; line-height: 1; flex: none; }
.nav-embleme > span { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #142821; right: 4px; top: 4px; }
.nav-marque-texte strong { display: block; font-size: 16px; letter-spacing: .7px; line-height: 1.3; }
.nav-marque-texte em { color: #d7ef88; font-style: normal; }
.nav-marque-texte small { display: block; color: #a8bdaf; font-size: 10px; letter-spacing: .2px; margin-top: 3px; }
.menu-panorama .menu-corps { min-height: 0; overflow-y: auto; padding: 0 15px 22px; scrollbar-width: thin; scrollbar-color: #385044 transparent; }
.menu-panorama .nav-repere, .menu-panorama .menu-titre { color: #98afa1; text-transform: uppercase; font-size: 9px; letter-spacing: 1.7px; font-weight: 600; margin: 16px 12px 10px; }
.menu-panorama .nav-repere:first-child { margin-top: 2px; }
.menu-panorama .nav-repere-activite { margin-top: 23px; }
.menu-panorama .menu-liste { gap: 4px; }
.menu-panorama .lien-menu { min-height: 43px; border-radius: 10px; font-size: 13px; font-weight: 500; padding: 10px 12px; gap: 12px; color: #dce6df; border: 1px solid transparent; transition: color 160ms, background 160ms, border-color 160ms, transform 160ms; }
.menu-panorama .lien-menu > svg { width: 18px; height: 18px; color: #9fb8a9; }
.menu-panorama .lien-menu:hover { color: #fff; background: #213b30; border-color: #365143; transform: translateX(2px); }
.menu-panorama .lien-menu.active { background: #d7ef88; color: #182d23; border-color: #d7ef88; font-weight: 700; }
.menu-panorama .lien-menu.active > svg:first-child { color: #182d23; }
.menu-panorama .lien-menu.active::before { display: none; }
.menu-panorama .sous-menu { margin: 7px 0 10px 21px; padding-left: 13px; border-color: #385044; gap: 3px; }
.menu-panorama .sous-menu a { color: #bbcec0; font-size: 12px; padding: 9px; line-height: 1.45; }
.menu-panorama .sous-menu a:hover, .menu-panorama .sous-menu a.active { color: #eff7e5; background: #2a4336; }
.menu-panorama .sous-menu a.active { box-shadow: inset 2px 0 #d7ef88; }
.menu-panorama .lien-menu span { white-space: normal; overflow: visible; }
.menu-panorama .compteur { background: #d7ef88; color: #182d23; }
.menu-panorama :focus-visible { outline: 2px solid #d7ef88; outline-offset: 2px; }
.menu-panorama .lien-menu.active:focus-visible, .menu-panorama .nav-panorama.active:focus-visible { outline-color: #fff; }
.menu-panorama .nav-repere-espaces { margin-top: 23px; }
.nav-espaces { margin-top: 6px; padding-top: 5px; }
.nav-espaces > summary { display: flex; align-items: center; gap: 9px; padding: 0 12px 10px; cursor: pointer; list-style: none; color: #e6eee5; font-size: 12px; font-weight: 650; }
.nav-espaces > summary::-webkit-details-marker { display: none; }
.nav-espaces > summary > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 11px; line-height: 1.5; }
.nav-espaces .nav-nombre { display: grid; place-items: center; min-width: 20px; height: 20px; background: #2c4538; color: #d8e8d5; font-size: 10px; border-radius: 6px; }
.nav-espaces svg { fill: none; stroke: currentColor; stroke-width: 1.6; width: 15px; height: 15px; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav-espaces .chevron { width: 14px; color: #a2b8a9; transition: transform 180ms ease; }
.nav-espaces[open] > summary .chevron { transform: rotate(180deg); }
.nav-espaces[open] .nav-espaces-contenu { animation: nav-apparaitre 180ms ease both; }
.nav-panorama { display: flex; gap: 9px; align-items: center; padding: 12px 11px; margin-bottom: 6px; border: 1px solid #456047; background: #263e2e; border-radius: 9px; color: #d7ef88; font-size: 12px; text-decoration: none; font-weight: 600; }
.nav-panorama svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; flex: none; }
.nav-panorama > span:nth-child(2) { flex: 1; }
.nav-panorama:hover { color: #e9ffb0; background: #354f35; }
.nav-panorama.active { background: #d7ef88; border-color: #d7ef88; color: #182d23; }
.nav-entreprise { display: flex; align-items: center; gap: 9px; min-height: 51px; margin: 3px 0; padding: 7px 8px; border: 1px solid transparent; border-radius: 10px; color: #e8eee7; text-decoration: none; transition: background 160ms, border-color 160ms, transform 160ms; }
.nav-entreprise:hover { color: #fff; background: #223d30; border-color: #365143; transform: translateX(2px); }
.nav-entreprise.active { background: #2a4333; border-color: #648147; color: #f0f8e5; }
.nav-avatar { display: grid; place-items: center; width: 31px; height: 33px; border-radius: 8px; flex: none; font-size: 11px; font-weight: 750; letter-spacing: -.4px; background: var(--entreprise-couleur); color: var(--entreprise-texte); border: 1px solid #ffffff35; box-shadow: 0 2px 8px #081c2426; }
.nav-entreprise-texte { min-width: 0; flex: 1; }
.nav-entreprise-texte strong { display: block; font-size: 11px; line-height: 1.4; letter-spacing: .1px; font-weight: 650; overflow-wrap: anywhere; }
.nav-entreprise-texte small { display: block; color: #a5bcac; font-size: 10px; line-height: 1.4; margin-top: 2px; }
.nav-selection { color: #d7ef88; font-size: 12px; }
.nav-gestion { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 0; }
.nav-gestion:empty { display: none; }
.nav-gestion a { display: flex; align-items: center; gap: 4px; color: #a5bcac; font-size: 10px; text-decoration: none; padding: 5px 0; }
.nav-gestion a:hover, .nav-gestion a.active { color: #d7ef88; }
.nav-signature { display: flex; align-items: center; gap: 10px; padding: 18px 24px; margin-top: auto; flex: none; border-top: 1px solid #31493c; color: #a3b9aa; font-size: 9px; }
.nav-signature strong { display: block; color: #e1ecdd; font-size: 10px; margin-top: 3px; font-weight: 500; }
.nav-signature > span:last-child { margin-left: auto; font-size: 16px; color: #9db583; letter-spacing: -1px; }
.nav-signature-trait { width: 3px; height: 24px; background: #d7ef88; border-radius: 3px; }
.menu-panorama .menu-fermer { color: #e5efdf; }
@keyframes nav-apparaitre { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
@media (max-width: 960px) { .menu-panorama .nav-marque { padding-right: 58px; } }
@media (prefers-reduced-motion: reduce) { .menu-panorama *, .menu-panorama *::before { animation: none !important; transition: none !important; } }
.panorama {
  --pan-fond: light-dark(#f4f3ee, #171b1b);
  --pan-papier: light-dark(#fffefa, #242b27);
  --pan-encre: light-dark(#242d2a, #eff2ec);
  --pan-gris: light-dark(#657168, #b3bdb6);
  --pan-trait: light-dark(#d9dfd7, #3a443e);
  --pan-nuit: #202c27; --pan-citron: #d7ef88;
  color: var(--pan-encre); background: var(--pan-fond);
  border: 1px solid var(--pan-trait); border-radius: 20px; overflow: hidden;
}
.panorama *, .panorama *::before, .panorama *::after { box-sizing: border-box; }
.panorama [hidden] { display: none !important; }
.panorama a, .panorama button { -webkit-tap-highlight-color: transparent; }
.panorama a:focus-visible, .panorama button:focus-visible { outline: 3px solid var(--pan-encre); outline-offset: -4px; }
.panorama-panneau[data-selection="true"] :focus-visible, .panorama-entete :focus-visible { outline-color: var(--pan-citron); }
.panorama svg, .panorama-contexte svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; width: 20px; height: 20px; }
.panorama-barre-titre { font-weight: 650; }
.panorama-entete { padding: 21px 26px; background: var(--pan-nuit); color: #fbfdf7; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panorama-marque { display: flex; align-items: center; gap: 11px; font-size: 16px; font-weight: 700; text-decoration: none; color: #fbfdf7; }
.panorama-marque:hover, .panorama-groupe:hover { color: #fff; }
.panorama-marque > span { display: grid; place-items: center; width: 37px; height: 34px; background: var(--pan-citron); color: var(--pan-nuit); border-radius: 3px 12px 3px 3px; font-size: 24px; font-weight: 800; }
.panorama-groupe { color: #fbfdf7; text-decoration: none; font-size: 12px; padding: 9px 12px; border: 1px solid #63716a; border-radius: 7px; }
.panorama-corps { padding: 28px; container-type: inline-size; }
.panorama-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.panorama-surtitre { font-size: 10px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--pan-gris); font-weight: 650; margin-bottom: 10px; }
.panorama h1 { font-size: clamp(28px, 3.4vw, 36px); letter-spacing: -1px; line-height: 1.1; }
.panorama h1 span { color: var(--pan-gris); font-weight: 400; }
.panorama-intro-aide { font-size: 12px; color: var(--pan-gris); margin: 0 0 3px; max-width: 220px; }
.panorama-legende { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.panorama-legende h2 { font-size: 12px; }
.panorama-legende > span { color: var(--pan-gris); font-size: 11px; }
.panorama-panneaux { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.panorama-panneau { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--pan-trait); border-radius: 13px; overflow: hidden; color: var(--pan-encre); background: var(--pan-papier); background: color-mix(in srgb, var(--pan-couleur) 10%, var(--pan-papier)); transition: background 200ms ease, color 200ms ease; }
.panorama-panneau[data-selection="true"] { color: var(--pan-sur-couleur); background: var(--pan-couleur); border-color: var(--pan-couleur); }
.panorama-choix { display: flex; flex-direction: column; text-align: left; width: 100%; flex: 1; gap: 0; color: inherit; border: 0; background: transparent; padding: 17px 15px; font: inherit; cursor: pointer; }
.panorama-choix:disabled { opacity: 1; cursor: default; }
.panorama-repere { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; letter-spacing: .6px; }
.panorama-repere > span { opacity: .8; }
.panorama-monogramme { display: grid; place-items: center; position: relative; isolation: isolate; flex: 1; min-height: 150px; font-family: var(--police-titres); font-size: 49px; font-weight: 750; letter-spacing: -3px; transition: transform 220ms ease; }
.panorama-monogramme::before { content: ''; position: absolute; width: 78px; height: 100px; border: 1px solid currentColor; opacity: .2; border-radius: 42px 42px 6px 6px; transform: rotate(-8deg); z-index: -1; }
.panorama-panneau:nth-child(5n + 2) .panorama-monogramme::before { border-radius: 5px 5px 38px 38px; transform: rotate(7deg); }
.panorama-panneau:nth-child(5n + 3) .panorama-monogramme::before { height: 79px; border-radius: 5px; transform: rotate(45deg); }
.panorama-panneau:nth-child(5n + 4) .panorama-monogramme::before { height: 84px; width: 84px; border-radius: 50%; transform: none; }
.panorama-panneau:nth-child(5n + 5) .panorama-monogramme::before { height: 80px; border-radius: 5px; }
.panorama-choix:not(:disabled):hover .panorama-monogramme { transform: translateY(-4px); }
.panorama-nom { display: block; font-size: 14px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; margin-top: 12px; }
.panorama-secteur { display: block; font-size: 11px; line-height: 1.4; margin-top: 7px; }
.panorama-secteur small { display: block; font-size: 11px; margin-top: 4px; }
.panorama-etat { display: none; font-size: 11px; justify-content: space-between; align-items: center; gap: 8px; margin-top: 20px; }
[data-panorama-pret] .panorama-etat { display: flex; }
.panorama-acces { padding: 0 15px 15px; margin-top: auto; }
.panorama-acces a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; min-height: 44px; background: var(--pan-citron); color: #202c27; font-size: 12px; font-weight: 650; text-decoration: none; border-radius: 7px; }
.panorama-acces a:hover { background: #e2f6a8; color: #202c27; }
.panorama-panneau[data-selection="true"] .panorama-acces a:focus-visible { outline-color: #202c27; }
.panorama-pied { display: flex; justify-content: space-between; align-items: center; gap: 15px; flex-wrap: wrap; border-top: 1px solid var(--pan-trait); padding-top: 15px; margin-top: 18px; font-size: 11px; }
.panorama-pied p { margin: 0; color: var(--pan-gris); overflow-wrap: anywhere; }
.panorama-pied a { color: var(--pan-encre); }
.panorama-vide { padding: 22px 0; }
.panorama-vide h2 { margin-bottom: 10px; }
.panorama-vide p { color: var(--pan-gris); }
/* En dessous de 850px disponibles, les noms restent entiers en accordéon vertical. */
[data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) { display: flex; flex-direction: column; }
[data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-choix { display: grid; grid-template-columns: 31px minmax(0, 1fr) 20px; column-gap: 12px; row-gap: 4px; }
[data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-repere { grid-column: 1; grid-row: 1 / 3; justify-content: center; }
[data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-repere > span { display: none; }
[data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-monogramme { display: none; }
[data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-nom { grid-column: 2; margin: 0; }
[data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-secteur { grid-column: 2; margin: 0; }
[data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-etat { grid-column: 3; grid-row: 1 / 3; margin: 0; }
[data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) [data-panorama-etat] { display: none; }
[data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-acces { padding-left: 58px; }
@container (min-width: 850px) {
  [data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) { display: grid; grid-template-columns: var(--pan-colonnes); transition: grid-template-columns 220ms ease; }
  [data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-panneau { min-height: 405px; }
  [data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-choix { display: flex; }
  [data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-repere { justify-content: space-between; }
  [data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-repere > span { display: inline; }
  [data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-monogramme { display: grid; }
  [data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-nom { margin-top: 13px; min-height: 52px; font-size: 13px; letter-spacing: -.15px; }
  [data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-secteur { margin-top: 7px; min-height: 32px; }
  [data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-etat { margin-top: 18px; }
  [data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) [data-panorama-etat] { display: inline; }
  [data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) .panorama-acces { padding: 0 15px 15px; }
  [data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) [data-selection="true"] .panorama-nom { font-size: 23px; line-height: 1.13; min-height: 0; }
  [data-panorama-pret] .panorama-panneaux:not(.panorama-panneaux--grille) [data-selection="true"] .panorama-monogramme { font-size: 65px; min-height: 110px; }
}
/* Le périmètre affiché vient de la vue Django, jamais du choix local dans le panorama. */
.panorama-contexte { display: flex; align-items: center; gap: 14px; margin: 0 0 24px; padding: 18px 22px; background: var(--pan-couleur); color: var(--pan-sur-couleur); border-radius: 12px; }
.panorama-contexte-icone { height: 42px; width: 42px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 10px; flex: none; }
.panorama-contexte-nom { flex: 1; min-width: 0; }
.panorama-contexte-nom small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
.panorama-contexte-nom strong { display: block; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.panorama-contexte-nom > span { display: block; font-size: 12px; }
.panorama-changer { color: inherit; font-size: 12px; text-decoration: none; border: 1px solid currentColor; border-radius: 7px; padding: 9px 12px; }
.panorama-changer:hover { color: inherit; text-decoration: underline; }
.panorama-contexte :focus-visible { outline-color: currentColor; }
@media (max-width: 600px) {
  .panorama-entete { padding: 18px; flex-wrap: wrap; gap: 15px; }
  .panorama-corps { padding: 21px 15px; }
  .panorama-intro { display: block; }
  .panorama-intro-aide { margin-top: 14px; max-width: none; }
  .panorama-legende > span { display: none; }
  .panorama-nom { font-size: 13px; }
  .panorama-choix { padding: 15px 12px; }
  .panorama-contexte { padding: 16px; flex-wrap: wrap; gap: 12px; }
  .panorama-changer { margin-left: 54px; }
}
@media (prefers-reduced-motion: reduce) { .panorama *, .panorama *::before { transition: none !important; } }
@media print { .panorama-changer { display: none; } .panorama-contexte { background: transparent; color: #000; border: 1px solid #999; break-inside: avoid; } }
