/* PatiPix Studio 2026 — styles de l'atelier (design A « Atelier » validé le 26/10/2026).
   Propriétés « logiques » (inline-start/end) partout : l'arabe se met en miroir tout seul. */

:root {
  --violet: #6A35F2;
  --violet-fonce: #4B1FC9;
  --nuit: #130B3A;
  --fond: #F7F6FF;
  --fond-bonjour: #FBFAFF;
  --lavande: #F4F1FF;
  --lavande-2: #F0EBFF;
  --zone: #EFEAFF;
  --teinte: #F3EEFF;
  --teinte-2: #FBF9FF;
  --champ: #FCFBFF;
  --bord: #E8E3FA;
  --bord-2: #DCD5F3;
  --bord-3: #D8CFF6;
  --pointille: #C9BDF0;
  --desactive: #E4DCFB;
  --texte-2: #4A4570;
  --texte-3: #5E5A80;
  --vert-fond: #E9F7F1;
  --vert-texte: #0B5E3E;
  --vert: #0A8A5A;
  --ambre-fond: #FFF4E5;
  --ambre-texte: #7A4300;
  --ambre: #D97706;
  --rouge-texte: #A3123A;
  --ombre-carte: 0 6px 24px rgba(19, 11, 58, .05);
  --ombre-volet: 0 18px 46px rgba(19, 11, 58, .18);
  --ombre-menu: 0 16px 40px rgba(19, 11, 58, .16);
  --ombre-fenetre: 0 30px 80px rgba(10, 6, 30, .35);
  --voile: rgba(19, 11, 58, .48);
  /* Thème (06/11/2026) : --violet reste le violet plein des boutons (texte blanc dessus) ; --accent colore les icônes, les
     contours et les liens, plus clair en sombre pour rester lisible. */
  --surface: #FFFFFF;
  --surface-active: #FFFFFF;
  --accent: #6A35F2;
  --violet-survol: #4B1FC9;
  --inverse: #130B3A;
  --inverse-survol: #241a5c;
  --sur-inverse: #FFFFFF;
  --placeholder: #8C88A8;
  --interrupteur-eteint: #D8CFF6;
  --police: 'Onest', 'Segoe UI', system-ui, sans-serif;
  --police-titre: 'Unbounded', 'Onest', 'Segoe UI', sans-serif;
  --police-bonjour: 'Great Vibes', cursive;
  color-scheme: light;
}
/* Thème sombre (bouton de la barre du haut, choix gardé par js/theme.js) : le même violet, sur une nuit profonde. */
:root[data-theme="sombre"] {
  --violet-fonce: #C9B8FF;
  --violet-survol: #7C4DFF;
  --accent: #A88BFF;
  --nuit: #EEEAFF;
  --fond: #0F0B22;
  --fond-bonjour: #0F0B22;
  --surface: #19132F;
  --surface-active: #3A3070;
  --lavande: #241C45;
  --lavande-2: #2B2253;
  --zone: #221A45;
  --teinte: #2C2160;
  --teinte-2: #201844;
  --champ: #130E29;
  --bord: #2F2752;
  --bord-2: #3D3466;
  --bord-3: #4C4280;
  --pointille: #5E519A;
  --desactive: #2B2350;
  --texte-2: #CCC6EA;
  --texte-3: #A9A3CC;
  --vert-fond: #0E2B22;
  --vert-texte: #6EE7B7;
  --vert: #34D399;
  --ambre-fond: #2E2210;
  --ambre-texte: #FCD34D;
  --ambre: #F59E0B;
  --inverse: #EEEAFF;
  --inverse-survol: #FFFFFF;
  --sur-inverse: #130B3A;
  --placeholder: #7D77A6;
  --interrupteur-eteint: #4A4563;
  --voile: rgba(4, 2, 12, .66);
  --ombre-carte: 0 6px 24px rgba(0, 0, 0, .28);
  --ombre-volet: 0 18px 46px rgba(0, 0, 0, .5);
  --ombre-menu: 0 16px 40px rgba(0, 0, 0, .45);
  --ombre-fenetre: 0 30px 80px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
/* Le logo (fond blanc, effacé par « multiply » en clair) : inversé en sombre, « Pati » devient blanc et « Pix » un violet
   clair de la même teinte (175°), le fond devenu noir est effacé par « screen ». */
:root[data-theme="sombre"] .logo { mix-blend-mode: screen; filter: invert(1) hue-rotate(175deg); }
:root[lang="ar"] {
  --police: 'Readex Pro', 'Segoe UI', system-ui, sans-serif;
  --police-titre: 'Readex Pro', 'Segoe UI', sans-serif;
  --police-bonjour: 'Aref Ruqaa', 'Readex Pro', serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--fond);
  color: var(--nuit);
  font: 15px/1.4 var(--police);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: default;
  user-select: none;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
input, textarea { user-select: text; cursor: text; }
img { -webkit-user-drag: none; }
h1, h2, p { margin: 0; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic-petit { width: 16px; height: 16px; }
.ic-moyen { width: 18px; height: 18px; }
.ic-plein { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.ic-vert { color: var(--vert); }
.drapeau { width: 24px; height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(19, 11, 58, .16); flex-shrink: 0; display: block; overflow: hidden; }
.ressort { flex: 1; }
.invisible { visibility: hidden; }
.fort { font-weight: 600; }
.moyen { font-weight: 600; color: var(--texte-2); }
.aide { color: var(--texte-3); font-size: 13px; line-height: 1.4; }
.aide-moyenne { color: var(--texte-3); font-size: 14px; line-height: 1.5; }
.etiquette, .champ > label { font-weight: 600; }
.logo { width: 150px; height: 42px; object-fit: cover; mix-blend-mode: multiply; display: block; flex-shrink: 0; }

/* ---------- Écran « Bonjour » ---------- */
.bonjour {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  overflow: hidden; padding: 32px 24px;
  background: var(--fond-bonjour);
  transition: opacity .35s ease;
}
.bonjour.sortie { opacity: 0; pointer-events: none; }
.bonjour > * { position: relative; }
/* Le contenu reste invisible jusqu'à ce que ses textes et ses polices soient prêts (app.js, classe « pret »), puis il
   apparaît en fondu, déjà à sa place : rien ne bouge à l'écran (décalage de mise en page sur téléphone, 16/11/2026). */
.bonjour > :not(.halo) { transition: opacity .3s ease; }
.bonjour:not(.pret) > :not(.halo) { visibility: hidden; opacity: 0; }
/* Le halo, placé par le calcul de sa position : elle ne dépend ni du contenu, ni du sens de lecture, ni de la largeur de
   l'écran (avec « inset: 0; margin: auto », il se collait au bord sur un téléphone : contrôle qualité, 16/11/2026). Il
   tourne par « transform » : l'image floue est calculée une seule fois, puis la carte graphique la fait tourner (un
   dégradé qui tourne par « --angle » est redessiné et refloué à chaque image : 12 % d'un cœur et 33 % du processus
   graphique sur le PC de développement, mesure du 18/11/2026). */
.halo {
  position: absolute !important; left: calc(50% - 260px); top: calc(50% - 260px); width: 520px; height: 520px; border-radius: 50%;
  background: conic-gradient(from 0deg, #6A35F2, #D43BF0, #22C7E8, #FF8A3D, #6A35F2);
  filter: blur(90px); opacity: .28; animation: aura-tourne 12s linear infinite;
}
@keyframes aura-tourne { to { transform: rotate(360deg); } }
.logo-bonjour { width: 190px; height: 54px; }
/* Sur un petit écran, la taille suit la largeur : le mot entier tient dans l'écran (16/11/2026 : à 375 px, « Bonjour »
   faisait 457 px et « Здравствуйте » 552 px, coupés sur les côtés). Taille fixe pour une largeur donnée : rien ne bouge. */
.bonjour-mot {
  font-family: var(--police-bonjour); font-weight: 400; font-size: min(160px, 26vw); line-height: 1.05; color: var(--accent);
  text-align: center; white-space: nowrap; height: 1.05em; /* même hauteur quelle que soit la police (chargée ou non) */
}
:root[lang="ru"] .bonjour-mot { font-size: min(120px, 17vw); }
:root[lang="ar"] .bonjour-mot { font-size: min(140px, 46vw); line-height: 1.3; height: 1.3em; }
.conseil {
  display: flex; align-items: flex-start; gap: 14px; width: min(640px, 100%);
  padding: 16px 20px; border-radius: 18px; background: var(--surface);
  border: 1.5px solid var(--accent); box-shadow: 0 10px 30px rgba(106, 53, 242, .14);
}
.tuile-icone {
  width: 40px; height: 40px; border-radius: 12px; background: var(--teinte); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tuile-icone .ic { width: 22px; height: 22px; }
.tuile-grande { width: 56px; height: 56px; border-radius: 16px; }
.tuile-grande .ic { width: 28px; height: 28px; }
.conseil-textes { display: flex; flex-direction: column; gap: 4px; text-align: start; }
.conseil-titre { font-size: 17px; font-weight: 700; }
.conseil-texte { color: var(--texte-2); line-height: 1.5; }
.lancement { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--texte-2); }
.puces { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; min-height: 38px; }
.puce {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 19px;
  background: var(--surface); border: 1px solid var(--bord); font-size: 14px; color: var(--nuit);
}
.puce .ic { width: 18px; height: 18px; stroke-width: 2; color: var(--vert); }
.puce-absente { border-style: dashed; border-color: var(--bord-3); color: var(--texte-3); }
.bonjour-pied { color: var(--texte-3); font-size: 13px; }
.attente {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--bord-3); border-top-color: var(--accent);
  animation: tourne .9s linear infinite; flex-shrink: 0;
}
@keyframes tourne { to { transform: rotate(360deg); } }

/* ---------- Barre du haut ---------- */
.atelier { min-height: 100vh; display: flex; flex-direction: column; }
.barre {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 28px; background: var(--surface); border-bottom: 1px solid var(--bord);
}
.segments { display: flex; gap: 4px; padding: 4px; background: var(--lavande-2); border-radius: 12px; }
.segment {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border: 0; border-radius: 9px; background: transparent; color: var(--texte-2); font-weight: 500;
}
.segment:hover { color: var(--nuit); }
.segment[aria-pressed="true"] { background: var(--surface-active); color: var(--nuit); font-weight: 600; box-shadow: 0 1px 3px rgba(19, 11, 58, .12); }
.segments-pleins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.segments-trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.segments-pleins .segment { padding: 0 8px; }

.puce-etat {
  display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 36px; border-radius: 18px;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  background: var(--lavande); color: var(--texte-2);
}
.puce-etat .point { width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; flex-shrink: 0; }
.puce-etat.pret { background: var(--vert-fond); color: var(--vert-texte); }
.puce-etat.pret .point { background: var(--vert); border-color: var(--vert); }
.puce-etat.occupe { background: var(--ambre-fond); color: var(--ambre-texte); }
.puce-etat.occupe .point { background: var(--ambre); border-color: var(--ambre); }

.btn-licence {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 0; border-radius: 12px;
  background: var(--violet); color: #FFFFFF; font-size: 14px; font-weight: 700; white-space: nowrap;
}
.btn-licence:hover { background: var(--violet-survol); }
.btn-licence .ic { width: 17px; height: 17px; }
.btn-licence.active { height: 36px; padding: 0 12px; border-radius: 18px; background: var(--teinte); color: var(--violet-fonce); font-weight: 600; }
.btn-licence.active:hover { background: var(--lavande-2); }
/* Nouvelle version disponible (étape 6) : un bouton discret au contour vert (la puce d'état, elle, est pleine). */
.btn-maj {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1.5px solid var(--vert);
  border-radius: 18px; background: var(--surface); color: var(--vert-texte); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.btn-maj:hover { background: var(--vert-fond); }
.btn-maj .ic { width: 17px; height: 17px; }
/* Barre trop étroite pour tout montrer sur une ligne (app.js, ajusterBarre) : le drapeau seul pour la langue, puis
   l'icône seule pour la mise à jour ; les noms restent lus par les lecteurs d'écran. */
.barre.serree #langue-actuelle, .barre.tres-serree .btn-maj span {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.barre.tres-serree .btn-maj { width: 36px; padding: 0; justify-content: center; }

.ancre { position: relative; }
.porte-monnaie {
  display: flex; align-items: center; height: 40px; border: 1.5px solid var(--accent); border-radius: 12px;
  background: var(--surface); overflow: hidden;
}
.porte-monnaie.ouvert { box-shadow: 0 0 0 4px rgba(106, 53, 242, .12); }
.solde { display: flex; align-items: center; gap: 8px; padding: 0 12px; font-weight: 700; white-space: nowrap; }
.solde .ic { width: 18px; height: 18px; color: var(--accent); }
#btn-recharger {
  height: 40px; padding: 0 12px; border: 0; border-inline-start: 1px solid var(--bord-2);
  background: var(--violet); color: #FFFFFF; font-size: 14px; font-weight: 600;
}
#btn-recharger:hover { background: var(--violet-survol); }
#btn-recharger:focus-visible { outline-offset: -4px; outline-color: #FFFFFF; }

.btn-langue {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px;
  border: 1px solid var(--bord-2); border-radius: 10px; background: var(--surface); color: var(--nuit); white-space: nowrap;
}
.btn-langue:hover { border-color: var(--pointille); }
.btn-compte {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid var(--bord-2); border-radius: 50%; background: var(--surface); color: var(--texte-2);
}
.btn-compte:hover { border-color: var(--pointille); color: var(--nuit); }
.btn-connexion {
  height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--inverse); color: var(--sur-inverse);
  font-size: 14px; font-weight: 700; white-space: nowrap;
}
.btn-connexion:hover { background: var(--inverse-survol); }
/* Thème clair ou sombre (06/11/2026) : deux icônes dans une pastille, celle du thème choisi en couleur. */
.themes { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--bord-2); border-radius: 12px; background: var(--surface); }
.theme-choix {
  width: 34px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 9px; background: transparent; color: var(--texte-3);
}
.theme-choix .ic { width: 18px; height: 18px; }
.theme-choix:hover { color: var(--nuit); }
.theme-choix[aria-pressed="true"] { background: var(--teinte); color: var(--violet-fonce); }
/* Barre très serrée (fenêtre étroite, Cloud) : la seule icône de l'autre thème, un clic bascule. */
.barre.tres-serree .theme-choix[aria-pressed="true"] { display: none; }
.barre.tres-serree .themes { padding: 2px; }
.barre.tres-serree { gap: 6px; }
.barre.tres-serree > .logo { width: 108px; height: 30px; }

/* Volets (menus et petites fenêtres accrochées à un bouton). Ils ne dépassent jamais de l'écran : sur un téléphone, ils
   se décalent (--decalage-volet, posé par app.js à l'ouverture) et ne sont jamais plus larges que l'écran (11/11/2026). */
.volet {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 30; max-width: calc(100vw - 16px);
  translate: var(--decalage-volet, 0px) 0;
  background: var(--surface); border: 1px solid var(--bord); box-shadow: var(--ombre-volet);
}
.menu-langues, .menu-compte { width: 210px; padding: 6px; border-radius: 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--ombre-menu); }
.article-menu {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--nuit); text-align: start; width: 100%;
}
.article-menu:hover { background: var(--lavande); }
.article-menu[aria-checked="true"] { background: var(--lavande-2); font-weight: 600; }
.article-menu .coche { width: 18px; height: 18px; color: var(--accent); visibility: hidden; }
.article-menu[aria-checked="true"] .coche { visibility: visible; }
.article-menu[lang="ar"] { font-family: 'Readex Pro', 'Segoe UI', sans-serif; }
/* Bandeau « politique de confidentialité mise à jour » (comme celui du site), refermable. 07/11/2026 (demande de
   l'utilisateur) : il flotte en bas de l'écran, côté fin de ligne, au lieu de pousser l'atelier vers le bas ; sur un petit
   écran, il prend la largeur. */
