/* =========================================================
   ESPACE ML — Feuille de style commune à toutes les pages internes
   Charte réseau des Missions Locales (UNML, sept. 2022)
   Même identité que la page d'accueil : à inclure sur chaque page de l'Espace ML.
   ========================================================= */

/* ---------- Polices (hébergées sur le site) ---------- */
@font-face {
    font-family: 'Akrobat';
    src: url('../fonts/akrobat-bold.woff2') format('woff2'), url('../fonts/akrobat-bold.woff') format('woff');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Akrobat';
    src: url('../fonts/akrobat-extrabold.woff2') format('woff2'), url('../fonts/akrobat-extrabold.woff') format('woff');
    font-weight: 800; font-style: normal; font-display: swap;
}

/* ---------- Couleurs et échelle commune ---------- */
:root {
    --bleu: #2897D5;
    --vert: #95C11F;
    --orange: #F39200;
    --rose: #D60B52;
    --prune: #A3195B;
    --ink: #1D1D1B;
    --ciel: #EAF4FB;
    --gris: #5F5F5C;          /* texte secondaire (contraste AA sur blanc) */
    --ligne: #DCE6EE;         /* bordures discrètes */
    --titre: 'Akrobat', Arial, Helvetica, sans-serif;
    --texte: Arial, Helvetica, sans-serif;
    --ease-out: cubic-bezier(.2, .7, .3, 1);

    /* Tailles de texte : les mêmes partout dans l'Espace ML */
    --fs-xs: 12px;   /* sur-titres, mentions */
    --fs-sm: 14px;   /* labels, aides */
    --fs-md: 16px;   /* texte courant, champs, boutons */
    --fs-lg: 18px;   /* introductions */
    --fs-h3: 24px;
    --fs-h2: clamp(28px, 3vw, 36px);
    --fs-h1: clamp(40px, 5vw, 64px);

    /* Rayons */
    --r-sm: 14px;   /* champs */
    --r-md: 20px;   /* cartes, alertes */
    --r-lg: 32px;   /* grands blocs */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font: var(--fs-md)/1.5 var(--texte); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--prune); }
a:hover { color: var(--rose); }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; }
[hidden] { display: none !important; }

