/* Coque de la console : barre latérale, en-tête, zone de page, barre du bas, « Demander à Mika », notifications.
   Mesures prises sur les maquettes 05 à 20 à l'échelle 1,8 (fenêtre de 1600×1000). */

.console { display: grid; grid-template-columns: 297px minmax(0, 1fr); min-height: 100vh; }

/* ---------- barre latérale ---------- */
.lateral { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--ligne); padding: 0 18px 25px; overflow-y: auto; z-index: 30; }
.lateral .marque { display: flex; align-items: center; height: 75px; padding: 11px 8px 0; flex: none; }
.logo { font: 700 25px/1 var(--titre); letter-spacing: -0.02em; color: var(--encre); white-space: nowrap; }
.logo i { font-style: normal; color: var(--orange); }
.lateral .mika { display: flex; gap: 11px; align-items: flex-start; min-height: 0; margin-top: 4px; padding: 14px 18px 12px 14px; border-radius: 18px; background: var(--sable); flex: none; }
.lateral .mika .nom { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 700; color: var(--encre); line-height: 1.2; }
.lateral .mika .nom::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--vert-vif); box-shadow: 0 0 0 3px #CDEFE0; }
.lateral .mika .etat { margin-top: 4px; font-size: 13px; line-height: 1.32; color: var(--texte); }
.lateral .rubrique { margin: 24px 12px 9px; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--doux); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 42px; padding: 0 12px 0 11px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--encre); cursor: pointer; transition: background .15s; }
.nav-item:hover { background: #FBF3EC; }
.nav-item > svg { width: 20px; height: 20px; flex: none; color: var(--texte); stroke-width: 1.8; }
.nav-item .chevron { width: 16px; height: 16px; margin-left: 2px; color: var(--encre); transition: transform .2s; }
.nav-item[aria-expanded="true"] .chevron { transform: rotate(90deg); }
.nav-item .compteur { margin-left: auto; }
.nav-item.actif { background: var(--peche); color: var(--orange-texte); }
.nav-item.actif > svg { color: var(--orange-texte); }
.nav-item.actif .chevron { color: var(--orange-texte); }
.sous-nav { position: relative; display: flex; flex-direction: column; margin: 4px 0 6px 31px; padding-left: 20px; }
.sous-nav::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 1px; background: var(--ligne); }
.sous-item { display: flex; align-items: center; justify-content: space-between; height: 36px; padding-right: 2px; font-size: 15px; font-weight: 500; color: var(--texte); cursor: pointer; }
.sous-item:hover { color: var(--encre); }
.sous-item.actif { color: var(--orange-texte); font-weight: 700; }
.sous-item .etat-rond { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px dashed #DCCFC5; }
.sous-item .etat-rond.fait { border: 0; background: var(--vert-fond); color: var(--vert); display: grid; place-items: center; }
.sous-item .etat-rond.fait svg { width: 12px; height: 12px; stroke-width: 3; }
.lateral .bas { margin-top: auto; padding-top: 24px; flex: none; }
.formule-carte { display: block; width: 100%; padding: 13px 15px 14px 15px; border: 1px solid var(--ligne); border-radius: 18px; background: #fff; text-align: left; cursor: pointer; }
.formule-carte:hover { border-color: #DED6CF; }
.formule-carte .haut { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--texte); }
.formule-carte .haut .badge { height: 26px; padding: 0 11px; font-size: 14px; }
.formule-carte .detail { margin-top: 6px; font-size: 16px; font-weight: 700; color: var(--encre); }
.moi { display: flex; align-items: center; gap: 11px; margin-top: 21px; padding: 0 0 0 8px; }
.moi .qui { min-width: 0; flex: 1; }
.moi .qui b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.moi .qui span { display: block; font-size: 13.5px; color: var(--texte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.moi .points { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--encre); }
.moi .points:hover { background: var(--sable); }
.moi .points svg { width: 18px; height: 18px; }
.menu-moi { min-width: 0; padding: 8px 10px; border-radius: 20px; box-shadow: 0 16px 38px rgba(30, 20, 15, .16), 0 3px 8px rgba(30, 20, 15, .08); }
.menu-moi button { height: 41.5px; padding: 0 12px; gap: 10px; font-size: 13.5px; font-weight: 600; }
.menu-moi svg { width: 16px; height: 16px; }
.menu-moi hr { margin: 6px 0; }
.menu-moi .danger { color: #B42318; }

/* ---------- en-tête ---------- */
.principal { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.entete { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; height: 75px; padding: 0 36px; background: rgba(253, 247, 240, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--ligne-2); }
.fil { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 15px; color: var(--texte); font-weight: 500; }
.fil a:hover { color: var(--encre); }
.fil svg { width: 15px; height: 15px; flex: none; color: var(--texte); }
.fil b { font-weight: 700; color: var(--encre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entete .droite { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.pilule { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 18px; border: 1px solid var(--ligne); border-radius: 99px; background: #fff; font-size: 14px; font-weight: 600; color: var(--encre); white-space: nowrap; cursor: pointer; }
.pilule:hover { border-color: #DCD3CC; }
.pilule svg { width: 18px; height: 18px; }
.pilule.config { gap: 12px; padding: 0 16px 0 10px; }
.pilule.config .progres { width: 100px; height: 6px; }
.pilule.config .pct { min-width: 34px; text-align: right; font-weight: 700; }
.cloche { position: relative; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--ligne); background: #fff; display: grid; place-items: center; color: var(--encre); }
.cloche:hover { border-color: #DCD3CC; }
.cloche svg { width: 20px; height: 20px; }
.cloche .point { position: absolute; top: 11px; right: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2px #fff; }
.burger { display: none; }

/* ---------- page ---------- */
.page { flex: 1; padding: 30px 36px 48px; }
.page.avec-barre { padding-bottom: 120px; }
.page-entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-entete .t-sous { margin-top: 8px; max-width: 900px; }
.barre-bas { position: sticky; bottom: 0; z-index: 15; display: flex; align-items: center; gap: 14px; height: 80px; margin-top: auto; padding: 0 36px; background: #fff; border-top: 1px solid var(--ligne); }
.barre-bas .gauche { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 13.5px; color: var(--texte); }
.barre-bas .gauche > svg { width: 17px; height: 17px; flex: none; }
.barre-bas .droite { margin-left: auto; display: flex; align-items: center; gap: 14px; }

/* ---------- notifications ---------- */
.notifs { width: 380px; max-height: 480px; overflow: auto; padding: 8px; }
.notifs .titre { padding: 10px 12px 8px; font: 700 17px var(--titre); }
.notif { display: flex; gap: 12px; padding: 12px; border-radius: 12px; cursor: pointer; }
.notif:hover { background: var(--sable); }
.notif .rond-notif { width: 8px; height: 8px; margin-top: 7px; flex: none; border-radius: 50%; background: transparent; }
.notif.nonlu .rond-notif { background: var(--orange); }
.notif p { font-size: 14.5px; line-height: 1.45; color: var(--encre); }
.notif time { display: block; margin-top: 3px; font-size: 12.5px; color: var(--doux); }
.notifs .vide { padding: 22px 14px; font-size: 14.5px; color: var(--texte); text-align: center; }

/* ---------- Demander à Mika (tiroir) ---------- */
.tiroir { position: fixed; z-index: 70; top: 12px; right: 12px; bottom: 12px; width: min(440px, calc(100vw - 24px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ligne); border-radius: 26px; box-shadow: var(--ombre-haute); animation: glisse .22s cubic-bezier(.2,.8,.2,1); }
@keyframes glisse { from { opacity: 0; transform: translateX(24px); } }
.tiroir header { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px 20px; border-bottom: 1px solid var(--ligne); }
.tiroir header b { display: block; font-size: 16px; }
.tiroir header span { font-size: 13px; color: var(--texte); }
.tiroir header .fermer { margin-left: auto; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--ligne); display: grid; place-items: center; }
.tiroir header .fermer svg { width: 18px; height: 18px; }
.fil-chat { flex: 1; overflow-y: auto; padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 12px; }
.bulle { max-width: 86%; padding: 12px 16px; border-radius: 18px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.bulle.mika { align-self: flex-start; background: #fff; border: 1px solid var(--ligne); color: var(--encre); border-bottom-left-radius: 6px; }
.bulle.moi { align-self: flex-end; background: var(--wa-bulle); color: #17311F; border-bottom-right-radius: 6px; }
.bulle .faits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bulle .faits span { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 3px 9px; border-radius: 12px; background: var(--vert-fond); color: var(--vert); font-size: 12.5px; font-weight: 600; white-space: normal; overflow-wrap: normal; word-break: normal; }
.bulle .faits span svg { width: 13px; height: 13px; flex: none; stroke-width: 3; }
.bulle .faits span.echec { background: var(--peche); color: var(--orange-texte); }
.ecrit { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--texte); }
.ecrit::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--vert-vif); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.saisie-chat { display: flex; align-items: center; gap: 8px; margin: 10px 14px 14px; padding: 6px 6px 6px 16px; border: 1px solid var(--champ-bord); border-radius: 16px; background: #fff; }
.saisie-chat:focus-within { border-color: var(--orange); box-shadow: var(--anneau); }
.saisie-chat input { flex: 1; min-width: 0; height: 40px; border: 0; outline: none; font-size: 15px; background: transparent; }
.saisie-chat button { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--texte); }
.saisie-chat button:hover { background: var(--sable); color: var(--orange-texte); }
.saisie-chat button svg { width: 19px; height: 19px; }
.suggestions-chat { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 6px; }
.suggestions-chat button { height: 32px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--champ-bord); background: #fff; font-size: 13.5px; font-weight: 500; color: var(--encre); }
.suggestions-chat button:hover { border-color: var(--orange-pale); background: var(--peche-clair); }

/* ---------- petit écran ---------- */
@media (max-width: 1080px) {
  .console { grid-template-columns: minmax(0, 1fr); }
  .lateral { position: fixed; left: 0; top: 0; bottom: 0; width: 297px; transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--ombre-haute); z-index: 60; }
  .console.menu-ouvert .lateral { transform: none; }
  .console.menu-ouvert::after { content: ""; position: fixed; inset: 0; z-index: 55; background: var(--voile); }
  .burger { display: grid; place-items: center; width: 44px; height: 44px; flex: none; margin-left: -6px; border-radius: 12px; color: var(--encre); }
  .burger svg { width: 22px; height: 22px; }
  .entete { padding: 0 20px; gap: 10px; }
  .pilule.config .libelle { display: none; }
}
@media (max-width: 760px) {
  .entete { height: 64px; padding: 0 16px; }
  .entete .droite { gap: 8px; }
  .pilule.config { display: none; }
  .pilule.demander .libelle { display: none; }
  .pilule.demander { width: 44px; padding: 0; justify-content: center; }
  .fil { font-size: 14.5px; gap: 8px; }
  .fil .parent, .fil .parent + svg { display: none; }
  .page { padding: 22px 16px 40px; }
  .page.avec-barre { padding-bottom: 140px; }
  .page-entete { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
  .barre-bas { height: auto; min-height: 72px; padding: 12px 16px; flex-wrap: wrap; }
  .barre-bas .gauche { display: none; }
  .barre-bas .droite { width: 100%; }
  .barre-bas .droite .btn { flex: 1; padding: 0 14px; }
  .notifs { width: calc(100vw - 24px); }
}
.indicateur { display: inline-flex; align-items: center; gap: 10px; }
.indicateur svg { width: 17px; height: 17px; color: var(--texte); }
.indicateur[data-etat="erreur"] { color: #B42318; }