.bandeau {
  position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 40; width: max-content; max-width: min(460px, calc(100vw - 40px));
  display: flex; align-items: center; gap: 12px; padding-block: 10px; padding-inline: 14px 10px; border: 1.5px solid var(--bord); border-radius: 12px;
  background: var(--surface); box-shadow: var(--ombre-menu); font-size: 14px; line-height: 1.4;
  animation: bandeau-entree .25s ease-out;
}
@keyframes bandeau-entree { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 600px) { .bandeau { inset-inline: 16px; bottom: 16px; width: auto; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .bandeau { animation: none; } }
/* Tant qu'il est affiché, la page garde en bas une marge de sa hauteur (--marge-bandeau, posée par app.js) : en bas de la
   page, il ne cache ni le bouton de création ni le pied de page (avis de la session juridique du 07/11/2026). */
.atelier { padding-bottom: var(--marge-bandeau, 0px); }
html { scroll-padding-bottom: var(--marge-bandeau, 0px); }
.bandeau > .ic { color: var(--accent); }
.bandeau .lien { padding: 0 2px; }
.btn-fermer-bandeau { width: 32px; height: 32px; flex-shrink: 0; border: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: transparent; color: var(--texte-3); }
.btn-fermer-bandeau:hover { background: var(--lavande); color: var(--nuit); }
@media (prefers-reduced-motion: reduce) { .interrupteur-dessin, .interrupteur-dessin::before { transition: none; } }

.volet-recharge { width: 380px; padding: 18px; border-radius: 18px; display: flex; flex-direction: column; gap: 14px; }
.volet-titre { font-size: 17px; font-weight: 700; }
.volet-texte { color: var(--texte-3); font-size: 14px; line-height: 1.45; }
.montants { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.montant {
  position: relative; display: flex; align-items: center; justify-content: center; height: 50px;
  border: 1.5px solid var(--bord); border-radius: 12px; font-weight: 700; cursor: pointer; text-align: center;
}
.montant input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.montant:hover { border-color: var(--pointille); }
.montant:has(input:checked) { border-color: var(--accent); background: var(--teinte); color: var(--violet-fonce); }
.montant:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.montant-autre { border-style: dashed; border-color: var(--pointille); color: var(--violet-fonce); font-size: 14px; font-weight: 600; }
.montant-autre:has(input:checked) { border-style: solid; }
.montant-libre { display: flex; flex-direction: column; gap: 6px; }
.montant-libre label { font-weight: 600; font-size: 14px; }
.champ-euro { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border: 1.5px solid var(--bord-2); border-radius: 12px; background: var(--champ); font-weight: 700; }
.champ-euro:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(106, 53, 242, .12); }
.champ-euro input { flex: 1; min-width: 0; border: 0; background: transparent; font-weight: 700; font-size: 17px; }
.champ-euro input:focus-visible { outline: none; }
.btn-payer { height: 48px; border-radius: 14px; }
.note { display: flex; gap: 8px; color: var(--texte-3); font-size: 13px; line-height: 1.4; text-align: start; }
.note .ic { width: 16px; height: 16px; margin-top: 1px; }

/* ---------- Contenu ---------- */
.contenu {
  flex: 1; display: flex; flex-direction: column; gap: 20px;
  padding: 22px 28px 24px; width: 100%; max-width: 1440px; margin: 0 auto;
}
.rangee { display: flex; gap: 22px; flex-wrap: wrap; align-items: stretch; }
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: 20px; box-shadow: var(--ombre-carte); }