.ml-eyebrow { margin: 0; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.ml-h1 { margin: 0; font: 800 var(--fs-h1)/1 var(--titre); }
.ml-h2 { margin: 0; font: 800 var(--fs-h2)/1.05 var(--titre); }
.ml-muted { color: var(--gris); }

/* ---------- Boutons ---------- */
.ml-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 8px 8px 8px 24px;
    border: none; border-radius: 999px; background: var(--ink); color: #fff; font: 700 var(--fs-md) var(--texte); text-decoration: none; cursor: pointer;
    transition: background .3s var(--ease-out);
}
.ml-btn:hover { background: var(--prune); color: #fff; }
.ml-btn .ico { width: 40px; height: 40px; border-radius: 50%; background: var(--orange); color: var(--ink); display: flex; align-items: center; justify-content: center; flex: none; }
.ml-btn .ico svg { transition: transform .35s var(--ease-out); }
.ml-btn:hover .ico svg { transform: translateX(3px); }
.ml-btn.is-block { width: 100%; justify-content: space-between; }
.ml-link { font-weight: 700; font-size: var(--fs-sm); color: var(--prune); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .35s var(--ease-out), color .3s; }
.ml-link:hover { color: var(--prune); background-size: 100% 2px; }

/* ---------- Champs de formulaire ---------- */
.ml-field { margin: 0 0 20px; }
.ml-field label { display: block; margin-bottom: 8px; font-size: var(--fs-sm); font-weight: 700; }
.ml-input-wrap { position: relative; }
.ml-input-wrap > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--gris); pointer-events: none; transition: color .3s; }
.ml-input {
    width: 100%; min-height: 56px; padding: 14px 16px; border-radius: var(--r-sm); border: 2px solid transparent; background: var(--ciel);
    font: var(--fs-md) var(--texte); color: var(--ink); outline: none; transition: border-color .3s var(--ease-out), background .3s var(--ease-out);
}
.ml-input-wrap > svg + .ml-input { padding-left: 46px; }
.ml-input::placeholder { color: #7C8A96; }
.ml-input:focus { border-color: var(--bleu); background: #fff; }
.ml-input-wrap:focus-within > svg { color: var(--bleu); }
.ml-input.is-invalid { border-color: var(--rose); background: #fff; }
.ml-input.is-valid { border-color: var(--vert); }
.ml-hint { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: var(--fs-sm); color: var(--rose); font-weight: 700; }

/* ---------- Alertes ---------- */
.ml-alert { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 24px; padding: 14px 16px; border: 2px solid var(--rose); border-radius: var(--r-sm); font-size: var(--fs-sm); line-height: 1.5; }
.ml-alert .i { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--rose); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.ml-alert strong { display: block; font-size: var(--fs-md); }

/* ---------- Motif des 5 filets ---------- */
.ml-filets { position: absolute; left: 0; right: 0; height: 66px; pointer-events: none; }
.ml-filets .l { position: absolute; right: 0; height: 3px; transform-origin: right center; animation: filet 1.4s var(--ease-out) both; }
.ml-filets .l1 { left: 58%; top: 0; background: var(--orange); }
.ml-filets .l2 { left: 48%; top: 14px; background: var(--vert); animation-delay: .1s; }
.ml-filets .l3 { left: 33%; top: 28px; background: var(--bleu); animation-delay: .2s; }
.ml-filets .l4 { left: 20%; top: 42px; background: var(--rose); animation-delay: .3s; }
.ml-filets .l5 { left: 12%; top: 56px; background: var(--prune); animation-delay: .4s; }
.ml-filets .dot { position: absolute; left: calc(12% - 13px); top: 50.5px; width: 14px; height: 14px; border: 3px solid var(--prune); border-radius: 50%; animation: pop .5s var(--ease-out) 1.2s both; }
@keyframes filet { from { transform: scaleX(0); } to { transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }

/* ---------- Apparition douce ---------- */
.ml-in { animation: mlIn .8s var(--ease-out) both; animation-delay: var(--d, 0s); }
@keyframes mlIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* =========================================================
   PAGE DE CONNEXION (radar.php)
   ========================================================= */
.login { min-height: 100vh; min-height: 100dvh; padding: 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }

/* Panneau d'accueil */
.login-side {
    position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--ink); color: #fff;
    padding: clamp(24px, 4vw, 56px); padding-bottom: 160px; display: flex; flex-direction: column; gap: 40px;
}
.login-side .logo { height: clamp(56px, 6vw, 80px); width: auto; display: block; }
.login-side .symbol { position: absolute; right: -8%; top: -10%; width: clamp(260px, 34vw, 520px); opacity: .07; pointer-events: none; }
.login-side .content { position: relative; margin-top: auto; max-width: 560px; }
.login-side .badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.login-side .badge svg { color: var(--orange); }
.login-side h2 { margin: 24px 0 0; font: 800 var(--fs-h1)/1 var(--titre); color: #fff; text-wrap: balance; }
.login-side h2::after { content: ''; display: block; width: 72px; height: 6px; margin-top: 20px; border-radius: 6px; background: var(--orange); }
.login-side p { margin: 20px 0 0; font-size: var(--fs-lg); line-height: 1.55; color: rgba(255, 255, 255, .85); }
.login-side p a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.login-side p a:hover { color: var(--orange); }
.login-side .ml-filets { bottom: 64px; }
.login-side .copy { position: absolute; left: clamp(24px, 4vw, 56px); bottom: 22px; font-size: var(--fs-xs); color: rgba(255, 255, 255, .5); }

/* Formulaire */
.login-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: clamp(32px, 6vw, 80px) clamp(12px, 4vw, 48px); }
.login-box { width: 100%; max-width: 440px; }
.login-box .ml-h2 { margin-top: 12px; }
.login-box .intro { margin: 12px 0 32px; color: var(--gris); font-size: var(--fs-md); }
.login-box .ml-btn { margin-top: 8px; }
.login-box .forgot { margin-top: 24px; text-align: center; }
.login-back { margin-top: 40px; display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--gris); text-decoration: none; transition: color .3s; }
.login-back:hover { color: var(--ink); }
.login-back svg { transition: transform .35s var(--ease-out); }
.login-back:hover svg { transform: translateX(-3px); }

/* Compte bloqué */
.lock-card { border-radius: var(--r-md); background: var(--ciel); padding: 28px; text-align: center; }
.lock-card .ic { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--rose); color: #fff; display: flex; align-items: center; justify-content: center; }
.lock-card h3 { margin: 0; font: 800 var(--fs-h3)/1.1 var(--titre); }
.lock-card p { margin: 8px 0 20px; font-size: var(--fs-sm); color: var(--gris); }
.lock-card #compte { display: inline-block; min-width: 120px; padding: 10px 18px; border-radius: 999px; background: #fff; font: 800 28px/1 var(--titre); letter-spacing: .04em; color: var(--rose); }

/* Secousse discrète si le formulaire est incomplet */
.shake { animation: shake .4s var(--ease-out); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

@media (min-width: 900px) {
    .login { height: 100vh; height: 100dvh; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .login-side { padding-bottom: 170px; }
}
@media (max-width: 899px) {
    .login-side { gap: 28px; padding-bottom: 150px; }
    .login-side h2 { font-size: clamp(36px, 9vw, 48px); }
    .login-side p { font-size: var(--fs-md); }
}

/* =========================================================
   STRUCTURE COMMUNE DES PAGES INTERNES
   (en-tête, contenu, pied de page) — à réutiliser sur chaque page
   ========================================================= */
body.ml-app { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }

/* ---------- En-tête ---------- */
.ml-topbar { position: sticky; top: 0; z-index: 50; padding: 12px 12px 0; }
.ml-topbar-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 10px 10px clamp(14px, 2vw, 24px);
    border-radius: 999px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid var(--ligne); transition: box-shadow .3s var(--ease-out);
}
.ml-topbar.is-scrolled .ml-topbar-inner { box-shadow: 0 18px 40px -24px rgba(29, 29, 27, .45); }
.ml-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); min-width: 0; }
.ml-brand img { height: 46px; width: auto; display: block; flex: none; }
.ml-brand .sep { width: 1px; height: 32px; background: var(--ligne); flex: none; }
.ml-brand .txt { display: flex; flex-direction: column; min-width: 0; }
.ml-brand .txt strong { font: 800 20px/1 var(--titre); white-space: nowrap; }
.ml-brand .txt span { margin-top: 3px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); white-space: nowrap; }
.ml-user { display: flex; align-items: center; gap: 12px; }
.ml-user .who { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.ml-user .who strong { font-size: var(--fs-sm); }
.ml-user .who span { margin-top: 3px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); }
.ml-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--prune); color: #fff; display: flex; align-items: center; justify-content: center; font: 800 20px/1 var(--titre); flex: none; }
.ml-logout {
    display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--ink);
    color: var(--ink); font-size: var(--fs-sm); font-weight: 700; text-decoration: none; transition: background .3s var(--ease-out), color .3s var(--ease-out);
}
.ml-logout:hover { background: var(--ink); color: #fff; }

/* ---------- Contenu ---------- */
.ml-page { flex: 1 0 auto; width: 100%; max-width: 1440px; margin: 0 auto; padding: 24px clamp(12px, 3vw, 40px) clamp(48px, 6vw, 80px); }

/* Bandeau d'accueil */
.ml-hello { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--ink); color: #fff; padding: clamp(28px, 4vw, 56px); padding-bottom: clamp(96px, 9vw, 120px); }
.ml-hello .symbol { position: absolute; right: -4%; top: -30%; width: clamp(220px, 28vw, 420px); opacity: .07; pointer-events: none; }
.ml-hello .ml-eyebrow { color: rgba(255, 255, 255, .7); }
.ml-hello h1 { position: relative; margin: 12px 0 0; font: 800 var(--fs-h1)/1 var(--titre); }
.ml-hello h1 .name { position: relative; display: inline-block; color: var(--orange); }
.ml-hello p { position: relative; margin: 16px 0 0; max-width: 640px; font-size: var(--fs-lg); line-height: 1.55; color: rgba(255, 255, 255, .85); }
.ml-hello .ml-filets { bottom: 28px; }
.ml-flash { position: relative; display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 10px 16px 10px 10px; border-radius: 999px; background: var(--vert); color: var(--ink); font-size: var(--fs-sm); font-weight: 700; }
.ml-flash .i { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--vert); display: flex; align-items: center; justify-content: center; }

