/* ══════════════════════════════════════════════════════
   MES STYLES (espace compte, src/pages/settings/styles.js) — maquette
   « Mes styles (profil) — FR ». Préfixe .ms-.
══════════════════════════════════════════════════════ */
.ms{display:flex;flex-direction:column;gap:72px;font-size:16px;line-height:1.5;color:var(--encre);padding-bottom:96px}
.ms :focus-visible{outline:2px solid var(--bleu-fonce);outline-offset:2px}
.ms-eyebrow{font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.ms-blue{color:var(--bleu-fonce)}
.ms-serif{font-family:var(--serif);font-weight:500}
.ms-it{font-family:var(--serif);font-style:italic;font-weight:500;letter-spacing:-.01em}
.ms-muted{color:var(--muted)}
.ms-h1{font-size:52px;line-height:1.02;font-weight:600;letter-spacing:-.03em;text-wrap:balance}
.ms-h2{font-size:36px;line-height:1.08;font-weight:600;letter-spacing:-.02em}
.ms-lead{font-size:18px;line-height:1.55;color:var(--muted);max-width:560px}

/* En-tête, curseurs et carte collante */
.ms-top{display:grid;grid-template-columns:minmax(0,1fr) 400px;grid-template-areas:"head card" "detail card";column-gap:56px;row-gap:64px;align-items:start}
.ms-head{grid-area:head;display:flex;flex-direction:column;gap:16px;padding-top:8px}
.ms-anchors{list-style:none;display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.ms-anchors a{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border-radius:999px;background:var(--voile);color:var(--encre);text-decoration:none;font-size:14px}
.ms-anchors a:hover{background:var(--trait)}
.ms-anchors a span{color:var(--bleu-fonce);font-weight:600}
.ms-detail{grid-area:detail;display:flex;flex-direction:column;gap:28px;scroll-margin-top:96px}
.ms-sec-h{display:flex;flex-direction:column;gap:8px;max-width:640px}
.ms-axes{display:flex;flex-direction:column}
.ms-axis{display:grid;grid-template-columns:170px 1fr;gap:32px;align-items:center;padding:18px 0;border-top:1px solid var(--trait)}
.ms-axis-h{display:flex;flex-direction:column}
.ms-axis-l{font-size:24px;line-height:1.1}
.ms-axis-help{font-size:13px;color:var(--muted)}
.ms-axis-ctl{display:flex;flex-direction:column;gap:4px}
.ms-poles{display:flex;justify-content:space-between;font-size:13px;color:var(--muted)}
.ms-pole-m{color:transparent}
.ms-poles[data-side="l"] .ms-pole-l,.ms-poles[data-side="r"] .ms-pole-r{font-weight:600;color:var(--encre)}
.ms-poles[data-side="m"] .ms-pole-m{font-weight:600;color:var(--bleu-fonce)}
.ms input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:44px;background:transparent;cursor:pointer}
.ms input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:999px;background:var(--trait)}
.ms input[type=range]::-moz-range-track{height:4px;border-radius:999px;background:var(--trait)}
.ms input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:22px;height:22px;border-radius:999px;background:var(--bleu-fonce);margin-top:-9px;border:3px solid #fff;box-shadow:0 1px 4px rgba(11,11,15,.25)}
.ms input[type=range]::-moz-range-thumb{width:16px;height:16px;border-radius:999px;background:var(--bleu-fonce);border:3px solid #fff;box-shadow:0 1px 4px rgba(11,11,15,.25)}

.ms-card{grid-area:card;position:sticky;top:84px;background:var(--purple);border-radius:28px;padding:16px}
.ms-card-in{background:#fff;border-radius:20px;padding:24px;display:flex;flex-direction:column;gap:18px}
.ms-card-id{display:flex;gap:14px;align-items:center}
.ms-card-id div{display:flex;flex-direction:column;gap:2px;min-width:0}
.ms-card-av{width:56px;height:56px;border-radius:999px;background:var(--sable);flex:0 0 auto}
.ms-card-name{font-size:26px;line-height:1}
.ms-card-lead{font-size:11px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.ms-mix{display:flex;flex-direction:column;gap:14px;border-top:1px solid var(--trait);padding-top:18px}
.ms-mix-h{font-size:26px;line-height:1.15;margin-top:-10px}
.ms-mix-bar{display:flex;height:10px;border-radius:999px;overflow:hidden;background:var(--voile)}
.ms-mix-bar span{transition:width 240ms ease-out}
.ms-mix-list{list-style:none;display:flex;flex-direction:column}
.ms-mix-list li{display:flex;flex-direction:column;gap:2px;padding:10px 0;border-top:1px solid var(--trait)}
.ms-mix-row{display:flex;align-items:center;gap:10px;font-size:14px}
.ms-sw{width:10px;height:10px;border-radius:3px;flex:none}
.ms-mix-l{flex:1;font-weight:600}
.ms-mix-pct{font-variant-numeric:tabular-nums;color:var(--muted)}
.ms-mix-names{padding-left:20px;font-size:13px}
.ms-mix-names.ms-empty{color:var(--gris)}
.ms-note{font-size:12px;color:var(--muted)}

/* Sections univers et variantes */
.ms-sec{display:flex;flex-direction:column;gap:28px;scroll-margin-top:96px}
.ms-sec-top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:24px}
.ms-tabs{display:flex;flex-wrap:wrap;gap:4px;padding:3px;background:var(--voile);border:1px solid var(--trait);border-radius:24px}
.ms-tab{min-height:44px;padding:0 16px;border:0;border-radius:999px;background:transparent;color:var(--encre);font:inherit;font-size:14px;cursor:pointer;white-space:nowrap}
.ms-tab[aria-selected="true"]{background:var(--purple);font-weight:600}
.ms-styles{list-style:none;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:28px 18px}
.ms-style,.ms-var{position:relative;width:100%;border:0;padding:0;font:inherit;text-align:left;cursor:pointer;background:transparent;color:inherit;display:flex;flex-direction:column;gap:10px}
.ms-ph{position:relative;display:block;aspect-ratio:4/5;border-radius:14px;overflow:hidden;background:var(--voile)}
.ms-ph img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.ms-ph .ms-ph-b{opacity:0;transition:opacity 200ms ease-out}
.ms-style:hover .ms-ph-b{opacity:1}
.ms-style:hover .ms-ph,.ms-var:hover .ms-ph{box-shadow:0 0 0 1px var(--encre)}
.ms-style[data-level="1"] .ms-ph{box-shadow:0 0 0 2px var(--encre)}
.ms-style[data-level="2"] .ms-ph{box-shadow:0 0 0 3px var(--purple)}
.ms-badge{position:absolute;top:10px;right:10px;min-height:28px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:600;display:inline-flex;align-items:center}
.ms-badge-like{background:var(--encre);color:#fff}
.ms-badge-love{background:var(--purple);color:var(--encre)}
.ms-group{position:absolute;left:10px;bottom:10px;padding:2px 8px;border-radius:999px;background:rgba(255,255,255,.88);font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.ms-style-txt{display:flex;flex-direction:column;gap:2px}
.ms-style-txt strong{font-size:17px;font-weight:600}
.ms-style-txt span{font-size:14px;color:var(--muted)}
.ms-none{padding:32px;border:1px dashed var(--gris);border-radius:16px;color:var(--muted)}
.ms-var-row{display:grid;grid-template-columns:220px 1fr;gap:32px;padding:28px 0;border-top:1px solid var(--trait)}
.ms-var-h{display:flex;flex-direction:column;gap:6px}
.ms-var-h strong{font-size:20px;font-weight:600;letter-spacing:-.01em}
.ms-var-h > span:last-child{font-size:14px;color:var(--muted)}
.ms-badge-inline{align-self:flex-start;font-size:12px;font-weight:600;padding:2px 10px;border-radius:999px}
.ms-vars{display:grid;grid-template-columns:repeat(3,minmax(0,170px));gap:16px}
.ms-var{gap:6px}
.ms-ph-var{aspect-ratio:3/4;border-radius:10px}
.ms-var[aria-pressed="false"] .ms-ph img{opacity:.9}
.ms-var[aria-pressed="true"] .ms-ph{box-shadow:0 0 0 3px var(--encre)}
.ms-check{display:none;position:absolute;top:8px;right:8px;width:26px;height:26px;border-radius:999px;background:var(--encre);color:#fff;align-items:center;justify-content:center;font-size:13px}
.ms-var[aria-pressed="true"] .ms-check{display:flex}
.ms-var-txt{display:flex;flex-direction:column}
.ms-var-txt strong{font-size:14px;font-weight:600}
.ms-var-txt span{font-size:12px;color:var(--muted)}

/* Barre d'enregistrement et confirmation (le bouton « ✦ Personnaliser » de
   l'onboarding s'efface tant que la barre est affichée, pour ne pas la chevaucher) */
body:has(#msBar:not([hidden])) #obMini{display:none}
.ms-bar{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:140;width:min(720px,calc(100% - 48px));background:var(--encre);color:#f4f5fa;border-radius:999px;padding:10px 10px 10px 28px;display:flex;align-items:center;justify-content:space-between;gap:16px;box-shadow:0 20px 50px rgba(11,11,15,.25);font-size:14px}
.ms-bar[hidden]{display:none}
.ms-bar-btns{display:flex;gap:8px}
.ms-bar button{min-height:44px;border-radius:999px;font:inherit;font-size:14px;cursor:pointer}
.ms-bar-cancel{padding:0 18px;border:1px solid #2a2d3a;background:transparent;color:#f4f5fa}
.ms-bar-cancel:hover{border-color:#f4f5fa}
.ms-bar-save{padding:0 22px;border:0;background:var(--purple);color:var(--encre);font-weight:600}
.ms-bar-save:hover{background:#fff}
.ms-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:140;background:#fff;border:1px solid var(--trait);border-radius:999px;padding:12px 22px;box-shadow:0 12px 32px rgba(11,11,15,.12);font-size:14px;font-weight:600;white-space:nowrap}
.ms-toast:empty{display:none}

/* Animations (aucune si prefers-reduced-motion) */
@keyframes ms-fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:no-preference){.ms-fade,.ms-bar,.ms-toast{animation:ms-fade 220ms ease-out both}}
@media (prefers-reduced-motion:reduce){.ms-mix-bar span,.ms-ph .ms-ph-b{transition:none}}

/* Tablette et mobile */
@media(max-width:1280px){.ms-styles{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1100px){
  .ms-top{grid-template-columns:1fr;grid-template-areas:"head" "card" "detail";row-gap:40px}
  .ms-card{position:static}
  .ms-styles{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:768px){
  .ms{gap:56px}
  .ms-h1{font-size:40px}.ms-h2{font-size:28px}.ms-lead{font-size:16px}
  .ms-axis{grid-template-columns:1fr;gap:4px}
  .ms-styles{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 12px}
  .ms-var-row{grid-template-columns:1fr;gap:16px}
  .ms-vars{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  .ms-tabs{border-radius:20px}
  .ms-bar{bottom:72px;padding:8px 8px 8px 16px;border-radius:24px;flex-wrap:wrap}
  .ms-toast{bottom:72px;white-space:normal;width:calc(100% - 32px);text-align:center;border-radius:20px}
}