.composer { flex: 0 1 500px; min-width: 0; display: flex; flex-direction: column; gap: 18px; padding: 20px; }
.panneau { display: flex; flex-direction: column; gap: 16px; }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mode {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px;
  border: 1.5px solid var(--bord); border-radius: 14px; background: var(--surface); color: var(--texte-2); font-weight: 500;
}
.mode .ic { width: 22px; height: 22px; flex-shrink: 0; }
/* Petit téléphone : un mot long (« Locución », « Озвучка ») sortait de son bouton, jusqu'à 10 px à 320 px de large et
   3 px à 360 px (trouvé par les robots testeurs, 18/11/2026). L'icône et le texte se resserrent. */
@media (max-width: 400px) {
  /* Tout se règle sur la largeur de l'écran, sans palier : de 320 px (texte 12 px, icône 15 px) à 400 px (14 px, 18 px).
     Avec deux paliers, « Locución » touchait le bord juste au-dessus du premier (341 px) et n'avait que 2,4 px de marge
     à 320 px (remarque du contrôle qualité, 19/11/2026). */
  .modes { gap: clamp(4px, calc(4px + (100vw - 320px) * .05), 8px); }
  .mode { gap: clamp(3px, calc(3px + (100vw - 320px) * .025), 5px); font-size: clamp(12px, calc(12px + (100vw - 320px) * .025), 14px); }
  .mode .ic { width: clamp(15px, calc(15px + (100vw - 320px) * .0375), 18px); height: clamp(15px, calc(15px + (100vw - 320px) * .0375), 18px); }
}
.mode:hover { border-color: var(--pointille); color: var(--nuit); }
.mode[aria-pressed="true"] { border-color: var(--accent); background: var(--teinte); color: var(--violet-fonce); font-weight: 600; }

.champ { display: flex; flex-direction: column; gap: 8px; }
textarea {
  resize: none; width: 100%; padding: 14px; border: 1.5px solid var(--bord-2); border-radius: 14px;
  background: var(--champ); color: var(--nuit); line-height: 1.5;
}
textarea::placeholder, input::placeholder { color: var(--placeholder); }
textarea:focus-visible, .cle-ligne input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(106, 53, 242, .12); }
textarea[aria-invalid="true"] { border-color: var(--ambre); }
.aide-ligne { display: flex; align-items: center; gap: 8px; color: var(--texte-3); font-size: 13px; }
.compteur { white-space: nowrap; }

.btn-reference {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px;
  border: 1.5px dashed var(--pointille); border-radius: 14px; background: var(--surface); color: var(--violet-fonce); text-align: start;
}
.btn-reference:hover { background: var(--teinte-2); border-color: var(--accent); }
.btn-reference-textes { display: flex; flex-direction: column; gap: 2px; }
.references { display: flex; flex-direction: column; gap: 10px; }
.liste-references { display: flex; gap: 10px; flex-wrap: wrap; }
.cases-signalement { display: flex; flex-direction: column; gap: 10px; }
.reference { position: relative; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; border: 1px solid var(--bord); background: var(--zone); }
.reference img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reference-retirer {
  position: absolute; top: 4px; inset-inline-end: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0;
  display: flex; align-items: center; justify-content: center; background: rgba(19, 11, 58, .78); color: #FFFFFF;
}
.reference-retirer .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.reference-ajouter {
  width: 72px; height: 72px; border-radius: 12px; border: 1.5px dashed var(--pointille); background: var(--surface);
  color: var(--violet-fonce); display: flex; align-items: center; justify-content: center;
}
.reference-ajouter:hover { border-color: var(--accent); background: var(--teinte-2); }

.choix-format { display: flex; flex-direction: column; gap: 10px; }
.formats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.format {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 6px;
  border: 1.5px solid var(--bord); border-radius: 12px; background: var(--surface); color: var(--texte-2); white-space: nowrap;
}
.format:hover { border-color: var(--pointille); color: var(--nuit); }
.format[aria-pressed="true"] { border-color: var(--accent); background: var(--teinte); color: var(--violet-fonce); font-weight: 600; }
.format-autre { font-size: 14px; }
.forme { border: 1.8px solid currentColor; border-radius: 3px; flex-shrink: 0; }
.forme-carre { width: 14px; height: 14px; }
.forme-vertical { width: 10px; height: 17px; }
.forme-paysage { width: 18px; height: 10px; }
.forme-libre { border-radius: 2px; }

/* Format personnalisé : proportions ou pixels, avec la forme dessinée en direct. */
.editeur-format { display: flex; flex-direction: column; gap: 12px; padding: 12px; border: 1px solid var(--bord); border-radius: 14px; background: var(--teinte-2); }
.editeur-format .segment { height: 36px; }
.editeur-ligne { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.apercu-forme {
  width: 64px; height: 64px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--surface); border: 1px dashed var(--bord-2);
}
.apercu-forme-rect { border: 2px solid var(--accent); border-radius: 4px; background: var(--teinte); transition: width .15s ease, height .15s ease; }
.editeur-saisie { display: flex; align-items: center; gap: 8px; }
.editeur-saisie input {
  width: 84px; height: 44px; padding: 0 8px; border: 1.5px solid var(--bord-2); border-radius: 10px;
  background: var(--surface); color: var(--nuit); font-size: 16px; font-weight: 600; text-align: center;
}
.editeur-saisie input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(106, 53, 242, .12); }
.editeur-saisie input[aria-invalid="true"] { border-color: var(--ambre); }
.editeur-signe { font-size: 18px; font-weight: 700; color: var(--texte-2); }
.editeur-unite { color: var(--texte-3); font-size: 14px; }
.editeur-resultat { color: var(--texte-3); font-size: 13px; }
.editeur-resultat.erreur { color: var(--ambre-texte); font-weight: 600; }