/* Titres de section */
.ml-section { margin-top: clamp(40px, 5vw, 64px); }
.ml-section-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.ml-section-head h2 { margin: 0; font: 800 var(--fs-h2)/1 var(--titre); }
.ml-section-head .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--prune)); flex: none; }
.ml-section-head .line { flex: 1; height: 1px; background: var(--ligne); }

/* ---------- Cartes d'outils ---------- */
.ml-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.ml-tool {
    --c: var(--bleu); --soft: #E3F1FA; --on: var(--ink);
    position: relative; display: flex; flex-direction: column; min-height: 220px; padding: 24px; border-radius: 24px; background: #fff;
    border: 1.5px solid var(--ligne); color: var(--ink); text-decoration: none;
    transition: border-color .3s var(--ease-out), box-shadow .35s var(--ease-out), transform .35s var(--ease-out);
}
.ml-tool:hover { border-color: var(--c); color: var(--ink); box-shadow: 0 22px 40px -28px rgba(29, 29, 27, .45); transform: translateY(-2px); }
.ml-tool .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.ml-tool .ic { width: 52px; height: 52px; border-radius: 16px; background: var(--soft); color: var(--c); display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; transition: background .3s var(--ease-out), color .3s var(--ease-out); }
.ml-tool:hover .ic { background: var(--c); color: var(--on); }
.ml-tool h3 { margin: 0; font: 800 var(--fs-h3)/1.1 var(--titre); }
.ml-tool p { margin: 8px 0 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--gris); }
.ml-tool p strong { color: var(--ink); }
.ml-tool .go { margin-top: auto; padding-top: 20px; display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 700; color: var(--ink); }
.ml-tool .go svg { transition: transform .35s var(--ease-out); }
.ml-tool:hover .go svg { transform: translateX(3px); }
.ml-tool .badges { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* Couleurs des cartes (couleurs de la charte) */
.t-bleu { --c: var(--bleu); --soft: #E3F1FA; --on: var(--ink); }
.t-vert { --c: var(--vert); --soft: #EEF6DC; --on: var(--ink); }
.t-orange { --c: var(--orange); --soft: #FDEFD9; --on: var(--ink); }
.t-rose { --c: var(--rose); --soft: #FADDE7; --on: #fff; }
.t-prune { --c: var(--prune); --soft: #F3DFE9; --on: #fff; }
.t-ink { --c: var(--ink); --soft: #ECECEA; --on: #fff; }

/* Pastilles */
.ml-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; line-height: 1.2; white-space: nowrap; background: var(--ink); color: #fff; }
.ml-badge.is-soft { background: var(--soft, var(--ciel)); color: var(--ink); }
.ml-badge.is-new { background: var(--orange); color: var(--ink); }

/* Carte d'aide */
.ml-help { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-height: 220px; padding: 24px; border-radius: 24px; border: 1.5px dashed #BFCCD8; background: var(--ciel); }
.ml-help .ic { width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--prune); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 14px; }
.ml-help h3 { margin: 0; font: 800 20px/1.1 var(--titre); }
.ml-help p { margin: 6px 0 12px; font-size: var(--fs-sm); color: var(--gris); }

/* ---------- Pied de page ---------- */
.ml-footer { position: relative; flex: none; margin-top: auto; padding-top: 90px; }
.ml-footer .ml-filets { top: 0; }
.ml-footer .inner { max-width: 1440px; margin: 0 auto; padding: 20px clamp(12px, 3vw, 40px) 28px; border-top: 1px solid var(--ligne); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: var(--fs-xs); color: var(--gris); }
.ml-footer a { color: var(--gris); }
.ml-footer a:hover { color: var(--prune); }

/* ---------- Bouton secondaire (contour) ---------- */
.ml-btn-outline {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--ink);
    background: #fff; color: var(--ink); font-size: var(--fs-sm); font-weight: 700; text-decoration: none; white-space: nowrap;
    transition: background .3s var(--ease-out), color .3s var(--ease-out);
}
.ml-btn-outline:hover { background: var(--ink); color: #fff; }

/* ---------- Pastilles de couleur (lieux, périodes…) ---------- */
.c-bleu { --c: var(--bleu); --soft: #E3F1FA; }
.c-vert { --c: var(--vert); --soft: #EEF6DC; }
.c-orange { --c: var(--orange); --soft: #FDEFD9; }
.c-rose { --c: var(--rose); --soft: #FADDE7; }
.c-prune { --c: var(--prune); --soft: #F3DFE9; }
.c-ink { --c: var(--ink); --soft: #ECECEA; }
.c-autre { --c: #9AA5AF; --soft: #EEF1F4; }

/* ---------- Widget « Mon planning de la semaine » ---------- */
.ml-week { border: 1.5px solid var(--ligne); border-radius: 24px; padding: clamp(18px, 2.4vw, 28px); background: #fff; }
.ml-week-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.ml-week-label { margin: 8px 0 0 26px; font-size: var(--fs-sm); color: var(--gris); }
.ml-week-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.ml-day { border-radius: 18px; background: var(--ciel); padding: 14px; border: 2px solid transparent; }
.ml-day.is-today { background: #fff; border-color: var(--prune); }
.ml-day-head { display: flex; align-items: baseline; gap: 8px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid rgba(29, 29, 27, .1); }
.ml-day-head .wd { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gris); }
.ml-day-head .num { font: 800 24px/1 var(--titre); }
.ml-day-head .today { margin-left: auto; align-self: center; padding: 3px 8px; border-radius: 999px; background: var(--prune); color: #fff; font-size: 11px; font-weight: 700; }
.ml-day.is-today .wd { color: var(--prune); }
.ml-day-empty { margin: 0; font-size: var(--fs-sm); color: #8995A0; }
.ml-day-body { display: flex; flex-direction: column; gap: 12px; }
.ml-period { display: flex; flex-direction: column; gap: 6px; }
.ml-period-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); }
.ml-period-label .pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.ml-slot { position: relative; padding: 8px 10px 8px 14px; border-radius: 12px; background: #fff; box-shadow: 0 1px 0 rgba(29, 29, 27, .06); }
.ml-day.is-today .ml-slot { background: var(--ciel); }
.ml-slot::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c); }
.ml-slot .lieu { display: block; font-size: var(--fs-sm); font-weight: 700; }
.ml-slot .range { display: block; margin-top: 2px; font-size: var(--fs-xs); font-weight: 700; color: var(--gris); }
.ml-slot .tache { display: block; margin-top: 2px; font-size: var(--fs-xs); line-height: 1.4; color: var(--gris); }
@media (min-width: 640px) and (max-width: 1023px) { .ml-week-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ml-week-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ---------- Bandeau compact (pages outils) ---------- */
.ml-hello.is-compact { padding: clamp(24px, 3vw, 40px); padding-bottom: clamp(84px, 7vw, 100px); margin-bottom: 28px; }
.ml-hello.is-compact .row { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.ml-hello.is-compact h1 { font-size: clamp(34px, 4vw, 52px); display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ml-hello.is-compact p:not(.ml-eyebrow) { margin-top: 10px; font-size: var(--fs-md); }
.ml-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); font: 700 var(--fs-xs)/1 var(--texte); letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.ml-weeknav { display: inline-flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; }
.ml-weeknav button { width: 40px; height: 40px; border: none; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .3s var(--ease-out), color .3s var(--ease-out); }
.ml-weeknav button:hover { background: #fff; color: var(--ink); }
.ml-weeknav button:disabled { opacity: .4; cursor: progress; }
.ml-weeknav span { min-width: 210px; padding: 0 8px; text-align: center; font-size: var(--fs-sm); font-weight: 700; }
.ml-weeknav.hidden { display: none; }

/* =========================================================
   FORMULAIRES DE SAISIE (ex. Saisie Radar)
   Composants réutilisables : étapes, choix en boutons, compteurs, cases à cocher, barre d'envoi, notification
   ========================================================= */
.ml-form { max-width: 1100px; margin: 0 auto; }
.ml-step { border: 1.5px solid var(--ligne); border-radius: 24px; background: #fff; padding: clamp(20px, 3vw, 32px); margin-bottom: 16px; scroll-margin-top: 110px; transition: border-color .3s var(--ease-out); }
.ml-step.has-error { border-color: var(--rose); }
.ml-step-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.ml-step-head .n { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font: 800 20px/1 var(--titre); flex: none; transition: background .3s var(--ease-out), color .3s var(--ease-out); }
.ml-step.is-done .ml-step-head .n { background: var(--vert); color: var(--ink); }
.ml-step-head h2 { margin: 0; font: 800 var(--fs-h3)/1.1 var(--titre); }
.ml-step-head p { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--gris); }
fieldset.ml-q { border: 0; padding: 0; min-width: 0; }
fieldset.ml-q > legend { padding: 0; }
.ml-q { margin: 0 0 22px; }
.ml-q:last-child { margin-bottom: 0; }
.ml-q-label { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; font-size: var(--fs-md); font-weight: 700; }
.ml-q-label .opt { font-size: var(--fs-xs); font-weight: 700; color: var(--gris); }
.ml-q-error { display: none; margin: 8px 0 0; font-size: var(--fs-sm); font-weight: 700; color: var(--rose); }
.ml-q.has-error .ml-q-error { display: block; }
.ml-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 20px; }
.ml-step > .ml-grid-2:not(:last-child) > .ml-q { margin-bottom: 22px; }
@media (min-width: 760px) { .ml-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Choix en gros boutons (boutons radio) */
.ml-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.ml-choice { position: relative; }
.ml-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ml-choice > span {
    display: flex; flex-direction: column; justify-content: center; min-height: 52px; padding: 8px 18px; border-radius: 16px; border: 2px solid var(--ligne);
    background: #fff; font-size: var(--fs-md); font-weight: 700; color: var(--ink); cursor: pointer; user-select: none;
    transition: border-color .25s var(--ease-out), background .25s var(--ease-out), color .25s var(--ease-out);
}
.ml-choice > span small { font-size: var(--fs-xs); font-weight: 400; color: var(--gris); margin-top: 2px; transition: color .25s; }
.ml-choice > span i { margin-right: 8px; color: var(--gris); transition: color .25s; }
.ml-choice:hover > span { border-color: var(--ink); }
.ml-choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.ml-choice input:checked + span small, .ml-choice input:checked + span i { color: rgba(255, 255, 255, .8); }
.ml-choice input:focus-visible + span { outline: 3px solid var(--bleu); outline-offset: 2px; }
.ml-q.has-error .ml-choice > span { border-color: #F2B3C8; }

/* Compteurs + / − */
.ml-counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.ml-counter { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 18px; border-radius: 18px; background: var(--ciel); border: 2px solid transparent; transition: border-color .25s, background .25s; }
.ml-counter.is-on { background: #fff; border-color: var(--bleu); }
.ml-counter label { font-weight: 700; }
.ml-counter .ctrl { display: flex; align-items: center; gap: 4px; }
.ml-counter button { width: 44px; height: 44px; border-radius: 50%; border: none; background: #fff; color: var(--ink); font-size: 18px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .25s var(--ease-out), color .25s var(--ease-out); }
.ml-counter.is-on button { background: var(--ciel); }
.ml-counter button:hover { background: var(--ink); color: #fff; }
.ml-counter button:disabled { opacity: .35; cursor: default; background: #fff; color: var(--ink); }
.ml-counter input { width: 48px; border: none; background: transparent; text-align: center; font: 800 28px/1 var(--titre); color: var(--ink); -moz-appearance: textfield; }
.ml-counter input::-webkit-outer-spin-button, .ml-counter input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Cases à cocher en tuiles */
.ml-check-group { margin-bottom: 20px; }
.ml-check-group:last-child { margin-bottom: 0; }
.ml-check-group > p { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); }
.ml-check-group > p::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--bleu)); }
.ml-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 8px; }
.ml-check { position: relative; }
.ml-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ml-check span {
    display: flex; align-items: center; gap: 12px; height: 100%; min-height: 56px; padding: 10px 14px; border-radius: 16px; border: 2px solid var(--ligne);
    background: #fff; font-size: var(--fs-md); line-height: 1.3; cursor: pointer; user-select: none; transition: border-color .25s var(--ease-out), background .25s var(--ease-out);
}
.ml-check span::before {
    content: ''; flex: none; width: 24px; height: 24px; border-radius: 8px; border: 2px solid #B9C4CE; background: #fff center/14px no-repeat;
    transition: background-color .2s, border-color .2s;
}
.ml-check:hover span { border-color: var(--ink); }
.ml-check input:checked + span { background: var(--ciel); border-color: var(--ink); font-weight: 700; }
.ml-check input:checked + span::before { background-color: var(--ink); border-color: var(--ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }
.ml-check input:focus-visible + span { outline: 3px solid var(--bleu); outline-offset: 2px; }

/* Barre d'envoi collée en bas */
.ml-actionbar { position: sticky; bottom: 12px; z-index: 40; margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 20px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: 0 20px 40px -20px rgba(29, 29, 27, .6); }
.ml-actionbar .recap { font-size: var(--fs-sm); color: rgba(255, 255, 255, .8); }
.ml-actionbar .recap strong { color: #fff; }
.ml-actionbar .btns { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ml-actionbar .reset { height: 48px; padding: 0 16px; border: none; border-radius: 999px; background: transparent; color: rgba(255, 255, 255, .8); font: 700 var(--fs-sm) var(--texte); cursor: pointer; transition: color .25s, background .25s; }
.ml-actionbar .reset:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.ml-actionbar .save { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px; border: none; border-radius: 999px; background: var(--orange); color: var(--ink); font: 700 var(--fs-md) var(--texte); cursor: pointer; transition: background .25s var(--ease-out); }
.ml-actionbar .save:hover { background: #fff; }
.ml-actionbar .save:disabled { opacity: .7; cursor: progress; }
@media (max-width: 640px) {
    .ml-actionbar { border-radius: 24px; padding: 10px; gap: 8px; }
    .ml-actionbar .reset { height: 44px; padding: 0 12px; }
    .ml-actionbar .save { height: 48px; }
    .ml-actionbar .recap { width: 100%; text-align: center; font-size: var(--fs-xs); }
    .ml-toast { bottom: 140px; }
    .ml-actionbar .btns { width: 100%; }
    .ml-actionbar .save { flex: 1; justify-content: center; }
}

/* Message d'erreur général du formulaire */
.ml-form-error { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; padding: 16px 18px; border-radius: 18px; background: #FADDE7; color: var(--ink); font-weight: 700; scroll-margin-top: 110px; }
.ml-form-error .i { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--rose); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; }

/* Notification de réussite */
.ml-toast { position: fixed; left: 50%; bottom: 96px; z-index: 100; display: flex; align-items: center; gap: 14px; min-width: min(92vw, 380px); padding: 16px 20px 16px 16px; border-radius: 20px; background: #fff; box-shadow: 0 24px 50px -20px rgba(29, 29, 27, .5); overflow: hidden; transform: translate(-50%, 140%); opacity: 0; pointer-events: none; transition: transform .45s var(--ease-out), opacity .3s; }
.ml-toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.ml-toast .ok { width: 44px; height: 44px; border-radius: 50%; background: var(--vert); color: var(--ink); display: flex; align-items: center; justify-content: center; flex: none; font-size: 18px; }
.ml-toast strong { display: block; font: 800 20px/1.1 var(--titre); }
.ml-toast span { font-size: var(--fs-sm); color: var(--gris); }
.ml-toast .bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--vert); transform-origin: left; transform: scaleX(0); }
.ml-toast.is-visible .bar { animation: toastBar 3s linear forwards; }
@keyframes toastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (max-width: 899px) {
    .ml-brand .sep, .ml-brand .txt, .ml-user .who { display: none; }
    .ml-logout .lbl { display: none; }
    .ml-logout { width: 44px; padding: 0; justify-content: center; }
    .ml-brand img { height: 40px; }
    .ml-tool, .ml-help { min-height: 0; }
    .ml-tool .top { margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
