/* =====================================================================
   Extranet v2 — Widgets du tableau de bord : météo, aujourd'hui, bloc-note
   ===================================================================== */

/* ---------- Grille d'accueil : colonnes de même hauteur, sans trou ---------- */
.duo-home { gap: 16px; align-items: stretch; }
.duo-home > * { display: flex; flex-direction: column; min-height: 0; }
.duo-home > * > * { flex: 1; min-height: 0; }
/* Édito large à gauche (2 lignes) ; à droite, « À venir » et « Aujourd'hui chez DUO » gardent chacun leur hauteur naturelle
   (pas de scrollbar interne) et l'édito s'étire pour égaler leur somme ;
   en dessous, bloc-note et tutoriels côte à côte, puis le Fil sur toute la largeur */
.duo-home { grid-auto-flow: row dense; }
.duo-home__edito     { grid-column: 1 / span 8; grid-row: 1 / span 2; }
.duo-home__side      { grid-column: 9 / span 4; grid-row: 1 / span 2; gap: 16px; }
.duo-home__side > div { flex: 0 0 auto; min-height: 200px; display: flex; flex-direction: column; }
.duo-home__side > div > * { flex: 1; }
.duo-home__savoir    { grid-column: 1 / span 6; grid-row: 4; }
.duo-home__merci     { grid-column: 7 / span 3; grid-row: 4; }
.duo-home__sondage   { grid-column: 10 / span 3; grid-row: 4; }
.duo-home__activite  { grid-column: 1 / span 4; grid-row: 5; }
.duo-home__note      { grid-column: 5 / span 4; grid-row: 5; }
.duo-home__tutos     { grid-column: 9 / span 4; grid-row: 5; }
.duo-home__fil       { grid-column: 1 / -1; grid-row: 3; }
@media (max-width: 1280px) {
  .duo-home__edito  { grid-column: 1 / span 7; }
  .duo-home__side   { grid-column: 8 / span 5; }
}
@media (max-width: 860px) {
  .duo-home > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
}