/* Voix : la carte entière se colore quand la voix est choisie ; le rond permet d'écouter un extrait. */
.voix-choix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.voix-carte {
  display: flex; align-items: center; gap: 4px; height: 48px; padding-inline-start: 7px;
  border: 1.5px solid var(--bord); border-radius: 12px; background: var(--surface);
}
.voix-carte:hover { border-color: var(--pointille); }
.voix-carte:has(.voix-bouton[aria-pressed="true"]) { border-color: var(--accent); background: var(--teinte); }
.voix-ecouter {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--pointille);
  background: var(--surface); color: var(--accent); display: flex; align-items: center; justify-content: center;
}
.voix-ecouter .ic { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.voix-ecouter:hover { border-color: var(--accent); background: var(--teinte-2); }
.voix-ecouter[aria-pressed="true"] { background: var(--violet); border-color: var(--violet); color: #FFFFFF; }
.voix-bouton {
  flex: 1; min-width: 0; height: 100%; padding: 0 10px 0 4px; border: 0; border-radius: 10px;
  background: transparent; color: var(--texte-2); font-size: 14px; text-align: start;
}
.voix-bouton:hover { color: var(--nuit); }
.nouveautes { display: flex; align-items: center; gap: 6px; color: var(--texte-3); font-size: 13px; }
.nouveautes .ic { width: 14px; height: 14px; color: var(--accent); }
.voix-bouton[aria-pressed="true"] { color: var(--violet-fonce); font-weight: 600; }

.photo-animer { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--bord); border-radius: 14px; }
.photo-animer img { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; display: block; background: var(--zone); }
.photo-animer-textes { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.photo-animer-textes .aide { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.reglages-video { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.reglages-video.seul { grid-template-columns: minmax(0, 1fr); }
input[type="range"] { width: 100%; accent-color: var(--violet); cursor: pointer; margin: 6px 0; }
input[type="range"]:disabled { cursor: default; opacity: .55; }
.bornes { display: flex; justify-content: space-between; color: var(--texte-3); font-size: 12px; }
.qualites { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.qualite {
  height: 40px; border: 1.5px solid var(--bord); border-radius: 10px; background: var(--surface); color: var(--texte-2); font-size: 14px; white-space: nowrap; padding: 0 4px;
}
.qualite:hover { border-color: var(--pointille); color: var(--nuit); }
.qualite[aria-pressed="true"] { border-color: var(--accent); background: var(--teinte); color: var(--violet-fonce); font-weight: 600; }
.qualite:disabled { opacity: .55; pointer-events: none; }

.voix-cloud { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 18px; text-align: center; border: 1px solid var(--bord); border-radius: 16px; background: var(--teinte-2); }
.voix-cloud .btn-secondaire { margin-top: 6px; }

.modeles { display: flex; flex-direction: column; gap: 8px; }
.modele {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1.5px solid var(--bord); border-radius: 12px; cursor: pointer;
}
.modele:hover { border-color: var(--pointille); }
.modele input { accent-color: var(--violet); width: 18px; height: 18px; margin: 0; flex-shrink: 0; cursor: pointer; }
.modele-textes { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.modele-prix { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; white-space: nowrap; }
.modele-unite { color: var(--texte-3); font-size: 12px; font-weight: 500; }
.modele:has(input:checked) .modele-unite { color: var(--texte-2); }
.modele:has(input:checked) { border-color: var(--accent); background: var(--teinte); }
.modele:has(input:checked) .modele-nom, .modele:has(input:checked) .modele-prix { color: var(--violet-fonce); font-weight: 700; }
.modele:has(input:checked) .aide { color: var(--texte-2); }
/* Lien « conditions d'utilisation de … » dans la case de la petite fenêtre d'accord (ancien compte refusé par le site). */
.lien-case { display: inline; padding: 0; text-align: start; }
/* Carte avec visuel (06/11/2026) : l'image ou la vidéo créée avec le modèle remplit la carte, le nom du modèle en grand ;
   un dégradé sombre du côté du texte le garde lisible, dans les deux thèmes (il passe de l'autre côté en arabe). */
.modele-visuel {
  position: relative; isolation: isolate; overflow: hidden; min-height: 112px; padding: 14px 16px 26px;
  border-color: rgba(255, 255, 255, .08); background: #0B0612; color: #FFFFFF;
}
.modele-fond { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.modele-fond img, .modele-fond video { width: 100%; height: 100%; object-fit: cover; display: block; }
.modele-fond::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11, 6, 18, .9) 0%, rgba(11, 6, 18, .62) 42%, rgba(11, 6, 18, .12) 72%, rgba(11, 6, 18, .5) 100%);
}
:root[dir="rtl"] .modele-fond::after {
  background: linear-gradient(270deg, rgba(11, 6, 18, .9) 0%, rgba(11, 6, 18, .62) 42%, rgba(11, 6, 18, .12) 72%, rgba(11, 6, 18, .5) 100%);
}
.modele-visuel .modele-textes { gap: 2px; }
.modele-visuel .modele-nom { color: rgba(255, 255, 255, .8); font-size: 13px; font-weight: 600; }
.modele-grand { font-family: var(--police-titre); font-size: 20px; font-weight: 700; line-height: 1.15; color: #FFFFFF; text-shadow: 0 1px 10px rgba(0, 0, 0, .45); }
.modele-visuel .aide { color: rgba(255, 255, 255, .78); }
.modele-visuel .modele-prix { color: #FFFFFF; text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }
.modele-visuel .modele-unite { color: rgba(255, 255, 255, .78); }
.modele-visuel:hover { border-color: rgba(255, 255, 255, .4); }
.modele-visuel:has(input:checked) { border-color: var(--accent); background: #0B0612; box-shadow: 0 0 0 3px rgba(106, 53, 242, .35); }
.modele-visuel:has(input:checked) .modele-nom, .modele-visuel:has(input:checked) .modele-prix { color: #FFFFFF; }
.modele-visuel:has(input:checked) .modele-unite, .modele-visuel:has(input:checked) .aide { color: rgba(255, 255, 255, .85); }
/* « Créée avec … » (avocat, AI Act art. 50) : petite étiquette dans le coin du visuel. */
.modele-mention {
  position: absolute; inset-block-end: 6px; inset-inline-end: 8px; z-index: 1; padding: 1px 7px; border-radius: 7px;
  background: rgba(11, 6, 18, .6); color: rgba(255, 255, 255, .88); font-size: 10.5px; line-height: 1.5; pointer-events: none;
}
/* Voix off : une onde dessinée, d'une couleur par niveau (pas d'image : aucun modèle de voix n'en crée).
   Depuis le 18/11/2026 (audit, proposition n° 3 acceptée par l'utilisateur) : à toutes les largeurs, l'onde est dans le
   fond de la carte, discrète, sous le nom, et s'arrête avant le prix. La carte est une grille : la case, le texte, le
   prix ; l'onde couvre les deux premières colonnes et déborde sur les marges de la carte (haut, bas, côté du texte). */
.modele-voix { --haut-carte: 14px; --cote-carte: 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
.modele-voix > input { grid-area: 1 / 1; }
.modele-voix .modele-textes { grid-area: 1 / 2; }
.modele-voix .modele-prix { grid-area: 1 / 3; }
.modele-onde {
  grid-area: 1 / 1 / 2 / 3; z-index: -1; align-self: stretch; min-width: 0;
  margin-block: calc(-1 * var(--haut-carte)) -26px; margin-inline-start: calc(-1 * var(--cote-carte)); padding-inline-end: 6px;
  display: flex; align-items: center; justify-content: flex-end; gap: 3px;
}
/* Chaque barre garde sa pleine hauteur (72 %) et s'étire par « transform » : la carte graphique s'en charge, sans
   recalculer la mise en page à chaque image (avant le 18/11/2026, la hauteur était animée : 7 % d'un cœur au repos sur
   le PC de développement, tant que la carte était affichée). */
.modele-onde i {
  flex: 0 0 3px; height: 72%; border-radius: 2px; background: var(--couleur-onde, #22C7E8); opacity: .35;
  transform: scaleY(.36); animation: onde 1.3s ease-in-out infinite; animation-delay: calc(var(--i) * -0.09s);
}
.modele-visuel[data-niveau="haute"] .modele-onde i { --couleur-onde: #A88BFF; }
.modele-visuel[data-niveau="premium"] .modele-onde i { --couleur-onde: #F062FF; }
@keyframes onde { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .modele-onde i { animation: none; transform: scaleY(.625); } }
@media (max-width: 520px) {
  .modele-visuel { min-height: 104px; padding: 12px 14px 26px; }
  .modele-grand { font-size: 18px; }
  .modele-voix { --haut-carte: 12px; --cote-carte: 14px; }
}
.pied-composer { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.info { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--lavande); }
.info > .ic { color: var(--accent); }
.info-textes { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.info.alerte { background: var(--ambre-fond); }
.info.alerte > .ic { color: var(--ambre); }
.btn-creer {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 56px; border: 0; border-radius: 16px;
  background: var(--violet); color: #FFFFFF; font-size: 17px; font-weight: 700; box-shadow: 0 10px 24px rgba(106, 53, 242, .30);
}
.btn-creer .ic { width: 22px; height: 22px; }
.btn-creer:hover { background: var(--violet-survol); }
.btn-creer:disabled { background: var(--desactive); color: var(--violet-fonce); box-shadow: none; }
.btn-creer:disabled .ic { display: none; }

/* Boutons communs */
.btn-principal {
  display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px;
  background: var(--violet); color: #FFFFFF; font-weight: 700;
}
.btn-principal:hover { background: var(--violet-survol); }
.btn-principal:disabled { background: var(--desactive); color: var(--violet-fonce); }
.btn-secondaire {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 14px;
  border: 1px solid var(--bord-2); border-radius: 10px; background: var(--surface); color: var(--nuit); font-size: 14px; white-space: nowrap;
}
.btn-secondaire:hover { border-color: var(--pointille); background: var(--teinte-2); }
.btn-petit { height: 36px; padding: 0 12px; border-radius: 9px; color: var(--violet-fonce); }
.btn-moyen { height: 46px; padding: 0 18px; border-radius: 14px; font-size: 15px; font-weight: 600; border-width: 1.5px; }
.btn-sombre {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: 10px;
  background: var(--inverse); color: var(--sur-inverse); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.btn-sombre:hover { background: var(--inverse-survol); }
.btn-haut { height: 46px; padding: 0 18px; border-radius: 14px; font-size: 15px; font-weight: 700; }
.btn-contour {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border: 1.5px solid var(--accent); border-radius: 14px;
  background: var(--surface); color: var(--violet-fonce); font-weight: 700; white-space: nowrap;
}
.btn-contour:hover { background: var(--teinte-2); }
.btn-discret { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--texte-3); font-size: 13px; }
.btn-discret:hover { background: var(--lavande); color: var(--nuit); }
.btn-discret.btn-moyen { height: 46px; padding: 0 18px; border-radius: 14px; color: var(--texte-2); font-size: 15px; font-weight: 600; }
.lien { border: 0; background: none; padding: 4px 2px; color: var(--accent); font-weight: 600; text-decoration: none; }
.lien:hover { color: var(--violet-fonce); }
/* Les pages du site sont de vrais liens (référencement, 12/11/2026), avec l'aspect des boutons « lien ». */
a.lien:not(.lien-externe):not(.lien-case) { display: inline-block; }

/* ---------- Votre création ---------- */
/* La carte ne s'étire plus à la hauteur du panneau de gauche (11/11/2026 : une photo 4:5 restait toute petite au milieu
   d'une immense zone sombre). Elle reste visible pendant qu'on fait défiler les réglages et tient dans la fenêtre (voir
   la fin de cette partie). */
.apercu {
  flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 20px;
  align-self: flex-start; position: sticky; top: calc(var(--haut-barre, 69px) + 16px);
}
.apercu-entete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 40px; }
.apercu-entete h2 { flex: 1; font-size: 20px; font-weight: 700; }
.actions-creation { display: flex; gap: 10px; flex-wrap: wrap; }
.apercu-zone { display: flex; align-items: center; justify-content: center; border-radius: 16px; overflow: hidden; }
.apercu-vide { min-height: 360px; flex-direction: column; gap: 10px; padding: 24px; background: var(--zone); text-align: center; }
.apercu-vide-icone {
  width: 64px; height: 64px; border-radius: 20px; background: var(--surface); color: var(--accent);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(106, 53, 242, .12); margin-bottom: 4px;
}
.apercu-vide-icone .ic { width: 30px; height: 30px; }
.apercu-vide-titre { font-family: var(--police-titre); font-size: 20px; font-weight: 700; color: var(--nuit); }
.apercu-vide .aide { font-size: 14px; max-width: 420px; }
/* Le cadre sombre prend la forme de la création (--rapport = largeur ÷ hauteur, posé par app.js) : l'image ou la vidéo
   le remplit entièrement, sans bande vide, dans tous les formats. */
.apercu-resultat { --rapport: 1.7778; }
.resultat-cadre {
  position: relative; width: 100%; aspect-ratio: var(--rapport); overflow: hidden; border-radius: 16px; background: #0B0612;
}
.resultat-cadre img, .resultat-cadre video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
/* Voix off : la forme du son (1 280 × 720) et, dessous, le lecteur, dans le même cadre sombre. */
.resultat-voix .resultat-cadre { display: flex; flex-direction: column; align-items: center; gap: 4px; aspect-ratio: auto; }
.resultat-voix img { position: static; height: auto; aspect-ratio: 16 / 9; }
.resultat-voix audio { width: min(560px, 90%); margin-bottom: 20px; }
.apercu-resultat [hidden] { display: none; }

/* La carte tient dans la fenêtre : sous la barre du haut (--haut-barre, posée par app.js), au-dessus du bandeau de
   confidentialité (--marge-bandeau). Sa zone prend la place qui reste entre le titre et la ligne du bas, quelle que soit
   leur hauteur (langue, largeur) ; la création y est aussi grande que possible. cqw, cqh : la largeur et la hauteur
   intérieures de la carte, puis, dans le cadre, celles de la zone. --ecran : la hauteur de l'écran ; sur un téléphone,
   celle qui reste quand la barre d'adresse est affichée (les tailles ne changent pas pendant le défilement). */
:root { --ecran: 100vh; }
@supports (height: 100svh) { :root { --ecran: 100svh; } }
@supports (container-type: size) {
  .apercu {
    container-type: inline-size;
    max-height: max(480px, calc(var(--ecran) - var(--haut-barre, 69px) - var(--marge-bandeau, 0px) - 32px));
  }
  /* Seule la zone se réduit : le titre et la ligne du bas gardent leur hauteur, même sur deux lignes. */
  .apercu-entete, .pied-progression, .meta { flex-shrink: 0; }
  /* Zone vide et cadre néon : toute la place de la carte (sur un téléphone, carrés, au moins 360 px). */
  .apercu-vide, .apercu .neon { flex: 0 1 auto; height: min(100vh, max(360px, 100cqw)); min-height: 0; }
  /* Résultat : la hauteur que demande la largeur de la carte, réduite si la fenêtre est plus basse ; le cadre y tient
     en entier, centré. */
  .apercu-resultat { container-type: size; flex: 0 1 auto; min-height: 0; height: calc(100cqw / var(--rapport)); }
  .apercu-resultat.resultat-voix { height: calc(100cqw * 9 / 16 + 78px); }
  .resultat-cadre { width: min(100cqw, calc(100cqh * var(--rapport))); }
  .resultat-voix .resultat-cadre { width: min(100cqw, calc((100cqh - 78px) * 16 / 9)); }
  /* Téléphone, tablette et fenêtre étroite (une seule colonne, jusqu'à 1 024 px) : la carte suit la page sous les
     réglages ; la création prend toute la largeur de la carte, quitte à faire défiler la page, mais jamais plus haute que
     la place visible (une 1:3 sur téléphone, une 9:16 sur tablette) et jamais sous la barre du haut ; contrôle qualité,
     11/11/2026. */
  @media (max-width: 1024px) {
    /* Tablette et fenêtre étroite : la barre du haut reste collée, la création tient en entier sous elle. */
    .apercu { position: static; max-height: none; --hauteur-max: calc(var(--ecran) - var(--haut-barre, 69px) - 24px); }
    .apercu-resultat { height: min(calc(100cqw / var(--rapport)), var(--hauteur-max)); }
    .apercu-resultat.resultat-voix { height: min(calc(100cqw * 9 / 16 + 78px), var(--hauteur-max)); }
  }
  /* Téléphone : la barre défile avec la page (fin des styles), la création peut prendre tout l'écran. */
  @media (max-width: 600px), (max-width: 1024px) and (max-height: 500px) {
    .apercu { --hauteur-max: calc(var(--ecran) - 32px); }
  }
}

/* Cadre néon : seulement le cadre, lumineux et diffus ; le contenu reste net. Deux formes fixes (le trait et la lueur),
   et dans chacune un grand carré au dégradé tournant par « transform » : il est dessiné une seule fois, puis la carte
   graphique le fait tourner. Avant le 18/11/2026, l'angle du dégradé était animé (« --angle ») : le dégradé et son flou
   étaient redessinés à chaque image, soit 15 % d'un cœur et 39 % du processus graphique sur le PC de développement
   (80 % d'un cœur sur le Zenbook, série du 28/10), pendant que le moteur calcule. Même rendu, au pixel près. */
@keyframes neon-respire { 0%, 100% { opacity: .72; } 50% { opacity: 1; } }
.neon { position: relative; border-radius: 18px; min-height: 380px; margin: 8px; }
.neon-trait, .neon-lueur { position: absolute; overflow: hidden; pointer-events: none; }
.neon-trait {
  inset: -3px; border-radius: 21px; padding: 3px; z-index: 2; filter: blur(1.5px);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.neon-lueur { inset: -16px; border-radius: 32px; z-index: 0; filter: blur(26px); animation: neon-respire 2.6s ease-in-out infinite; }
/* Sans les unités « cq » (vieux navigateur, sur le web) : le dégradé remplit la forme, sans tourner. */
.neon-trait > i, .neon-lueur > i {
  position: absolute; inset: 0;
  background: conic-gradient(from 0deg, #A07BFF, #F062FF, #3EE0FF, #FFB15C, #A07BFF);
}
/* Le carré : centré sur la forme, de côté largeur + hauteur (toujours plus que la diagonale : il la couvre à tout angle). */
@supports (width: 1cqw) {
  .neon-trait, .neon-lueur { container-type: size; }
  .neon-trait > i, .neon-lueur > i {
    inset: auto; left: 50%; top: 50%; width: calc(100cqw + 100cqh); height: calc(100cqw + 100cqh);
    margin: calc(-50cqw - 50cqh) 0 0 calc(-50cqw - 50cqh);
    animation: aura-tourne 5s linear infinite;
  }
}
/* Création très longue sur un petit PC (étape 3.9) : trois choix en cartes. */
.choix-lent { display: flex; flex-direction: column; gap: 10px; }
.choix-carte {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; text-align: start;
  border: 1.5px solid var(--bord); border-radius: 16px; background: var(--surface); color: var(--nuit);
}
.choix-carte:hover, .choix-carte:focus-visible { border-color: var(--accent); background: var(--teinte-2); }
.choix-carte-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.choix-carte-texte .fort { font-weight: 700; }
.bouton-centre { align-self: center; }
/* Calcul sur le processeur (petite carte) : le cadre reste, figé. */
.neon.calme .neon-lueur, .neon.calme .neon-trait > i, .neon.calme .neon-lueur > i { animation-play-state: paused; }
.neon-contenu {
  position: absolute; inset: 0; z-index: 1; border-radius: 18px; overflow: hidden; background: #0B0612;
  box-shadow: inset 0 0 34px rgba(160, 123, 255, .55), inset 0 0 8px rgba(255, 255, 255, .35);
}
.progression-fond { width: 100%; height: 100%; object-fit: cover; display: block; filter: blur(6px) saturate(1.2); opacity: .6; transform: scale(1.04); }
.progression {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 24px; text-align: center; color: #FFFFFF;
}
.progression-titre { font-family: var(--police-titre); font-size: 26px; font-weight: 700; }
.progression-etape { font-size: 15px; color: #E8E3FA; }
.barre-progression { display: flex; width: min(420px, 80%); height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.barre-progression-remplie { width: 0; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #6A35F2, #D43BF0, #22C7E8); transition: width .4s ease; }
:root[dir="rtl"] .barre-progression-remplie { background: linear-gradient(270deg, #6A35F2, #D43BF0, #22C7E8); }
.progression-pourcent { font-size: 32px; font-weight: 700; }
/* Pendant la préparation (avant le vrai calcul), une phrase remplace le pourcentage. */
.progression-pourcent.progression-phrase { font-size: 17px; font-weight: 600; }
/* Recharge payée sur le site, pas encore arrivée (étape 5). */
.attente-solde { width: 12px; height: 12px; margin-inline-start: 2px; }
.pied-progression { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn-arreter {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border: 1.5px solid var(--nuit); border-radius: 12px;
  background: var(--surface); color: var(--nuit); font-weight: 600;
}
.btn-arreter:hover { background: var(--lavande); }
.meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--texte-3); font-size: 13px; }

/* ---------- Vos dernières créations ---------- */
.galerie { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px; }
.galerie-entete { display: flex; align-items: center; gap: 12px; }
.galerie-entete h2 { flex: 1; font-size: 16px; font-weight: 700; }
.vignettes { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 2px; }
.vignette { position: relative; flex-shrink: 0; padding: 0; border: 0; border-radius: 12px; background: none; }
.vignette img { width: 112px; height: 112px; object-fit: cover; border-radius: 12px; display: block; }
.vignette-duree {
  position: absolute; inset-inline-start: 8px; bottom: 8px; display: flex; align-items: center; gap: 4px; padding: 3px 8px;
  border-radius: 10px; background: rgba(19, 11, 58, .78); color: #FFFFFF; font-size: 12px; font-weight: 600;
}
.vignette-duree .ic { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.galerie-vide { padding: 6px 0 4px; font-size: 14px; }

/* ---------- Fenêtres ---------- */
dialog.fenetre {
  width: min(560px, calc(100vw - 48px)); max-height: calc(100vh - 48px); overflow: auto;
  padding: 28px; border: 0; border-radius: 24px; background: var(--surface); color: var(--nuit);
  box-shadow: var(--ombre-fenetre);
}
dialog.fenetre[open] { display: flex; flex-direction: column; gap: 18px; }
dialog.fenetre-large { width: min(640px, calc(100vw - 48px)); }
dialog.fenetre-centree { align-items: center; text-align: center; gap: 20px; padding: 32px 28px 26px; }
dialog.fenetre::backdrop { background: var(--voile); }
.fenetre-entete { display: flex; flex-direction: column; gap: 6px; }
.fenetre-entete h2 { font-family: var(--police-titre); font-size: 22px; font-weight: 700; line-height: 1.3; }
.fenetre-texte { color: var(--texte-2); line-height: 1.5; }
.btn-fermer {
  position: absolute; top: 14px; inset-inline-end: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: transparent; color: var(--texte-3);
}
.btn-fermer:hover { background: var(--lavande); color: var(--nuit); }
#dlg-activation .fenetre-entete, #dlg-licence .module-entete { padding-inline-end: 36px; }
.licence-actuelle { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 8px 12px; border-radius: 12px; background: var(--vert-fond); color: var(--vert-texte); font-weight: 600; font-size: 14px; }
/* Licence par le compte (étape 4) */
.compte-actuel { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--lavande); color: var(--texte-2); font-size: 14px; }
.compte-actuel .ic { color: var(--accent); flex-shrink: 0; }
.compte-actuel .ressort { min-width: 0; overflow-wrap: anywhere; }
.compte-actuel .lien { flex-shrink: 0; padding: 6px 8px; border-radius: 8px; font-size: 14px; }
.compte-actuel .lien:hover { background: var(--lavande-2); }
/* Les bandeaux de l'en-tête prennent toute la largeur (l'en-tête laisse la place de la croix). */
#dlg-activation .fenetre-entete .licence-actuelle, #dlg-activation .compte-actuel { margin-inline-end: -36px; }
.activation-connexion { display: flex; flex-direction: column; gap: 10px; }
.tuile-verte { background: var(--vert-fond); color: var(--vert); }
.tuile-ambre { background: var(--ambre-fond); color: var(--ambre); }
#dlg-licence .fait .fort { overflow-wrap: anywhere; text-align: end; }
.menu-compte { width: auto; min-width: 240px; }
.menu-compte .article-menu { white-space: nowrap; }
.menu-entete { padding: 8px 12px 6px; color: var(--texte-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--lavande); color: var(--texte-2); font-size: 14px; line-height: 1.4; }
.message-alerte { background: var(--ambre-fond); color: var(--ambre-texte); }
.separateur { display: flex; align-items: center; gap: 12px; color: var(--texte-3); font-size: 14px; }
.separateur span:first-child, .separateur span:last-child { flex: 1; height: 1px; background: var(--bord); }
.offres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.offre { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1.5px solid var(--bord); border-radius: 16px; }
.offre-complete { border: 2px solid var(--accent); background: var(--teinte-2); }
.offre-badge { position: absolute; top: -12px; inset-inline-end: 14px; padding: 3px 10px; border-radius: 10px; background: var(--violet); color: #FFFFFF; font-size: 12px; font-weight: 700; }
.offre .fort { font-weight: 700; }
.offre-prix { font-family: var(--police-titre); font-size: 26px; font-weight: 700; }
.offre-complete .offre-prix { color: var(--violet-fonce); }
.offre-texte { color: var(--texte-2); font-size: 14px; line-height: 1.45; }
.actions-activation { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pleine-largeur { flex: 1 1 100%; line-height: 1.45; }

.module-entete { display: flex; align-items: flex-start; gap: 16px; }
.faits { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--fond); }
.fait { display: flex; align-items: center; gap: 10px; }
.fait > .ic { color: var(--accent); }
.fait .fort { font-weight: 700; }
.actions-module { display: flex; flex-direction: column; gap: 10px; }
.btn-grand { height: 54px; border-radius: 16px; font-size: 16px; box-shadow: 0 10px 24px rgba(106, 53, 242, .28); }
.btn-grand:disabled { box-shadow: none; }
.actions-ligne { display: flex; gap: 10px; flex-wrap: wrap; }
.actions-module .btn-secondaire { flex: 1 1 220px; }
.actions-module .btn-discret { flex: 0 1 140px; }
.actions-module > .btn-discret { align-self: center; flex: none; }
/* Téléchargement d'un module (étape 3.7) */
.module-telechargement { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; background: var(--fond); }
.telechargement-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.telechargement-pourcent { font-family: var(--police-titre); font-size: 26px; font-weight: 700; color: var(--nuit); }
.barre-progression.barre-claire { width: 100%; background: var(--desactive); }
#telechargement-etat:empty { display: none; }
.actions-centre { justify-content: center; }

.connexion-schema { display: flex; align-items: center; gap: 18px; }
.connexion-app { width: 64px; height: 64px; border-radius: 18px; background: var(--surface); border: 1px solid var(--bord); overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(19, 11, 58, .08); }
.connexion-app img { width: 54px; height: 54px; object-fit: contain; }
.connexion-fleche { width: 80px; height: 24px; fill: none; stroke: #B9A6F5; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 6; }
.connexion-fleche .pleine { stroke-dasharray: 0; }
:root[dir="rtl"] .connexion-fleche { transform: scaleX(-1); }
.connexion-site { display: flex; flex-direction: column; width: 120px; border-radius: 12px; border: 1px solid var(--bord); overflow: hidden; box-shadow: 0 6px 18px rgba(19, 11, 58, .08); }
.connexion-site .points { display: flex; gap: 4px; padding: 6px 8px; background: var(--lavande); }
.connexion-site .points span { width: 6px; height: 6px; border-radius: 50%; background: var(--bord-3); }
.connexion-adresse { padding: 12px 8px; font-size: 13px; font-weight: 700; color: var(--violet-fonce); direction: ltr; }
.attente-ligne { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 14px; background: var(--lavande); font-weight: 600; }
.attente-ligne .attente { width: 18px; height: 18px; border-width: 2.5px; }
.fenetre-centree .note { align-items: center; }

/* ---------- Clonage de voix (étape 3.6) ---------- */
.clonage-carte { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1.5px dashed var(--pointille); border-radius: 14px; background: var(--teinte-2); }
.clonage-textes { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.clonage-textes .btn-secondaire { align-self: flex-start; margin-top: 8px; }
.voix-carte-clonee { position: relative; padding-inline-end: 4px; }
.voix-carte-clonee .voix-bouton { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voix-marque { display: inline-flex; vertical-align: -3px; margin-inline-end: 5px; color: var(--accent); }
.voix-marque .ic { width: 15px; height: 15px; }
.voix-options {
  width: 30px; height: 30px; flex-shrink: 0; border: 0; border-radius: 8px; background: transparent; color: var(--texte-3);
  display: flex; align-items: center; justify-content: center;
}
.voix-options .ic { stroke-width: 3.2; }
.voix-options:hover, .voix-options[aria-expanded="true"] { background: var(--lavande); color: var(--nuit); }
.menu-voix { width: 200px; }
/* Voix off du Cloud : « + de voix » ouvre la liste complète, rangée par groupe (03/11/2026). */
.plus-de-voix { position: relative; }
.btn-toutes-voix .chevron-voix { margin-inline-start: auto; color: var(--accent); }
.btn-toutes-voix[aria-expanded="true"] .chevron-voix { transform: rotate(180deg); }
.ligne-voix { display: flex; align-items: center; gap: 6px; padding-inline-start: 6px; border-radius: 10px; }
.ligne-voix .article-voix { flex: 1; min-width: 0; }
.menu-voix-cloud {
  inset-inline-start: 0; inset-inline-end: auto; width: 300px; max-height: 340px; overflow-y: auto; padding: 6px;
  border-radius: 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--ombre-menu);
}
.groupe-voix { padding: 10px 12px 4px; color: var(--texte-3); font-size: 12px; font-weight: 700; }
.avis-groupe-voix { padding: 0 12px 4px; font-size: 12px; }
.article-voix { height: auto; min-height: 44px; padding-block: 6px; }
.article-voix-textes { flex: 1; display: flex; flex-direction: column; gap: 1px; }

dialog.clonage { gap: 22px; }
#titre-clonage:focus { outline: none; }
.clonage h3 { margin: 0; }
.clonage-formulaire { display: flex; flex-direction: column; gap: 24px; }
.clonage-etape { display: flex; flex-direction: column; gap: 12px; }
.clonage-etape-titre { font-size: 16px; font-weight: 700; }
.clonage-source { display: flex; flex-direction: column; gap: 10px; }
.clonage-langue { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.clonage-langue .segments { flex: 1 1 260px; }
.segments-petits .segment { height: 34px; font-size: 14px; }
.texte-a-lire {
  margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--lavande); border-inline-start: 4px solid var(--accent);
  font-size: 16px; line-height: 1.7; color: var(--nuit); user-select: text;
}
.texte-a-lire:lang(ar) { font-family: 'Readex Pro', 'Segoe UI', sans-serif; font-size: 18px; line-height: 2.1; }
.enregistreur { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 1.5px solid var(--bord); border-radius: 18px; }
.enregistreur.en-cours { border-color: #FF4D6D; box-shadow: 0 0 0 4px rgba(255, 77, 109, .12); }
.btn-enregistrement {
  display: flex; align-items: center; gap: 10px; height: 46px; padding-inline: 14px 18px; border: 0; border-radius: 23px;
  background: var(--inverse); color: var(--sur-inverse); font-weight: 700; white-space: nowrap; flex-shrink: 0;
}
.btn-enregistrement:hover { background: var(--inverse-survol); }
.btn-enregistrement .pastille { width: 14px; height: 14px; border-radius: 50%; background: #FF4D6D; }
.btn-enregistrement.en-cours .pastille { border-radius: 3px; background: var(--sur-inverse); }
.enregistrement-temps { min-width: 42px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--texte-2); }
.enregistreur.en-cours .enregistrement-temps { color: #D6214A; }
.niveau { flex: 1; min-width: 0; display: flex; align-items: center; gap: 3px; height: 34px; }
.niveau span { flex: 1; height: 12%; min-height: 3px; border-radius: 2px; background: var(--bord-3); }
.enregistreur.en-cours .niveau span { background: linear-gradient(180deg, #F062FF, #6A35F2); }
.clonage-extrait { display: flex; flex-direction: column; gap: 10px; }
.extrait-ligne { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.extrait-ligne audio { flex: 1 1 260px; min-width: 0; height: 42px; }
.message-ok { background: var(--vert-fond); color: var(--vert-texte); }
.message > .ic { width: 18px; height: 18px; flex-shrink: 0; align-self: flex-start; margin-top: 1px; }
.message-lignes { display: flex; flex-direction: column; gap: 4px; }
.message-lignes .discret { opacity: .8; }
.case { display: flex; align-items: flex-start; gap: 10px; line-height: 1.45; cursor: pointer; }
.case input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--violet); cursor: pointer; }
.case-textes { display: flex; flex-direction: column; gap: 2px; }
.case-accord { padding: 14px; border: 1.5px solid var(--bord-2); border-radius: 14px; }
.case-accord:has(input:checked) { border-color: var(--accent); background: var(--teinte-2); }
.case-details { margin-top: 4px; }
/* « Avec son » de la vidéo du Cloud : un interrupteur sous la barre de durée, encadré comme les modèles, en face du titre
   (la note de l'avocat tient sur plusieurs lignes) ; en arabe, il passe à gauche et glisse vers la gauche. */
.case-son { align-items: flex-start; gap: 14px; margin-top: 6px; padding: 12px 14px; border: 1.5px solid var(--bord); border-radius: 12px; }
.case-son:hover { border-color: var(--pointille); }
.case-son:has(input:checked) { border-color: var(--accent); background: var(--teinte); }
.case-son .case-textes { flex: 1; min-width: 0; }
.case-son:has(input:checked) .fort { color: var(--violet-fonce); }
.case-son:has(input:checked) .aide { color: var(--texte-2); }
/* 07/11/2026 : la note se replie ; la petite flèche à côté de « Avec son » l'ouvre (elle se retourne quand la note est
   ouverte). Repliée, l'interrupteur se centre sur le titre. */
.case-son:has(#son-video-note[hidden]) { align-items: center; }
.case-son-titre { display: inline-flex; align-items: center; gap: 4px; }
.btn-deplier {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-block: -3px;
  border-radius: 50%; color: var(--accent); cursor: pointer;
}
.btn-deplier:hover { background: var(--lavande); }
.btn-deplier:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }
.btn-deplier .ic { transition: transform .15s ease; }
.btn-deplier[aria-expanded="true"] .ic { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .btn-deplier .ic { transition: none; } }
.case-son .aide { margin-top: 2px; }
.case .interrupteur {
  appearance: none; -webkit-appearance: none; position: relative; width: 42px; height: 24px; margin: 0; flex-shrink: 0;
  border-radius: 999px; background: var(--interrupteur-eteint); transition: background-color .15s ease;
}
.case .interrupteur::before {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #FFFFFF; box-shadow: 0 1px 3px rgba(19, 11, 58, .3); transition: inset-inline-start .15s ease;
}
.case .interrupteur:checked { background: var(--violet); }
.case .interrupteur:checked::before { inset-inline-start: 21px; }
@media (prefers-reduced-motion: reduce) { .case .interrupteur, .case .interrupteur::before { transition: none; } }
/* Choix des modules au premier lancement (étape 6) : une case par module, la vidéo grisée sur une petite carte. */
.choix-modules { display: flex; flex-direction: column; gap: 10px; }
.case-module { align-items: center; padding: 10px 14px; }
.case-module input { margin: 0; }
.case-module:has(input:disabled) { cursor: default; background: var(--fond); }
.case-module:has(input:disabled) input { cursor: default; }
.case-module:has(input:disabled) .tuile-icone { opacity: .55; }
/* Réglages (étape 6) : les modules sur ce PC, « À propos » et les licences des composants. */
#dlg-reglages .fenetre-entete { padding-inline-end: 36px; }
.reglages-section { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--bord); }
.reglages-titre { font-size: 16px; font-weight: 700; }
.reglages-modules { display: flex; flex-direction: column; gap: 10px; }
.ligne-module { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 1.5px solid var(--bord); border-radius: 16px; }
.ligne-module .choix-carte-texte { flex: 1; }
.ligne-module .btn-secondaire { flex-shrink: 0; }
.licences summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.licences[open] summary { margin-bottom: 12px; }
.licences-liste { display: flex; flex-direction: column; gap: 12px; }
.licences-groupe h4 { margin-bottom: 4px; font-size: 14px; font-weight: 700; }
.licences-groupe ul { display: flex; flex-direction: column; gap: 3px; padding: 0; list-style: none; color: var(--texte-2); font-size: 13.5px; line-height: 1.45; }
.reglages-sous-titre { display: block; margin-top: 16px; font-size: 14px; font-weight: 700; }
.licences-textes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.licence-texte {
  max-height: 260px; margin-top: 10px; padding: 12px 14px; overflow: auto; border-radius: 12px; background: var(--fond);
  color: var(--texte-2); font-size: 12px; line-height: 1.5; white-space: pre-wrap; direction: ltr; text-align: left;
}
.lien-externe { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; }
.champ-texte {
  width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--bord-2); border-radius: 12px;
  background: var(--champ); color: var(--nuit); font-size: 16px;
}
.champ-texte:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(106, 53, 242, .12); }
.clonage .actions-ligne .btn-principal { flex: 1 1 240px; }
.actions-fenetre { margin-top: 8px; }
.clonage-creation { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 0 16px; text-align: center; }
.clonage-terminee { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 0; text-align: center; }
.clonage-terminee .tuile-icone { background: var(--vert-fond); color: var(--vert); }
.clonage-terminee h3 { font-family: var(--police-titre); font-size: 20px; line-height: 1.3; }
.clonage-terminee audio { width: 100%; }
.clonage-terminee .btn-principal { align-self: stretch; }
.btn-danger {
  display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px;
  background: var(--rouge-texte); color: #FFFFFF; font-weight: 700;
}
.btn-danger:hover { background: #7F0D2D; }

/* ---------- Message passager ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 60;
  max-width: min(560px, calc(100vw - 48px)); padding: 12px 18px; border-radius: 14px;
  background: var(--inverse); color: var(--sur-inverse); font-size: 14px; line-height: 1.45; text-align: center;
  box-shadow: var(--ombre-menu);
}

/* ---------- Petites fenêtres ---------- */
@media (max-width: 1180px) {
  .barre { padding: 10px 16px; gap: 8px; }
  .barre > .logo { width: 124px; height: 35px; }
  .barre .segment { padding: 0 12px; }
  .contenu { padding: 18px 16px 20px; }
  .rangee { gap: 18px; }
  .composer, .apercu { flex-basis: 400px; }
  /* Seul le drapeau reste visible ; le nom de la langue est toujours lu par les lecteurs d'écran. */
  #langue-actuelle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* Téléphone, tablette et fenêtre étroite (11/11/2026) : jusqu'à 1 024 px, toujours une seule colonne, les réglages puis
   « Votre création » (en deux colonnes, la carte était trop étroite) ; au-delà, toujours deux colonnes. La taille de la
   création suit ce seuil (« Votre création », fin de la partie). */
@media (max-width: 1024px) { .composer, .apercu { flex-basis: 100%; } }
@media (min-width: 1025px) { .rangee { flex-wrap: nowrap; } }
/* Téléphone, en hauteur ou couché (accord de l'utilisateur du 11/11/2026) : la barre du haut ne reste plus collée en haut
   de l'écran. Elle remonte avec la page quand on descend et revient quand on remonte en haut ; elle ne passe donc jamais
   sur la création, qui garde toute la largeur. Ses menus restent accrochés à leurs boutons. */
@media (max-width: 600px), (max-width: 1024px) and (max-height: 500px) {
  .barre { position: relative; }
}

@media (prefers-reduced-motion: reduce) {
  .halo, .attente, .neon-lueur, .neon-trait > i, .neon-lueur > i { animation: none; }
  .bonjour, .bonjour > :not(.halo), .barre-progression-remplie { transition: none; }
}
