/* Clipsy — habillage (10 octobre 2026, choix du fondateur : noir, accents violets, inspiré des outils de montage
   comme Instories et CapCut). Le violet et le rose viennent de la charte « Studio nuit » ; la police est Space Grotesk. */
@font-face { font-family: "Space Grotesk"; src: url("/police.ttf"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "m-bebas"; src: url("/polices/bebas.ttf"); font-display: swap; }
@font-face { font-family: "m-anton"; src: url("/polices/anton.ttf"); font-display: swap; }
@font-face { font-family: "m-poppins"; src: url("/polices/poppins.ttf"); font-display: swap; }
@font-face { font-family: "m-archivo"; src: url("/polices/archivo.ttf"); font-display: swap; }
@font-face { font-family: "m-serif"; src: url("/polices/serif.ttf"); font-display: swap; }
@font-face { font-family: "m-spacegrotesk"; src: url("/polices/spacegrotesk.ttf"); font-display: swap; }

:root {
  --fond: #000; --surface: #131316; --surface2: #1D1D22; --trait: #2B2B33; --blanc: #fff; --doux: #9C9CA8;
  --violet: #8B5CF6; --violet-vif: #A78BFA; --rose: #F0488B; --son: #2DD4BF;
  --rayon: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--fond); color: var(--blanc); overscroll-behavior: none; }
body { font-family: "Space Grotesk", system-ui, -apple-system, sans-serif; font-size: 16px; line-height: 1.4;
       -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--violet-vif); outline-offset: 2px; }
svg.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
         stroke-linejoin: round; flex: none; }
svg.ic.plein { fill: currentColor; stroke: none; }

/* ── Écrans ordinaires ── */
.ecran { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column;
         padding: calc(env(safe-area-inset-top) + 14px) 20px calc(env(safe-area-inset-bottom) + 28px); }
.ecran.centre { justify-content: center; align-items: center; text-align: center; }
.tete { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 22px; }
.tete .pousse { flex: 1; }
.logo { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; min-height: 44px; display: inline-flex; align-items: center; }
.logo i { color: var(--violet); font-style: normal; }
.rond { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); flex: none; }
.rond.nu { background: none; }
.rond:disabled { opacity: .3; }
h1 { font-size: 30px; line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 10px; font-weight: 700; }
h2 { font-size: 17px; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 14px; }
.doux { color: var(--doux); font-size: 14.5px; }
.lien { color: var(--doux); font-weight: 500; min-height: 44px; padding: 0 4px; }

.principal { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px;
             border-radius: 18px; background: var(--violet); color: #fff; font-weight: 700; font-size: 17px;
             transition: transform .08s, opacity .15s; }
.principal:active { transform: scale(.98); }
.principal:disabled { opacity: .35; }
.second { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px;
          border-radius: 18px; background: var(--surface2); color: #fff; font-weight: 600; }
.pile > * + * { margin-top: 10px; }
.deux { display: flex; gap: 10px; }
.deux > * { flex: 1; }

.alerte { background: #2A1220; border: 1px solid #5B2140; color: #FFC2D9; border-radius: 14px; padding: 12px 14px;
          font-size: 15px; }

/* Champs */
label, legend { display: block; font-weight: 600; font-size: 15px; margin: 0 0 8px; padding: 0; }
label small, legend small, summary small { font-weight: 400; color: var(--doux); }
textarea, select, input[type=text], input[type=password] {
  font: inherit; width: 100%; border-radius: 14px; border: 1px solid var(--trait); background: var(--surface);
  color: #fff; padding: 14px; min-height: 52px; appearance: none; -webkit-appearance: none; }
textarea { resize: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--doux) 50%), linear-gradient(135deg, var(--doux) 50%, transparent 50%);
         background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
::placeholder { color: #5E5E69; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.champ { margin-top: 20px; }
.champ .doux { margin: 8px 0 0; }
.puces { display: flex; gap: 8px; }
.puces label { flex: 1; margin: 0; font-weight: 500; }
.puces input { position: absolute; opacity: 0; pointer-events: none; }
.puces span { display: block; text-align: center; padding: 13px 4px; border-radius: 12px; background: var(--surface);
              border: 1px solid var(--trait); min-height: 48px; }
.puces input:checked + span { background: var(--violet); border-color: var(--violet); font-weight: 700; }
.puces input:focus-visible + span { outline: 2px solid var(--violet-vif); outline-offset: 2px; }
details { border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--trait); padding: 0 16px; margin-top: 20px; }
summary { cursor: pointer; font-weight: 600; min-height: 54px; display: flex; align-items: center; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--doux);
                 border-bottom: 2px solid var(--doux); transform: rotate(45deg); transition: transform .2s; }