/* Édito : s'étire pour égaler la hauteur d'« À venir » + « Aujourd'hui chez DUO » (les anciens éditos gardent une bande fixe et réduite) */
body.duo-v2 .duo-home__edito #edito-wrapper { display: flex; flex-direction: column; flex: 1; min-height: 360px; overflow: hidden; }
body.duo-v2 .duo-home__edito .edito-content { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--duo-plum-50); }
body.duo-v2 .duo-home__edito .edito-content > a, body.duo-v2 .duo-home__edito .edito-content > img, body.duo-v2 .duo-home__edito .edito-content > video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Météo ---------- */
.duo-wx-wrap { position: relative; display: flex; flex-direction: column; transition: opacity .3s; }
.duo-wx-wrap.is-loading { opacity: .55; pointer-events: none; }
.duo-wx {
  --wx-a: #3a78c9; --wx-b: #7fb5ee; --wx-c: #f6c46a;
  position: relative; flex: 1; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 14px;
  padding: 18px 20px 16px; border-radius: var(--duo-radius); color: #fff;
  background: linear-gradient(160deg, var(--wx-a) 0%, var(--wx-b) 100%);
  box-shadow: var(--duo-shadow);
}
.duo-wx::before { content: ''; position: absolute; width: 420px; height: 420px; right: -160px; top: -200px; z-index: -1; border-radius: 50%; background: radial-gradient(circle, var(--wx-c), transparent 65%); opacity: .55; animation: duoBob 12s ease-in-out infinite; }
.duo-wx--clear.is-day   { --wx-a: #f08a3c; --wx-b: #f7c35f; --wx-c: #fff2b0; }
.duo-wx--partly.is-day  { --wx-a: #4f86c9; --wx-b: #9cc3ea; --wx-c: #ffe28a; }
.duo-wx--cloudy         { --wx-a: #5c6a85; --wx-b: #9aa6bd; --wx-c: #dfe6f3; }
.duo-wx--fog            { --wx-a: #7a7f8e; --wx-b: #b9bdc8; --wx-c: #f1f1f4; }
.duo-wx--rain           { --wx-a: #34496e; --wx-b: #6b86b0; --wx-c: #9fd2ff; }
.duo-wx--snow           { --wx-a: #6d8fb8; --wx-b: #c9daf0; --wx-c: #ffffff; }
.duo-wx--storm          { --wx-a: #2a2240; --wx-b: #5b3a6b; --wx-c: #ffc53d; }
.duo-wx.is-night        { --wx-a: #1c1433; --wx-b: #3a2650; --wx-c: #8d6ea6; }
.duo-wx.is-night.duo-wx--rain { --wx-a: #161a2e; --wx-b: #34405f; }

/* Particules d'ambiance (pluie, neige, étoiles) */
.duo-wx__fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.duo-wx__fx span { position: absolute; top: -10%; width: 2px; height: 16px; border-radius: 2px; background: rgba(255,255,255,.45); opacity: 0; }
.duo-wx--rain .duo-wx__fx span, .duo-wx--storm .duo-wx__fx span { opacity: 1; animation: wxRain 1.1s linear infinite; }
.duo-wx--snow .duo-wx__fx span { opacity: 1; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: wxSnow 6s linear infinite; }
.duo-wx.is-night.duo-wx--clear .duo-wx__fx span, .duo-wx.is-night.duo-wx--partly .duo-wx__fx span { opacity: 1; width: 3px; height: 3px; border-radius: 50%; background: #fff; animation: wxTwinkle 3s ease-in-out infinite; }
.duo-wx__fx span:nth-child(1) { left: 12%; animation-delay: -.2s !important; top: 12%; }
.duo-wx__fx span:nth-child(2) { left: 28%; animation-delay: -.7s !important; top: 30%; }
.duo-wx__fx span:nth-child(3) { left: 46%; animation-delay: -.4s !important; top: 8%; }
.duo-wx__fx span:nth-child(4) { left: 62%; animation-delay: -.9s !important; top: 22%; }
.duo-wx__fx span:nth-child(5) { left: 78%; animation-delay: -.1s !important; top: 40%; }
.duo-wx__fx span:nth-child(6) { left: 90%; animation-delay: -.6s !important; top: 16%; }

.duo-wx__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.duo-wx__city { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: rgba(255,255,255,.18); cursor: pointer; }
.duo-wx__city svg { width: 14px; height: 14px; }
.duo-wx__city select { appearance: none; -webkit-appearance: none; border: 0; outline: 0; background: transparent; color: #fff; font: 700 .86rem var(--duo-font); cursor: pointer; padding-right: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right center; background-size: 12px; }
.duo-wx__city select option { color: var(--duo-text); }
.duo-wx__cond { margin-top: 8px; font: 700 1.05rem var(--duo-font-display); text-shadow: 0 1px 8px rgba(0,0,0,.15); }
.duo-wx__sun { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: .74rem; font-weight: 600; opacity: .9; }
.duo-wx__sun span { display: inline-flex; align-items: center; gap: 4px; }
.duo-wx__sun svg { width: 13px; height: 13px; }

.duo-wx__now { display: flex; align-items: center; gap: 14px; }
.duo-wx__now .wx { flex-shrink: 0; filter: drop-shadow(0 12px 20px rgba(0,0,0,.18)); }
.duo-wx__temp { font: 800 clamp(3.2rem, 5vw, 4.4rem) var(--duo-font-display); letter-spacing: -.06em; line-height: .9; text-shadow: 0 4px 20px rgba(0,0,0,.12); }
.duo-wx__temp sup { font-size: .32em; letter-spacing: 0; vertical-align: top; margin-left: 4px; opacity: .85; }
.duo-wx__minmax { display: flex; flex-direction: column; gap: 3px; margin-left: auto; font-size: .8rem; font-weight: 600; text-align: right; }
.duo-wx__minmax span:last-child { opacity: .8; font-weight: 500; }

.duo-wx__stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.duo-wx__stats div { padding: 8px 6px; border-radius: 12px; background: rgba(255,255,255,.16); text-align: center; backdrop-filter: blur(6px); }
.duo-wx__stats small { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; opacity: .8; }
.duo-wx__stats strong { font-size: .8rem; white-space: nowrap; }

.duo-wx__hours { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; mask-image: linear-gradient(90deg, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); }
.duo-wx__hours::-webkit-scrollbar { display: none; }
.duo-wx__hour { flex: 0 0 52px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 14px; }
.duo-wx__hour.is-now { background: rgba(255,255,255,.22); }
.duo-wx__hour small { font-size: .68rem; font-weight: 600; opacity: .85; }
.duo-wx__hour strong { font-size: .88rem; }
.duo-wx__hour em { font-style: normal; font-size: .62rem; opacity: .9; }
.duo-wx__hour em.is-dry { opacity: .4; }

.duo-wx__days { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.2); }
.duo-wx__day { display: grid; grid-template-columns: 62px 28px 32px 1fr 32px; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; }
.duo-wx__lo { opacity: .7; text-align: right; }
.duo-wx__bar { position: relative; height: 5px; border-radius: 5px; background: rgba(255,255,255,.2); }
.duo-wx__bar i { position: absolute; top: 0; bottom: 0; border-radius: 5px; background: linear-gradient(90deg, #9fd2ff, #ffd36b, #ff9a5a); }

/* Icônes animées */
.wx .wx-rays { transform-origin: 32px 32px; animation: duoSpinSlow 18s linear infinite; }
.wx .wx-cloud { animation: wxDrift 6s ease-in-out infinite; }
.wx .wx-cloud--back { animation-duration: 9s; animation-direction: reverse; }
.wx .wx-drops path { animation: wxDrop 1s linear infinite; }
.wx .wx-drops path:nth-child(2) { animation-delay: .3s; } .wx .wx-drops path:nth-child(3) { animation-delay: .6s; }
.wx .wx-flakes circle { animation: wxFlake 2.4s ease-in-out infinite; }
.wx .wx-flakes circle:nth-child(2) { animation-delay: .8s; } .wx .wx-flakes circle:nth-child(3) { animation-delay: 1.6s; }
.wx .wx-bolt { animation: wxBolt 3s steps(1) infinite; }
.wx .wx-fog { animation: wxDrift 4s ease-in-out infinite; }
.wx .wx-moon { transform-origin: 38px 30px; animation: wxRock 8s ease-in-out infinite; }
@keyframes wxDrift { 0%,100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
@keyframes wxDrop { 0% { transform: translateY(-4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }
@keyframes wxFlake { 0%,100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
@keyframes wxBolt { 0%, 88%, 100% { opacity: 1; } 90%, 94% { opacity: .2; } }
@keyframes wxRock { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes wxRain { 0% { transform: translate(0, -20px) rotate(12deg); } 100% { transform: translate(-40px, 420px) rotate(12deg); } }
@keyframes wxSnow { 0% { transform: translate(0, -20px); } 100% { transform: translate(-30px, 420px); } }
@keyframes wxTwinkle { 0%,100% { opacity: .2; } 50% { opacity: 1; } }

/* ---------- Aujourd'hui chez DUO ---------- */
.duo-today .dx-card__body { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.duo-today__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--duo-surface-2); border: 1px solid var(--duo-border); }
.duo-today__row--col { flex-direction: column; align-items: stretch; }
.duo-today__label { font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--duo-muted); }
.duo-today__row strong { font-family: var(--duo-font-display); color: var(--duo-heading); }
.duo-today__empty { font-size: .84rem; color: var(--duo-muted); }
.duo-today__people { display: flex; flex-wrap: wrap; gap: 8px; }
.duo-today__person { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; font-size: .84rem; font-weight: 650;
  background: linear-gradient(90deg, var(--duo-orange-100), var(--duo-surface)); border: 1px solid rgba(235,107,36,.25); }
.duo-today__person img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.duo-today__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.duo-today__list li { display: flex; align-items: center; gap: 10px; }
.duo-today__list img, .duo-today__initial { width: 36px; height: 36px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.duo-today__initial { display: grid; place-items: center; background: var(--duo-grad-brand); color: #fff; font-weight: 800; }
.duo-today__list strong { display: block; font-size: .88rem; }
.duo-today__list small { display: block; font-size: .74rem; color: var(--duo-muted); }

/* ---------- Bloc-note ---------- */
.duo-note { display: flex; flex-direction: column; overflow: hidden; }
.duo-note .dx-card__head { padding: 16px 18px 0; }
.duo-note__status { margin-left: auto; font-size: .72rem; font-weight: 600; color: var(--duo-muted); display: inline-flex; align-items: center; gap: 6px; }
.duo-note__status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--duo-plum-200); }
.duo-note__status.is-saving::before { background: var(--duo-amber); animation: duoPulseDot 1s infinite; }
.duo-note__status.is-saved { color: var(--duo-green); }
.duo-note__status.is-saved::before { background: var(--duo-green); }
.duo-note__status.is-error { color: var(--duo-danger); }
.duo-note__status.is-error::before { background: var(--duo-danger); }
.duo-note__tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px 10px; }
.duo-note__tools button {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--duo-border); background: var(--duo-surface); color: var(--duo-label); font: 600 .78rem var(--duo-font);
  transition: background .2s, border-color .2s, transform .25s var(--duo-spring);
}
.duo-note__tools button:hover { background: var(--duo-plum-50); border-color: var(--duo-plum-200); transform: translateY(-1px); }
.duo-note__tools svg { width: 14px; height: 14px; }
.duo-note__text {
  flex: 1; min-height: 220px; margin: 0 18px; padding: 4px 14px !important; resize: none; border: 0 !important; outline: 0; border-radius: 14px !important;
  font: 500 .92rem/28px var(--duo-font) !important; color: var(--duo-text);
  background: repeating-linear-gradient(var(--duo-paper), var(--duo-paper) 27px, var(--duo-paper-line) 28px) !important; box-shadow: inset 0 0 0 1px var(--duo-border-strong) !important; color: var(--duo-text) !important;
}
.duo-note__text:focus { box-shadow: inset 0 0 0 1px var(--duo-gold), 0 0 0 4px rgba(196,147,90,.15) !important; }
.duo-note__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px 14px; font-size: .72rem; color: var(--duo-muted); }
.duo-note__progress { display: inline-flex; align-items: center; gap: 8px; }
.duo-note__track { width: 90px; height: 6px; border-radius: 6px; overflow: hidden; background: var(--duo-green-100); }
.duo-note__track i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--duo-green); transition: width .4s var(--duo-ease); }
.duo-note__progress b { font-weight: 700; color: var(--duo-green); }

/* Sélecteur de ville : neutraliser le style des <select> hérités */
body.duo-v2 .duo-wx__city select { background-color: transparent !important; border: 0 !important; box-shadow: none !important; min-height: 0 !important; padding: 0 16px 0 0 !important; color: #fff !important; }

/* Édito : colonne avec les éditos précédents */
.duo-home__edito { gap: 12px; }
.duo-home__edito > #edito-wrapper { flex: 1; }
body.duo-v2 .duo-home__edito .edito-content { align-items: flex-start; background: var(--duo-surface); }
.duo-prev-editos { flex: 0 0 auto !important; padding: 8px 10px 10px; border-radius: var(--duo-radius); background: var(--duo-surface); border: 1px solid var(--duo-border); box-shadow: var(--duo-shadow-sm); }
.duo-prev-editos__head { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--duo-muted); }
.duo-prev-editos__head a { letter-spacing: 0; text-transform: none; font-size: .78rem; }
.duo-prev-editos__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.duo-prev-editos__row a { position: relative; display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 6; background: var(--duo-plum-50); }
.duo-prev-editos__row img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s var(--duo-ease); }
.duo-prev-editos__row a:hover img { transform: scale(1.06); }
.duo-prev-editos__row small { position: absolute; left: 6px; bottom: 6px; padding: 1px 6px; border-radius: 6px; font-size: .64rem; font-weight: 700; color: #fff; background: rgba(34,21,48,.75); }

/* Aujourd'hui : liste compacte en ligne */
.duo-today__list--inline { flex-direction: row; flex-wrap: wrap; gap: 10px 14px; }
.duo-today__list--inline img { width: 30px; height: 30px; border-radius: 50%; }

/* Tutoriels */
.duo-card-link { margin-left: auto; font-size: .8rem; font-weight: 650; }
.duo-tutos__row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px; overflow-x: auto; padding: 14px 18px 18px; scroll-snap-type: x mandatory; scroll-padding-inline: 18px; scrollbar-width: none; }
.duo-tutos__row::-webkit-scrollbar { display: none; }
.duo-tuto { display: flex; flex-direction: column; gap: 6px; scroll-snap-align: start; color: var(--duo-text) !important; min-width: 0; }
.duo-tuto__img { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--duo-plum-100) center / cover no-repeat; box-shadow: var(--duo-shadow-sm); }
.duo-tuto__img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(34,21,48,.55), transparent 55%); opacity: .7; transition: opacity .3s; }
.duo-tuto__play { position: absolute; z-index: 1; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--duo-orange); transform: scale(.8); opacity: 0; transition: transform .35s var(--duo-spring), opacity .3s; }
.duo-tuto__play svg { width: 22px; height: 22px; }
.duo-tuto:hover .duo-tuto__play { transform: none; opacity: 1; }
.duo-tuto:hover .duo-tuto__img::after { opacity: 1; }
.duo-tuto__cat { position: absolute; z-index: 1; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 7px; font-size: .64rem; font-weight: 800; color: #fff; background: rgba(34,21,48,.7); }
.duo-tuto strong { font-size: .84rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.duo-tuto small { font-size: .72rem; color: var(--duo-muted); }

/* Stat « Suivi » mise en avant dans le bandeau d'accueil : plus grande que les autres, mais toujours sur la même ligne */
.duo-stat--big { flex: 1.6 1 0; padding: 18px 20px; gap: 16px; border-radius: 20px; }
.duo-stat--big .duo-stat__ico { width: 52px; height: 52px; border-radius: 16px; }
.duo-stat--big .duo-stat__ico svg { width: 24px; height: 24px; }
.duo-stat--big strong { font-size: 2.1rem; }
.duo-stat--big span:last-child { font-size: .86rem; }
@media (max-width: 640px) { .duo-stat--big { flex: 1 1 0; } }

/* Bandeau « lieu non reconnu » compact */
.duo-ipbar { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 14px; margin-bottom: 14px; border-radius: 16px; background: var(--duo-danger-100); border: 1px solid rgba(214,60,60,.2); }
.duo-ipbar__ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: var(--duo-danger); color: #fff; }
.duo-ipbar__ico svg { width: 18px; height: 18px; }
.duo-ipbar p { margin: 0; flex: 1; font-size: .86rem; color: #7d2323; }
.duo-ipbar a { color: #7d2323 !important; font-weight: 700; text-decoration: underline; }
.duo-ipbar form { margin: 0; }
.duo-ipbar .dx-btn { height: 38px; font-size: .8rem; padding: 0 16px; }
@media (max-width: 860px) { .duo-ipbar { flex-wrap: wrap; } }


/* ---------- Météo compacte : icône + température à côté de l'horloge, détail au survol ---------- */
.duo-wx-mini {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); color: #fff; cursor: pointer;
  font-size: 1rem; user-select: none; transition: background .2s;
}
.duo-wx-mini:hover, .duo-wx-mini.is-open { background: rgba(255,255,255,.24); }
.duo-wx-mini .wx { width: 26px; height: 26px; flex-shrink: 0; }
.duo-wx-mini__temp { font: 700 .95rem var(--duo-font-display); white-space: nowrap; }
.duo-wx-mini__ico { font-size: 1.15rem; }

.duo-wx-pop {
  position: fixed; top: 88px; right: 24px; width: 340px; max-width: calc(100vw - 16px); z-index: 500;
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  filter: drop-shadow(0 20px 45px rgba(0,0,0,.3));
}
/* Le survol/focus en CSS pur garantit l'ouverture même si le JS de positionnement ne s'exécute pas ;
   le JS (duoWxInit) affine ensuite top/left au pixel près via style inline et la classe .is-open. */
.duo-wx-mini:hover .duo-wx-pop,
.duo-wx-mini:focus-within .duo-wx-pop,
.duo-wx-mini.is-open .duo-wx-pop { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.duo-wx-pop .duo-wx { min-height: 0; }


/* « Se connecter en tant que » (informatique) */
.duo-usu { margin: 10px 0 4px; }
.duo-usu__btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border-radius: 12px; border: 1px dashed var(--duo-border); background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.duo-usu__btn:hover { background: var(--duo-hover, rgba(127,127,127,.12)); }
.duo-usu__btn svg { width: 16px; height: 16px; }
.duo-usu__box { margin-top: 8px; } .duo-usu__q { width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--duo-border); background: var(--duo-surface); color: inherit; font: inherit; }
.duo-usu__res { max-height: 220px; overflow: auto; margin-top: 6px; }
.duo-usu__res button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.duo-usu__res button:hover { background: var(--duo-hover, rgba(127,127,127,.15)); } .duo-usu__res small, .duo-usu__vide { opacity: .65; font-size: .78rem; } .duo-usu__vide { padding: 6px 10px; margin: 0; }
.duo-usu-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: #b3261e; color: #fff; font-size: .88rem; }
.duo-usu-bar__ico svg { width: 18px; height: 18px; } .duo-usu-bar__txt { flex: 1; min-width: 0; } .duo-usu-bar small { opacity: .85; }
.duo-usu-bar__btn { border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.14); color: #fff; font: inherit; font-weight: 700; padding: 5px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.duo-usu-bar__btn:hover { background: rgba(255,255,255,.28); }

/* Menu du compte en thème clair : panneau clair (il restait violet foncé avec des éléments pensés pour le sombre) */
:root[data-theme="light"] body.duo-v2 .duo-avatar-menu__panel { background: #fff; border: 1px solid var(--duo-next-line, rgba(60,30,90,.14)); box-shadow: 0 18px 48px rgba(40,20,70,.18); color: var(--duo-plum-900, #2a1a3e); }
:root[data-theme="light"] body.duo-v2 .duo-avatar-menu__panel .duo-user { background: none !important; border: 0 !important; }
:root[data-theme="light"] body.duo-v2 .duo-avatar-menu__panel .duo-nav__title { color: var(--duo-plum-400, #8a7aa0); }
:root[data-theme="light"] body.duo-v2 .duo-avatar-menu__panel .duo-prefs__label { color: var(--duo-muted, #6b5f7a); }
:root[data-theme="light"] body.duo-v2 .duo-avatar-menu__panel .duo-seg { background: var(--duo-plum-50, #f5f1fa); border-color: var(--duo-next-line, rgba(60,30,90,.14)); }
:root[data-theme="light"] body.duo-v2 .duo-avatar-menu__panel .duo-seg button { color: var(--duo-muted, #6b5f7a); }
:root[data-theme="light"] body.duo-v2 .duo-avatar-menu__panel .duo-seg button:hover { color: var(--duo-plum-900, #2a1a3e); }
:root[data-theme="light"] body.duo-v2 .duo-avatar-menu__panel .duo-seg button[aria-checked="true"] { background: var(--duo-plum-900, #2a1a3e); color: #fff; }
:root[data-theme="light"] body.duo-v2 .duo-avatar-menu__panel .duo-usu__btn { border-color: var(--duo-next-line, rgba(60,30,90,.25)); color: var(--duo-plum-800, #3a2650); }
:root[data-theme="light"] body.duo-v2 .duo-avatar-menu__panel .duo-usu__q { background: var(--duo-plum-50, #f5f1fa); color: var(--duo-plum-900, #2a1a3e); }
:root[data-theme="light"] body.duo-v2 .duo-avatar-menu__panel .duo-usu__res button:hover { background: var(--duo-plum-50, #f5f1fa); }
/* Thème sombre : même contraste lisible pour le bloc « se connecter en tant que » */
:root[data-theme="dark"] body.duo-v2 .duo-avatar-menu__panel .duo-usu__btn, :root[data-theme="dark"] body.duo-v2 .duo-avatar-menu__panel .duo-usu__res button { color: #fff; border-color: rgba(255,255,255,.25); }
:root[data-theme="dark"] body.duo-v2 .duo-avatar-menu__panel .duo-usu__q { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2); }
:root[data-theme="light"] body.duo-v2 .duo-avatar-menu__panel .duo-chip { background: var(--duo-plum-100, #ece5f4); color: var(--duo-plum-800, #3a2650); }
:root[data-theme="light"] body.duo-v2 .duo-avatar-menu__panel .duo-chip--ok { background: var(--duo-green-100, #dcf5e9); color: #12724d; }
:root[data-theme="light"] body.duo-v2 .duo-avatar-menu__panel .duo-chip--risk { background: var(--duo-danger-100, #fde5e5); color: #a52a2a; }
:root[data-theme="light"] body.duo-v2 .duo-avatar-menu__panel .duo-user__actions a { background: var(--duo-plum-50, #f5f1fa); }

/* Cybersécurité : tuile dans la rangée d'en-tête + fenêtre de détail */
.duo-cybertile { cursor: pointer; text-align: left; }
.duo-cybernote__ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; color: #fff; background: #1fa971; }
.duo-cybernote__ico svg { width: 18px; height: 18px; }
.duo-cyberdlg__ico--info { background: #e0a100; } .duo-cyberdlg__ico--alerte { background: #d63c3c; }
.duo-cybernote__note { flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font: 800 1.05rem var(--duo-font-display, inherit); color: #fff; background: #4e504c; }
.duo-cybernote__note--a { background: #00843d; } .duo-cybernote__note--b { background: #85bb2f; } .duo-cybernote__note--c { background: #fecb02; color: #333; } .duo-cybernote__note--d { background: #fe7e00; } .duo-cybernote__note--e { background: #e63e11; }
.duo-cyberdlg { width: min(460px, calc(100vw - 32px)); padding: 20px 22px; border: 1px solid var(--duo-border, rgba(127,127,127,.3)); border-radius: 20px; background: var(--duo-surface, #fff); color: var(--duo-text, inherit); box-shadow: 0 24px 64px rgba(20,10,40,.35); }
.duo-cyberdlg::backdrop { background: rgba(21,13,28,.55); backdrop-filter: blur(3px); }
.duo-cyberdlg__head { display: flex; align-items: center; gap: 12px; } .duo-cyberdlg__head h3 { flex: 1; margin: 0; }
.duo-cyberdlg p { margin: 14px 0 8px; line-height: 1.5; } .duo-cyberdlg ul { margin: 0 0 14px 18px; padding: 0; font-size: .88rem; line-height: 1.5; }
.duo-cyberdlg__actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* Sensibilisation obligatoire : fenêtre bloquante */
.duo-sibpopup { width: min(480px, calc(100vw - 32px)); padding: 28px 28px 24px; text-align: center; border: 1px solid var(--duo-border, rgba(127,127,127,.3)); border-radius: 24px; background: var(--duo-surface, #fff); color: var(--duo-text, inherit); box-shadow: 0 30px 80px rgba(20,10,40,.5); }
.duo-sibpopup::backdrop { background: rgba(21,13,28,.78); backdrop-filter: blur(6px); }
.duo-sibpopup__ico { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: #d63c3c; } .duo-sibpopup__ico svg { width: 28px; height: 28px; }
.duo-sibpopup h3 { margin: 0 0 8px; } .duo-sibpopup p { margin: 0 0 18px; line-height: 1.5; }
.duo-sibpopup__actions { display: flex; flex-direction: column; gap: 10px; align-items: center; } .duo-sibpopup__lien { font-size: .86rem; opacity: .7; color: inherit; }

/* Note façon Nutri-Score (A à F) : la lettre active est agrandie */
.duo-nutri { display: inline-flex; align-items: center; gap: 1px; padding: 2px; border-radius: 8px; background: rgba(255,255,255,.9); box-shadow: 0 0 0 1px rgba(0,0,0,.08); vertical-align: middle; }
.duo-nutri i { display: grid; place-items: center; width: 15px; height: 17px; font: 800 .62rem/1 var(--duo-font-display, inherit); font-style: normal; color: #fff; border-radius: 4px; opacity: .38; }
.duo-nutri i.a { background: #00843d; } .duo-nutri i.b { background: #85bb2f; } .duo-nutri i.c { background: #fecb02; color: #333; } .duo-nutri i.d { background: #fe7e00; } .duo-nutri i.e { background: #e63e11; } .duo-nutri i.f { background: #8e2a2a; }
.duo-nutri i.on { opacity: 1; width: 23px; height: 25px; font-size: .95rem; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.3); margin: 0 1px; }
.duo-nutri--vide i { background: #9a9a9a; } .duo-nutri--vide i.on { background: #9a9a9a; }
.duo-stat .duo-nutri { margin-bottom: 3px; }

/* En-tête des pages (hors accueil) : une seule ligne — rubrique · titre · sous-titre — pour gagner de la hauteur */
body.duo-v2 .duo-hero:not(.duo-hero--home) { display: flex; align-items: center; flex-wrap: nowrap; gap: 14px; min-height: 0 !important; padding: 9px 18px !important; margin-bottom: 14px; border-radius: 16px; overflow: visible; }
body.duo-v2 .duo-hero:not(.duo-hero--home) .duo-hero__mesh, body.duo-v2 .duo-hero:not(.duo-hero--home) .duo-hero__grid, body.duo-v2 .duo-hero:not(.duo-hero--home) .duo-hero__icon { display: none !important; }
body.duo-v2 .duo-hero:not(.duo-hero--home) .duo-hero__eyebrow { margin: 0; flex: none; padding: 3px 11px; font-size: .68rem; }
body.duo-v2 .duo-hero:not(.duo-hero--home) h1 { flex: none; margin: 0; max-width: none; font-size: 1.05rem !important; line-height: 1.25; letter-spacing: -.01em; white-space: nowrap; }
body.duo-v2 .duo-hero:not(.duo-hero--home) p { flex: 1 1 0; min-width: 0; margin: 0 !important; max-width: none; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.duo-v2 .duo-hero:not(.duo-hero--home) p::before { content: '·'; margin-right: 12px; opacity: .55; }
@media (max-width: 720px) { body.duo-v2 .duo-hero:not(.duo-hero--home) .duo-hero__eyebrow { display: none; } body.duo-v2 .duo-hero:not(.duo-hero--home) { padding: 8px 14px !important; } }

/* pastille « N personnes ont accès » dans l'en-tête */
body.duo-v2 .duo-hero__who { margin-left: auto; flex: none; position: relative; z-index: 20; } body.duo-v2 .duo-hero__who:empty { display: none; }
body.duo-v2 .duo-hero--who .adm-who { margin: 0; } body.duo-v2 .duo-hero--who .adm-who summary { padding: 3px 12px 3px 5px; }
body.duo-v2 .duo-hero--who .adm-who__faces img { width: 22px; height: 22px; }
@media (max-width: 720px) { body.duo-v2 .duo-hero__who .adm-who__faces { display: none; } }
body.duo-v2 .duo-hero--who { position: relative; z-index: 30; }

/* pastille « N personnes ont accès » dans la barre du haut (l'en-tête de page est supprimé) */
body.duo-v2 .duo-topbar__who { margin-left: 14px; position: relative; z-index: 60; } body.duo-v2 .duo-topbar__who:empty { display: none; }
body.duo-v2 .duo-topbar__who .adm-who { margin: 0; } body.duo-v2 .duo-topbar__who .adm-who summary { padding: 3px 12px 3px 5px; }
body.duo-v2 .duo-topbar__who .adm-who__faces img { width: 22px; height: 22px; }
body.duo-v2 .duo-topbar__who .adm-who__list { right: auto; left: 0; }
@media (max-width: 900px) { body.duo-v2 .duo-topbar__who { display: none; } }