details[open] summary::after { transform: rotate(-135deg); }
details[open] { padding-bottom: 18px; }
details .champ:first-child { margin-top: 4px; }

/* Accueil : trois cartes illustrées (une grande, deux moyennes), puis les créations récentes. */
.formats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.carte { position: relative; display: flex; flex-direction: column; justify-content: flex-end; text-align: left; overflow: hidden;
         border-radius: 26px; padding: 16px; min-height: 216px; color: #fff; isolation: isolate;
         transition: transform .12s ease; }
.carte:active { transform: scale(.975); }
.carte.grande { grid-column: 1 / -1; min-height: 196px; }
.carte[data-format=reel] { background: radial-gradient(120% 140% at 85% 0%, #B79CFF 0%, #8B5CF6 38%, #4B1FB8 100%); }
.carte[data-format=post] { background: radial-gradient(130% 120% at 90% 0%, #FF9FC4 0%, #F0488B 42%, #9B1754 100%); }
.carte[data-format=story] { background: radial-gradient(130% 120% at 90% 0%, #FFD08A 0%, #F97316 44%, #A63A06 100%); }
.carte .mots { position: relative; z-index: 2; max-width: 62%; }
.carte:not(.grande) .mots { max-width: 100%; }
.carte .mots b { display: block; font-size: 26px; line-height: 1.05; letter-spacing: -0.03em; }
.carte.grande .mots b { font-size: 34px; }
.carte .mots small { display: block; font-size: 13.5px; line-height: 1.3; margin-top: 5px; color: rgba(255,255,255,.88); }
.carte .aller { position: absolute; z-index: 2; top: 14px; left: 14px; width: 38px; height: 38px; border-radius: 50%;
                background: rgba(255,255,255,.2); display: grid; place-items: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.carte .aller .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.dessin { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.dessin i, .dessin s, .dessin u { position: absolute; display: block; font-style: normal; text-decoration: none; }
/* Reel : trois plans qui se chevauchent, le dernier avec un bouton de lecture, et une onde de musique. */
.dessin.reel .plan { width: 84px; height: 148px; border-radius: 16px; top: 22px; box-shadow: 0 14px 30px rgba(20,0,60,.45); }
.dessin.reel .un { right: 150px; transform: rotate(-9deg); background: linear-gradient(160deg, #2A1466, #150B38); opacity: .9; }
.dessin.reel .deux { right: 88px; top: 14px; transform: rotate(-2deg); background: linear-gradient(160deg, #FFB3D1, #F0488B); }
.dessin.reel .trois { right: 22px; top: 26px; transform: rotate(7deg); background: linear-gradient(160deg, #fff, #E4D9FF); display: grid; place-items: center; color: #4B1FB8; }
.dessin.reel .trois .ic { width: 34px; height: 34px; }
.dessin.reel .onde { left: 66px; right: 58%; top: 22px; height: 22px; opacity: .5;
                     background: repeating-linear-gradient(90deg, #fff 0 3px, transparent 3px 8px);
                     -webkit-mask: linear-gradient(90deg, #000, transparent); mask: linear-gradient(90deg, #000, transparent);
                     clip-path: polygon(0 40%, 8% 10%, 16% 55%, 24% 0, 32% 60%, 40% 25%, 48% 70%, 56% 15%, 64% 50%, 72% 5%, 80% 65%, 88% 30%, 100% 50%, 100% 100%, 0 100%); }
/* Post : trois pages empilées, la première écrite. */
.dessin.post .pagette { width: 86px; height: 108px; border-radius: 14px; right: 18px; top: 18px; box-shadow: 0 12px 26px rgba(70,0,30,.4); }
.dessin.post .trois { transform: rotate(14deg) translate(10px, 4px); background: rgba(255,255,255,.28); }
.dessin.post .deux { transform: rotate(7deg) translate(5px, 2px); background: rgba(255,255,255,.55); }
.dessin.post .un { background: #fff; color: #9B1754; padding: 12px 10px; }
.dessin.post .un b { font-family: "m-serif", serif; font-size: 28px; line-height: 1; font-weight: 400; display: block; }
.dessin.post .un u { left: 10px; right: 22px; height: 5px; border-radius: 5px; background: #F5C6D8; top: 56px; }
.dessin.post .un u + u { top: 68px; right: 36px; }
/* Story : un écran vertical avec ses barres de progression. */
.dessin.story .ecran-story { width: 74px; height: 124px; border-radius: 16px; right: 20px; top: 16px; background: linear-gradient(170deg, #1B1024, #3A1A05);
                             box-shadow: 0 12px 26px rgba(60,20,0,.45); transform: rotate(6deg); color: #fff; }
.dessin.story s { top: 9px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.4); width: 16px; left: 9px; }
.dessin.story s + s { left: 29px; background: #fff; }
.dessin.story s + s + s { left: 49px; background: rgba(255,255,255,.4); }
.dessin.story .ecran-story b { position: absolute; left: 10px; bottom: 30px; font-family: "m-anton", sans-serif; font-size: 26px; font-weight: 400; line-height: 1; color: #FFD08A; }
.dessin.story .ecran-story u { left: 10px; right: 20px; bottom: 16px; height: 5px; border-radius: 5px; background: rgba(255,255,255,.55); }

.titre-rangee { margin: 30px 0 12px; font-size: 19px; }
.recents { display: flex; gap: 10px; overflow-x: auto; margin: 0 -20px; padding: 0 20px 4px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-left: 20px; }
.recents::-webkit-scrollbar { display: none; }
.recent { position: relative; flex: none; width: 112px; height: 168px; border-radius: 16px; overflow: hidden; background: var(--surface) center / cover no-repeat;
          scroll-snap-align: start; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.recent::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72), transparent 46%); }
.recent .quoi { position: absolute; left: 9px; bottom: 8px; z-index: 1; font-size: 12px; font-weight: 600; text-align: left; line-height: 1.25; }
.recent .quoi small { display: block; font-weight: 400; color: rgba(255,255,255,.75); font-size: 11px; }
.recent .lecture { position: absolute; right: 8px; top: 8px; z-index: 1; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; }
.recent .lecture .ic { width: 13px; height: 13px; }
.bas { margin-top: auto; padding-top: 28px; }

/* Dépôt */
.zone { width: 100%; border: 1.5px dashed #3A3A45; border-radius: 22px; padding: 26px 16px; display: flex; flex-direction: column;
        align-items: center; gap: 10px; background: var(--surface); }
.zone .rond { background: var(--violet); width: 52px; height: 52px; }
.zone b { font-size: 17px; }
.zone small { color: var(--doux); font-size: 14px; text-align: center; }
.zone.petite { flex-direction: row; padding: 12px 16px; border-radius: 16px; }
.zone.petite .rond { width: 36px; height: 36px; }
.zone.petite small { display: none; }
ul.liste { list-style: none; margin: 12px 0 0; padding: 0; }
ul.liste li { position: relative; display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 14px;
              padding: 10px 6px 12px 12px; margin-top: 8px; overflow: hidden; }
ul.liste .vig { width: 40px; height: 40px; border-radius: 10px; background: var(--surface2); display: grid; place-items: center; color: var(--doux); flex: none; }
ul.liste .nom { flex: 1; min-width: 0; }
ul.liste .nom b { display: block; font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.liste .nom small { color: var(--doux); font-size: 13px; }
ul.liste li.fait .nom small { color: var(--son); }
ul.liste li.erreur { border: 1px solid #7A2A4D; }
ul.liste li.erreur .nom small { color: #FF9CC0; }
ul.liste .jauge { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--violet); transition: width .2s; }
ul.liste li.fait .jauge { opacity: 0; }
.avec-pied { padding-bottom: calc(env(safe-area-inset-bottom) + 108px); }
.pied { position: fixed; left: 0; right: 0; bottom: 0; padding: 22px 20px calc(env(safe-area-inset-bottom) + 18px);
        background: linear-gradient(to top, #000 68%, transparent); z-index: 5; }
.pied > * { max-width: 480px; margin: 0 auto; }

/* Attente */
.anneau { width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 26px; position: relative; }
.anneau::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
                  background: conic-gradient(var(--violet) var(--part, 25%), var(--surface2) 0);
                  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
                  mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px)); }
.anneau.tourne::before { animation: tourne 1.1s linear infinite; }
.anneau span { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .anneau.tourne::before { animation-duration: 4s; } }
.etapes { display: flex; gap: 6px; margin: 22px 0 18px; }
.etapes i { width: 34px; height: 4px; border-radius: 4px; background: var(--surface2); }
.etapes i.fait { background: var(--violet); }
.etapes i.encours { background: linear-gradient(90deg, var(--violet), var(--rose)); }

/* Résultat */
.cadre { align-self: center; width: 100%; display: flex; justify-content: center; margin: 2px 0 18px; }
.cadre video { max-height: 58dvh; max-width: 100%; border-radius: 22px; background: var(--surface); display: block; }
.images { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px 6px; padding: 0 20px 8px; scrollbar-width: none; }
.images::-webkit-scrollbar { display: none; }
/* La place de chaque image est réservée avant qu'elle n'arrive : la page ne saute pas. */
.images img { flex: 0 0 78%; scroll-snap-align: center; border-radius: 20px; background: var(--surface); width: 78%; aspect-ratio: 4 / 5; object-fit: cover; }
.images.hautes img { flex-basis: 62%; width: 62%; aspect-ratio: 9 / 16; }
.legende { position: relative; background: var(--surface); border: 1px solid var(--trait); border-radius: 16px; padding: 14px 16px;
           white-space: pre-wrap; font-size: 15.5px; margin: 6px 0 18px; }

/* ── Atelier de montage ─────────────────────────────────────────────────────────────────────────────────────── */
#montage { position: fixed; inset: 0; display: flex; flex-direction: column; background: #000; overflow: hidden;
           padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); user-select: none; -webkit-user-select: none;
           -webkit-touch-callout: none; }
.m-haut { flex: none; height: 54px; display: flex; align-items: center; gap: 2px; padding: 0 10px; }
.m-haut .pousse { flex: 1; }
.m-haut .principal { width: auto; min-height: 40px; padding: 0 18px; border-radius: 13px; font-size: 15px; }
.m-scene { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 4px 12px 0; position: relative; }
#m-ecran { position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: 100%; background: #0B0B0D; border-radius: 12px; overflow: hidden;
           touch-action: none; user-select: none; -webkit-user-select: none; }
/* Le texte choisi porte un cadre ; pendant qu'on le déplace, un trait marque le milieu quand il s'y pose. */
#m-texte { width: max-content; max-width: 100%; }
#m-texte.choisi { outline: 1.5px dashed rgba(255,255,255,.8); outline-offset: 4px; border-radius: 4px; }
#m-ecran.au-milieu::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--violet-vif); pointer-events: none; }
#m-ecran video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; visibility: hidden; transform-origin: center; }
#m-ecran video.actif { visibility: visible; }
/* L'écran partagé se dessine par-dessus la vidéo, à partir de son image : l'aperçu montre le vrai découpage. */
#m-partage { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#m-texte { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; color: #fff;
           white-space: nowrap; line-height: 1.15; paint-order: stroke fill; pointer-events: none; }
#m-patience { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; color: var(--doux); }
.m-transport { flex: none; height: 48px; display: flex; align-items: center; padding: 0 16px; position: relative; }
.m-transport span { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--doux); }
.m-transport span b { color: #fff; font-weight: 500; }
.m-transport #m-jouer { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; display: grid; place-items: center; }
.m-transport #m-jouer .ic { width: 30px; height: 30px; }
/* Agrandir ou resserrer la barre : les deux boutons font ce que font deux doigts écartés ou rapprochés. */
.m-echelle { margin-left: auto; display: flex; gap: 8px; }
.m-echelle button { width: 36px; height: 36px; border-radius: 50%; background: var(--surface2); color: #fff; font-size: 21px; line-height: 1;
                    display: grid; place-items: center; }
.m-echelle button:disabled { opacity: .35; }

.m-rail-cadre { flex: none; position: relative; height: 162px; border-top: 1px solid #17171B; background: #060607; }
#m-barre { position: absolute; inset: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; touch-action: pan-x; }
#m-barre::-webkit-scrollbar { display: none; }
#m-rail { display: flex; height: 100%; width: max-content; }
.m-marge { flex: none; height: 1px; }
#m-piste { position: relative; flex: none; height: 100%; }
.m-tete-fixe { position: absolute; left: 50%; top: 6px; bottom: 6px; width: 2px; margin-left: -1px; background: #fff; border-radius: 2px;
               pointer-events: none; z-index: 6; box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
.m-regle { position: absolute; left: 0; right: 0; top: 0; height: 16px; font-size: 10px; color: #55555F; pointer-events: none; }
.m-regle i { position: absolute; top: 2px; font-style: normal; transform: translateX(-50%); }
#m-textes { position: absolute; left: 0; right: 0; top: 20px; height: 30px; }
#m-plans { position: absolute; left: 0; top: 58px; height: 58px; display: flex; }
#m-musique { position: absolute; left: 0; right: 0; top: 124px; height: 28px; }

.m-plan { position: relative; flex: none; height: 58px; border-radius: 9px; overflow: visible; background: var(--surface2);
          background: none; }
/* La largeur d'un plan dit exactement sa durée : l'espace entre deux plans est pris à l'intérieur. */
.m-plan .film { position: absolute; inset: 0 1px; border-radius: 9px; overflow: hidden; display: flex; pointer-events: none;
                background: var(--surface2); }
.m-plan .film i { flex: 1; background: center / cover no-repeat; }
.m-plan .puce { position: absolute; left: 4px; top: 4px; font-size: 10.5px; font-weight: 600; background: rgba(0,0,0,.62);
                border-radius: 5px; padding: 1px 5px; pointer-events: none; white-space: nowrap; }
.m-plan.choisi { z-index: 3; }
.m-plan.choisi .film { box-shadow: inset 0 0 0 2.5px #fff; }
.m-plan.leve { z-index: 8; opacity: .94; filter: drop-shadow(0 10px 18px rgba(0,0,0,.8)); }
.m-plan.leve .film { box-shadow: inset 0 0 0 2.5px var(--violet); }
.m-plan.pousse { transition: transform .15s; }
.poignee { position: absolute; top: -2.5px; bottom: -2.5px; width: 20px; background: #fff; display: grid; place-items: center;
           touch-action: none; z-index: 4; }
.poignee::after { content: ""; width: 3px; height: 18px; border-radius: 3px; background: #000; opacity: .65; }
.poignee.g { left: -19px; border-radius: 9px 0 0 9px; }
.poignee.d { right: -19px; border-radius: 0 9px 9px 0; }
.m-plan .poignee { top: 0; bottom: 0; }
.m-passage { position: absolute; top: 17px; width: 24px; height: 24px; margin-left: -13px; border-radius: 7px; background: #fff; color: #000;
             display: grid; place-items: center; z-index: 2; box-shadow: 0 1px 4px rgba(0,0,0,.6); }
.m-passage .ic { width: 15px; height: 15px; stroke-width: 2.4; }
.m-passage.coupe { background: #3A3A44; color: #fff; }
.m-passage.choisi { background: var(--violet); color: #fff; }

.m-bloc-texte { position: absolute; top: 0; height: 30px; border-radius: 8px; background: #3B2A78; color: #E4D9FF; font-size: 12px;
                font-weight: 600; padding: 0 8px; overflow: visible; white-space: nowrap; text-align: left; line-height: 30px;
                box-shadow: inset 0 0 0 1px rgba(167,139,250,.45); }
.m-bloc-texte span { display: block; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.m-bloc-texte.choisi { background: var(--violet); color: #fff; box-shadow: 0 0 0 2px #fff; z-index: 3; touch-action: none; }
.m-bloc-texte .poignee { top: -2px; bottom: -2px; width: 16px; }
.m-bloc-texte .poignee.g { left: -15px; border-radius: 8px 0 0 8px; }
.m-bloc-texte .poignee.d { right: -15px; border-radius: 0 8px 8px 0; }
.m-bloc-texte .poignee::after { height: 12px; }
#m-bloc-musique { position: absolute; inset: 0; border-radius: 8px; overflow: hidden; text-align: left; padding: 0 10px; font-size: 12px;
                  font-weight: 600; color: #B8FFF4; line-height: 28px; white-space: nowrap; text-overflow: ellipsis;
                  background: repeating-linear-gradient(90deg, rgba(45,212,191,.42) 0 2px, transparent 2px 5px), #0E2B29; }
#m-bloc-musique.sans { background: var(--surface); color: var(--doux); }
#m-bloc-musique.choisi { box-shadow: 0 0 0 2px #fff; }

.m-outils { flex: none; height: 70px; display: flex; align-items: stretch; border-top: 1px solid #17171B; overflow-x: auto;
            scrollbar-width: none; padding: 0 6px; }
.m-outils::-webkit-scrollbar { display: none; }
.m-outil { flex: 1 0 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
           font-size: 10.5px; letter-spacing: -.01em; color: #D7D7DE; }
.m-outil:active { color: var(--violet-vif); }
.m-outil.danger { color: #FF8FB6; }
.m-outil.retour-outil { flex: 0 0 40px; color: var(--doux); border-right: 1px solid #17171B; margin-right: 4px; }

/* Feuille qui monte du bas */
#m-voile { position: absolute; inset: 0; z-index: 18; }
.feuille { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-radius: 22px 22px 0 0;
           padding: 8px 16px calc(env(safe-area-inset-bottom) + 18px); box-shadow: 0 -12px 40px rgba(0,0,0,.6);
           max-height: 70dvh; overflow-y: auto; animation: monte .18s ease-out; }
@keyframes monte { from { transform: translateY(40px); opacity: 0; } }
.feuille .barre-titre { display: flex; align-items: center; min-height: 42px; margin-bottom: 2px; }
/* Dans une feuille tout tient sur une rangée : onglets, pastilles et styles défilent de côté plutôt que de s'empiler. */
.feuille .onglets { display: flex; gap: 6px; margin: 0 0 10px; }
.feuille .onglets button { min-height: 34px; padding: 0 15px; border-radius: 999px; background: var(--surface2); color: var(--doux); font-size: 13.5px; font-weight: 500; }
.feuille .onglets button.oui { background: #2A1F55; color: #fff; box-shadow: inset 0 0 0 1.5px var(--violet); }
.feuille .pastilles { flex-wrap: nowrap; overflow-x: auto; padding: 4px 3px; scrollbar-width: none; }
.feuille .pastilles::-webkit-scrollbar { display: none; }
.feuille .pastilles label { flex: none; }
.feuille .pastilles span { width: 42px; height: 42px; }
.feuille .styles .apercu { height: 70px; padding: 9px 11px; border-radius: 14px; }
.feuille .styles .apercu b { font-size: 24px; }
.feuille p.doux { margin: 10px 0 0; font-size: 12.5px; }
.feuille .barre-titre h2 { flex: 1; }
.feuille .barre-titre .rond { width: 38px; height: 38px; background: var(--violet); }
.feuille .rang { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.feuille .rang::-webkit-scrollbar { display: none; }
.feuille .rang > b { flex: 1 0 100%; }
/* Décaler un plan : la pellicule de la vidéo entière défile sous un cadre fixe. */
.pellicule { position: relative; height: 92px; margin-top: 12px; overflow: hidden; border-radius: 12px; background: #060607; }
.pellicule .defile { display: flex; align-items: center; height: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; touch-action: pan-x; }
.pellicule .defile::-webkit-scrollbar { display: none; }
.pellicule .bord { flex: none; height: 1px; }
.pellicule .bande { flex: none; display: flex; height: 72px; overflow: hidden; border-radius: 6px; }
.pellicule .bande i { flex: none; width: 40px; height: 100%; background: #1C1C22 center / cover; }
.pellicule .viseur { position: absolute; top: 4px; bottom: 4px; box-sizing: content-box; margin-left: -3px; border: 3px solid #fff; border-radius: 9px;
                    pointer-events: none; box-shadow: 0 0 0 2000px rgba(0,0,0,.5); }
.feuille .titre-rang { font-size: 13px; color: var(--doux); margin: 16px 0 0; font-weight: 500; }
.option { flex: 1 0 auto; min-width: 64px; min-height: 50px; padding: 8px 12px; border-radius: 13px; background: var(--surface2);
          border: 1.5px solid transparent; font-weight: 500; font-size: 15px; display: flex; flex-direction: column; align-items: center;
          justify-content: center; gap: 4px; white-space: nowrap; }
.option.oui { border-color: var(--violet); background: #2A1F55; font-weight: 700; }
.option small { font-size: 11px; color: var(--doux); font-weight: 400; }
.option.source { padding: 0; width: 78px; height: 118px; flex: none; overflow: hidden; position: relative; background: var(--surface2) center / cover; }
.option.source small { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.65); color: #fff; padding: 3px 0; }
.ligne-choix { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 12px; border-radius: 13px;
               background: var(--surface2); margin-top: 8px; text-align: left; border: 1.5px solid transparent; }
.ligne-choix.oui { border-color: var(--violet); background: #2A1F55; }
.ligne-choix span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reglette { display: flex; align-items: center; gap: 12px; margin-top: 8px; color: var(--doux); }
.reglette input { flex: 1; min-height: 40px; accent-color: var(--violet); }
.feuille input[type=text] { background: var(--surface2); font-size: 18px; }
#m-alerte { position: absolute; left: 12px; right: 12px; top: 62px; z-index: 30; }

/* ── Style, couleur, pages d'un post ou d'une story ── */
.styles { display: flex; gap: 10px; }
.styles label { flex: 1; margin: 0; }
.styles input, .pastilles input { position: absolute; opacity: 0; pointer-events: none; }
.apercu { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 104px; border-radius: 16px; padding: 12px;
          border: 2px solid transparent; overflow: hidden; position: relative; }
.apercu b { font-size: 34px; line-height: 1; font-weight: 400; }
.apercu small { font-size: 12.5px; font-weight: 500; opacity: .8; }
.apercu.contraste { background: #0A0A0C; box-shadow: inset 0 0 0 1px var(--trait); color: #fff; }
.apercu.contraste b { font-family: "m-anton", sans-serif; text-transform: uppercase; color: var(--teinte, var(--violet)); }
.apercu.clair { background: #F5F0E8; color: #17161A; }
.apercu.clair b { font-family: "m-serif", serif; }
.apercu.clair::before { content: ""; position: absolute; right: -22px; top: -22px; width: 64px; height: 64px; border-radius: 50%; background: var(--teinte, var(--violet)); opacity: .3; }
.apercu.couleur { background: linear-gradient(150deg, var(--teinte, var(--violet)), color-mix(in srgb, var(--teinte, var(--violet)) 55%, #1B0B3A)); color: #fff; }
.apercu.couleur b { font-family: "m-poppins", sans-serif; }
.styles input:checked + .apercu { border-color: #fff; }
.styles input:focus-visible + .apercu, .pastilles input:focus-visible + span { outline: 2px solid var(--violet-vif); outline-offset: 2px; }
.pastilles { display: flex; gap: 8px; flex-wrap: wrap; }
.pastilles label { margin: 0; }
.pastilles span { display: block; width: 36px; height: 36px; border-radius: 50%; border: 3px solid #000; box-shadow: 0 0 0 2px transparent; }
.pastilles input:checked + span { box-shadow: 0 0 0 2.5px #fff; }
/* La roue : toutes les couleurs. Le sélecteur du téléphone est posé dessus, invisible ; le centre montre la couleur prise. */
.pastilles .roue span { position: relative; background: conic-gradient(#f43, #fc3, #4d6, #3cf, #36f, #b4f, #f4a, #f43); }
.pastilles .roue span::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--choisie, #0B0B0D); border: 2px solid #0B0B0D; }
.pastilles .roue input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: auto; z-index: 1; border: 0; padding: 0; }
.titre-section { font-weight: 600; font-size: 15px; margin: 24px 0 2px; }
.page-carte { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 6px 12px 12px; margin-top: 10px; }
.page-tete { display: flex; align-items: center; justify-content: space-between; min-height: 44px; font-size: 14px; color: var(--doux); }
.page-tete b { font-weight: 600; }
.page-tete .rond { color: var(--doux); }
.page-carte input, .page-carte textarea { background: var(--surface2); border-color: transparent; }
.page-carte input { font-weight: 700; font-size: 17px; }
.page-carte textarea { margin-top: 8px; font-size: 15.5px; }

/* Le menu : une feuille qui monte du bas, sur tous les écrans ordinaires. */
#menu-voile { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 40; }
#menu, #actions { position: fixed; z-index: 41; max-width: 520px; margin: 0 auto; }
#menu .barre-titre .rond, #actions .barre-titre .rond { background: var(--surface2); }
#menu .ligne-choix, #actions .ligne-choix { min-height: 56px; font-weight: 500; }
#actions .ligne-choix.danger { color: #FF8FB6; }
#actions .ligne-choix:disabled { opacity: .4; }
/* Le texte du reel dans l'aperçu de l'atelier, dans le style choisi. */
#m-texte { white-space: normal; padding: 0 6.5%; text-wrap: balance; }
#m-texte.contraste { font-family: "m-anton", sans-serif; text-transform: uppercase; line-height: 1.08; text-shadow: 0 1px 2px rgba(0,0,0,.55), 0 3px 14px rgba(0,0,0,.6); }
#m-texte.clair { font-family: "m-serif", serif; line-height: 1.08; text-shadow: 0 1px 2px rgba(0,0,0,.55), 0 3px 14px rgba(0,0,0,.6); }
#m-texte.couleur { font-family: "m-poppins", sans-serif; line-height: 1.42; letter-spacing: -.02em; }
#m-texte em { font-style: normal; color: var(--mot, color-mix(in srgb, var(--teinte, var(--violet)) 72%, #fff)); }
#m-texte.couleur span { background: var(--teinte, var(--violet)); padding: .06em .32em; border-radius: .18em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Modèles de reel : une carte règle tout le montage d'un toucher. */
.modeles { display: flex; gap: 10px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 4px; scrollbar-width: none; }
.modeles::-webkit-scrollbar { display: none; }
.modele { flex: none; width: 138px; text-align: left; padding: 6px 6px 11px; border-radius: 17px; background: var(--surface);
          border: 1.5px solid var(--trait); color: inherit; }
.modele.oui { background: #2A1F55; border-color: var(--violet); }
.modele .vue { position: relative; overflow: hidden; height: 158px; border-radius: 12px; padding: 12px; display: flex;
               flex-direction: column; justify-content: center; background: linear-gradient(155deg, #4a4a4a, #0b0b0b 52%, #6a6a6a);
               color: #fff; font-weight: 700; font-size: 23px; line-height: .98; letter-spacing: -.02em; text-transform: uppercase; }
.modele .vue::after { content: ""; position: absolute; inset: 0 0 0 62%; background: #fff; mix-blend-mode: difference; }
.modele .vue em { font-style: normal; color: var(--violet-vif); }
.modele .vue.encre { background: linear-gradient(160deg, #0A0A0C 0 38%, #E0184A 38% 68%, #F4E9B8 68%); color: #F4E9B8; text-shadow: 0 2px 0 #0A0A0C; }
.modele .vue.encre::after { display: none; }
.modele .vue.cine { background: linear-gradient(to top, #000 8%, rgba(0,0,0,0) 62%), linear-gradient(120deg, #2b2b2b, #8a8a8a 45%, #1a1a1a); justify-content: flex-end; font-size: 20px; letter-spacing: 0; }
.modele .vue.cine::after { inset: 0 0 62% 0; background: #8CFF1A; mix-blend-mode: multiply; }
.modele .vue.cine em { color: #8CFF1A; }
.modele .vue.lancement { background: radial-gradient(circle at 50% 38%, #8a7862, #2a221a 70%); align-items: center; text-align: center; color: #F4EFE6; }
.modele .vue.lancement::after { display: none; }
.modele .vue.editorial { background: linear-gradient(to top, #000 0%, rgba(0,0,0,.1) 70%), linear-gradient(140deg, #5a5a5a, #1c1c1c); justify-content: flex-end; text-transform: none; font-family: "m-serif", serif; font-weight: 400; font-size: 21px; letter-spacing: -.01em; }
.modele .vue.editorial::after { inset: 7px; background: none; mix-blend-mode: normal; border: 1px solid rgba(255,255,255,.55); }
.modele .vue.editorial span { font-family: "Space Grotesk", sans-serif; font-size: 8.5px; letter-spacing: .3em; margin-bottom: 5px; }
.modele .vue.editorial em { color: #fff; font-style: italic; }
.modele .vue.lancement span { font-size: 8.5px; letter-spacing: .3em; font-weight: 500; margin-bottom: 6px; }
.modele .vue.lancement em { color: #F4EFE6; font-size: 24px; }
.modele .vue.encre em { color: #fff; }
.modele b { display: block; margin: 9px 4px 0; font-size: 14.5px; }
.modele small { display: block; margin: 3px 4px 0; font-size: 11.5px; color: var(--doux); }
/* Façons de raconter (formats viraux) : une rangée de pastilles à faire défiler. */
.viraux { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 4px; scrollbar-width: none; }
.viraux::-webkit-scrollbar { display: none; }
.viraux button { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--trait);
                 font-weight: 500; white-space: nowrap; }
.viraux button.oui { background: #2A1F55; border-color: var(--violet); font-weight: 700; }
/* Ma marque */
.logo-marque { min-height: 96px; border-radius: 16px; display: grid; place-items: center; color: var(--doux); font-size: 14px; padding: 14px;
               background: repeating-conic-gradient(#1A1A1F 0% 25%, #131316 0% 50%) 50% / 20px 20px; border: 1px solid var(--trait); }
.logo-marque img { max-height: 84px; max-width: 80%; }
.pastilles span.marque { background-image: none; position: relative; }
.pastilles span.marque::after { content: "★"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; color: #fff; mix-blend-mode: difference; }

/* Aperçu de l'atelier quand le reel est en noir et blanc. */
#m-videos.nb video { filter: grayscale(1) contrast(1.35); }
#m-videos.sepia video { filter: sepia(.55) saturate(.6) contrast(1.06); }
/* Les effets d'un plan, approchés dans l'aperçu ; le vrai rendu est celui du reel enregistré. */
#m-videos[data-effet="negatif"] video { filter: invert(1) contrast(1.3); }
#m-videos.nb[data-effet="negatif"] video { filter: grayscale(1) contrast(1.35) invert(1); }
#m-videos[data-effet="radio"] video { filter: grayscale(1) invert(1) contrast(1.5) brightness(.75) sepia(1) hue-rotate(175deg) saturate(4); }
#m-videos[data-effet="vitesse"] video { filter: blur(1.5px); }
/* Encre : l'aperçu durcit l'image et la teinte aux couleurs de la palette ; les vrais aplats sont dans le reel enregistré. */
#m-videos[data-effet="encre"] video { filter: grayscale(1) contrast(3.2) brightness(1.15); }
#m-videos[data-effet="teinte"] video { filter: grayscale(1) contrast(1.35); }
#m-videos[data-effet="teinte"]::after { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; background: var(--encre, #8CFF1A); }
#m-videos[data-effet="dur"] video { filter: grayscale(1) contrast(30); }
#m-videos[data-effet="encre"]::after { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply;
  background: linear-gradient(to bottom, var(--encre-clair, #F4E9B8), var(--encre, #E0184A)); }
.feuille .palettes { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding: 3px; scrollbar-width: none; }
.feuille .palettes::-webkit-scrollbar { display: none; }
.feuille .palettes button { flex: none; width: 46px; height: 34px; border-radius: 9px; border: 2px solid #000; }
.feuille .palettes button.oui { box-shadow: 0 0 0 2px #fff; }
#m-videos.nb[data-effet="vitesse"] video { filter: grayscale(1) contrast(1.35) blur(1.5px); }
#m-texte.empile { text-align: left; line-height: 1.0; }
