/* TS4 Mod Factory by Danaella — feuille de style.
   Palette violette de l'identité DanaellaSims, relevée sur les deux
   dégradés de référence (Documents/violet-bg.png et violet-bg-dark.png) :
   le dégradé profond pour la bannière d'accueil et les vignettes, le clair
   pour les pictogrammes et les étapes en cours ; titres en violet presque
   noir, cartes blanches bordées d'un filet. Contrastes du texte vérifiés
   (WCAG AA, 4,5:1 minimum). */

/* Manrope (SIL Open Font License, static/fonts/OFL.txt), servie par le
   site : aucune requête vers un service de polices. */
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/manrope-latin.938c6e8019b6.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
                 U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/manrope-latin-ext.6d36d5bdedfa.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
                 U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --violet-950: #2B0A52;      /* texte des boutons blancs */
  --violet-900: #32006D;      /* dégradé profond, bas */
  --violet-800: #400170;      /* dégradé profond, milieu */
  --plum-700: #5F0274;        /* dégradé profond, haut */
  --violet-700: #5D2091;      /* dégradé clair, haut : couleur principale */
  --violet-600: #9348BF;      /* dégradé clair, bas */
  --lavender-300: #D9C4F0;
  --lavender-200: #F1ECF8;    /* étiquettes */
  --lavender-100: #F6EFFC;
  --ink: #170D24;             /* titres et texte */
  --white: #FFFFFF;
  --gray-900: #26232E;
  --gray-700: #4A4356;        /* texte secondaire, liens du menu */
  --gray-600: #6B6377;        /* texte discret */
  --gray-300: #D9D5E0;        /* bord des champs */
  --line: #E7E2EE;            /* filets et bord des cartes */
  --gray-100: #F7F6F9;
  --background: #F4F2F8;
  --error: #8A1C3B;
  --error-bg: #FDECEF;
  --success: #1F5E3A;
  --success-bg: #E8F6EE;
  --success-light: #2F8A55;
  --orange: #FDA00E;          /* version d'essai */
  --orange-text: #B35900;     /* l'orange, lisible sur fond blanc */
  --orange-dark: #8A4400;
  --orange-bg: #FFF3E0;
  --gradient: linear-gradient(135deg, var(--violet-700), var(--violet-600));
  --gradient-brand: linear-gradient(120deg, var(--violet-900) 0%, var(--violet-800) 55%, var(--plum-700) 100%);
  --radius: 14px;
  --radius-small: 8px;
  --radius-button: 10px;
  --shadow: 0 2px 10px rgba(46, 26, 92, 0.08);
  --shadow-strong: 0 6px 24px rgba(46, 26, 92, 0.16);
  --focus: 0 0 0 3px var(--white), 0 0 0 6px var(--violet-700);
  font-size: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
/* Un élément masqué le reste, quelle que soit sa mise en page. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--violet-700); }
a:hover { color: var(--violet-900); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-small); }

h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto;
             padding-left: 28px; padding-right: 28px; }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  background: var(--white); padding: 8px 12px; border-radius: var(--radius-small);
}
.skip-link:focus { top: 8px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- en-tête -------------------------------------------------------- */

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 12px 30px; min-height: 66px; flex-wrap: wrap;
                padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-size: 1.0625rem;
         text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand-icon { width: auto; height: 40px; flex: none; transition: transform 0.2s; }
.brand:hover .brand-icon { transform: rotate(-6deg) scale(1.05); }
/* Le nom de l'outil et l'étiquette « Bêta », « by Danaella » dessous */
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { display: flex; align-items: center; gap: 8px; }
.brand-title strong { font-weight: 800; }
.brand-by { font-weight: 500; font-size: 0.8125rem; color: var(--gray-600); }
.brand-badge { background: rgba(93, 32, 145, 0.12); color: var(--violet-700); }
.site-nav { display: flex; align-items: center; gap: 24px; font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
/* Entrées du menu : soulignées en violet au survol et sur la page en cours. */
.site-nav a, .header-link { color: var(--gray-700); text-decoration: none; text-underline-offset: 6px; }
.site-nav a:hover, .header-link:hover, .site-nav a[aria-current="page"], .header-link[aria-current="page"] {
  color: var(--violet-700); text-decoration: underline; }
.header-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; font-size: 0.875rem;
                  font-weight: 600; white-space: nowrap; }

/* Menu des langues : la langue de la page dans une pastille, les autres
   dans le menu déroulant ; la langue affichée y est cochée. */
.menu.lang-menu { margin-left: 0; }
.menu.lang-menu summary { display: block; width: auto; height: auto; padding: 5px 12px;
                          border: 1px solid var(--line); border-radius: 999px; background: none;
                          color: var(--gray-700); font-weight: 600; }
.menu.lang-menu summary::after { content: "▾"; display: inline-block; margin-left: 6px; font-size: 0.8em; }
.menu.lang-menu summary:hover, .menu.lang-menu[open] summary { border-color: var(--lavender-300); color: var(--violet-700);
                                                                background: none; }
.menu.lang-menu .menu-panel { min-width: 160px; top: 38px; }
.menu.lang-menu button[aria-current="true"] { color: var(--violet-900); cursor: default; }
.menu.lang-menu button[aria-current="true"]::after { content: "✓"; float: right; margin-left: 12px; }
.menu.lang-menu button[aria-current="true"]:hover { background: none; }

/* Menu « Mon compte » : le menu déroulant des projets, ouvert par un lien. */
.menu.account-menu { margin-left: 0; }
.menu.account-menu summary { display: block; width: auto; height: auto; padding: 4px 2px; border: 0;
                             border-radius: var(--radius-small); background: none; color: var(--gray-700);
                             font-weight: 600; text-underline-offset: 6px; }
/* La flèche en bloc en ligne : le soulignement ne la traverse pas. */
.menu.account-menu summary::after { content: "▾"; display: inline-block; margin-left: 6px; font-size: 0.8em; }
.menu.account-menu summary:hover, .menu.account-menu summary[aria-current="page"] {
  background: none; color: var(--violet-700); text-decoration: underline; }
.menu.account-menu .menu-panel { min-width: 210px; top: 34px; }

main { flex: 1; padding-top: 28px; padding-bottom: 56px; }

.site-footer { color: var(--gray-600); font-size: 0.85rem; padding: 28px 0 32px;
               border-top: 1px solid var(--gray-300); background: var(--white); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.footer-text p { margin: 0 0 4px; }
.footer-brand { color: var(--gray-900); }
.footer-brand strong { color: var(--violet-900); }
.footer-nav { display: flex; gap: 18px; margin: 6px 0 10px; }
.footer-nav a { font-weight: 700; }
.footer-text .footer-legal { margin-top: 10px; }
.footer-legal a { color: var(--gray-600); }
.footer-legal a:hover { color: var(--violet-700); }
.social-links { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.social-links a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
                  color: var(--violet-700); background: var(--lavender-100); transition: background 0.15s; }
.social-links a:hover { background: var(--violet-700); color: var(--white); }

/* --- boutons -------------------------------------------------------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
       padding: 11px 20px; border-radius: var(--radius-button); border: 1px solid transparent;
       font: inherit; font-size: 0.875rem; font-weight: 700; text-decoration: none; cursor: pointer;
       line-height: 1.2; white-space: nowrap; }
/* « border-box » sur les fonds en dégradé : sous une bordure transparente,
   le dégradé se répéterait et laisserait un liseré clair. */
.btn-primary { background: var(--gradient) border-box; color: var(--white); box-shadow: var(--shadow); }
.btn-primary:hover { color: var(--white); box-shadow: var(--shadow-strong); }
.btn-secondary { background: var(--white); color: var(--violet-700); border-color: var(--lavender-300); }
.btn-secondary:hover { background: var(--lavender-100); color: var(--violet-900); }
.btn-gradient { background: var(--gradient) border-box; color: var(--white); }
.btn-gradient:hover { color: var(--white); box-shadow: var(--shadow-strong); }
.btn-danger { background: var(--error); color: var(--white); }
.btn-danger:hover { color: var(--white); background: #6f1630; }
/* Sur les fonds violets de l'accueil (bannière, bandeau de soutien) */
.btn-white { background: var(--white); color: var(--violet-950); }
.btn-outline-light { border: 1.5px solid rgba(255, 255, 255, 0.35); color: var(--white); }
.btn-white:hover, .btn-outline-light:hover { background: var(--gradient) border-box; border-color: transparent;
                                              color: var(--white); }
.btn-secondary.is-trial { color: var(--orange-text); border-color: var(--orange); }
.btn-secondary.is-trial:hover { background: var(--orange-bg); color: var(--orange-dark); }
.menu-panel .is-trial { color: var(--orange-text); }
.menu-panel .is-trial:hover { background: var(--orange-bg); color: var(--orange-dark); }
.btn-ready { background: linear-gradient(135deg, var(--success), var(--success-light)) border-box; color: var(--white); }
.btn-ready:hover { background: linear-gradient(135deg, #184B2E, #267349) border-box; color: var(--white); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--violet-700);
        cursor: pointer; text-decoration: underline; }
.link.danger { color: var(--error); }
.link.danger:hover { color: #6f1630; }
.link[disabled] { opacity: 0.55; cursor: not-allowed; }

/* --- cartes, étiquettes, pictogrammes ------------------------------- */

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card + .card { margin-top: 20px; }
.type-grid > .card, .project-grid > .project-card { margin-top: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between;
             gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
/* Titre précédé du pictogramme du type de mod (création, éditeur, customizers) */
.page-title { display: flex; align-items: center; gap: 14px; }
.page-head .quota { margin: 6px 0 0; font-size: 0.9rem; }
.actions { display: flex; gap: 14px 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--gray-600); }
.small { font-size: 0.875rem; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 700;
         line-height: 1.5; background: var(--lavender-200); color: var(--violet-700); }
.badge-large { padding: 4px 11px; border-radius: 7px; font-size: 0.84rem; }
.badge-neutral { background: #EEF0F3; color: #4B5563; }
.badge-orange { background: #FFF1DC; color: #9A5A00; }
.badge-pink { background: #FCE7F1; color: #A3195B; }
.badge-ready { background: var(--success-bg); color: var(--success); }
.badge-needs_update { background: var(--error-bg); color: var(--error); }
.badge-archived { background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-300); }

/* Pictogramme blanc sur une tuile au dégradé clair */
.icon-tile { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px;
             color: var(--white); background: var(--gradient); }
.icon-tile svg { width: 17px; height: 17px; }
.icon-tile-large { width: 48px; height: 48px; border-radius: 13px; }
.icon-tile-large svg { width: 24px; height: 24px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px;
                flex-wrap: wrap; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 1.5rem; letter-spacing: -0.025em; }
.section-head a { font-size: 0.875rem; font-weight: 700; text-decoration: none; }

/* Bandeau : pictogramme, texte, bouton à droite (script commun, customizers) */
.script-banner { display: flex; align-items: center; gap: 20px; background: var(--white);
                 border: 1px solid var(--line); border-radius: 16px; padding: 24px 30px; }
.script-banner h2 { margin: 0 0 4px; font-size: 1.125rem; letter-spacing: -0.015em; }
.script-banner p { margin: 0; color: var(--gray-700); max-width: 780px; }
.script-banner > .btn, .script-banner > .badge { flex: none; margin-left: auto; }

/* --- formulaires ---------------------------------------------------- */

form p { margin: 0; }
.form-field, form > div:not(.actions) { margin-bottom: 24px; }
label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--gray-900); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="number"], input[type="time"], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--gray-300);
  border-radius: var(--radius-small); font: inherit; background: var(--white); color: var(--gray-900);
}
/* Champ actif : bordure violette et halo serré, qui ne mord pas sur le texte d'aide au-dessus. */
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--violet-700); box-shadow: 0 0 0 3px rgba(93, 32, 145, 0.25);
}
.helptext, form .helptext { display: block; color: var(--gray-600); font-size: 0.875rem; margin: 2px 0 10px; }
.helptext ul { margin: 4px 0 0; padding-left: 20px; }
form .form-note { margin: 18px 0 0; }
.after-form { margin-top: 16px; }
.card-action { margin: 16px 0 0; }
.errorlist { list-style: none; margin: 4px 0; padding: 0; color: var(--error); font-weight: 600;
             font-size: 0.9rem; }
.errorlist.nonfield { background: var(--error-bg); padding: 10px 14px; border-radius: var(--radius-small); }
input[aria-invalid="true"] { border-color: var(--error); }
input[aria-invalid="true"]:focus-visible { border-color: var(--error); box-shadow: 0 0 0 3px rgba(138, 28, 59, 0.2); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--violet-700); width: 18px; height: 18px; }
.checkbox-row label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }

.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.feedback-kinds fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.feedback-kinds legend { font-weight: 600; padding: 0; margin-bottom: 10px; }
.feedback-kinds label { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 0 0 8px; }

/* choix sous forme de cartes (modèle de départ, type de projet) */
.choice-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
               margin: 0 0 32px; padding: 0; border: 0; }
.choice-grid legend { font-weight: 600; margin: 0; padding: 0 0 12px; }
.choice { position: relative; display: block; background: var(--white); border: 2px solid var(--gray-300);
          border-radius: var(--radius); padding: 16px 16px 16px 48px; cursor: pointer; font-weight: 400; }
.choice input { position: absolute; left: 16px; top: 18px; }
.choice strong { display: block; color: var(--violet-900); }
.choice:has(input:checked) { border-color: var(--violet-700); background: var(--lavender-100); }
.choice:hover { border-color: var(--lavender-300); }

/* --- messages ------------------------------------------------------- */

.messages { list-style: none; margin: 0 0 24px; padding: 0; }
.messages li { padding: 12px 16px; border-radius: var(--radius-small); margin-bottom: 8px;
               background: var(--lavender-100); color: var(--violet-900); font-weight: 500; }
.messages li.success { background: var(--success-bg); color: var(--success); }
.messages li.error { background: var(--error-bg); color: var(--error); }

/* --- tableau de bord ------------------------------------------------ */

.filters { display: grid; gap: 12px; grid-template-columns: 2fr repeat(3, 1fr); align-items: end;
           background: var(--white); padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
           margin-bottom: 24px; }
.filters .form-field, .filters > div { margin: 0; }
.filters label { font-size: 0.85rem; }

.project-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
                list-style: none; margin: 0; padding: 0; }
.project-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
                padding: 20px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.project-card h2 { font-size: 1.15rem; margin: 0; overflow-wrap: anywhere; }
.project-card h2 a { color: var(--ink); text-decoration: none; }
.project-card h2 a:hover { text-decoration: underline; }
.project-card .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
                      color: var(--gray-600); font-size: 0.875rem; }
.project-card .card-actions { display: flex; gap: 8px; align-items: center; margin-top: auto; }
.project-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--gradient-brand);
                display: grid; place-items: center; color: var(--white); flex: none; }
.project-icon img { width: 44px; height: 44px; border-radius: 12px; }
.project-head { display: flex; gap: 12px; align-items: center; }

/* Packs requis : vignettes dessinées pour le site (jamais les logos d'EA),
   dégradé profond = pack d'extension, clair = pack de jeu, lavande = kit. */
.packs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pack { position: relative; display: inline-grid; place-items: center; min-width: 46px; height: 26px; padding: 0 8px;
        border-radius: 7px; background: var(--gradient-brand); color: var(--white); font-size: 0.72rem;
        font-weight: 700; letter-spacing: 0.04em; cursor: default; }
.pack-gp { background: var(--gradient); }
.pack-sp, .pack-fp { background: var(--lavender-100); color: var(--violet-800); border: 1px solid var(--lavender-300); }
.pack:focus-visible { outline: none; box-shadow: var(--focus); }
.pack:hover::after, .pack:focus::after {
  content: attr(data-name); position: absolute; z-index: 20; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  width: max-content; max-width: 260px; padding: 8px 12px; border-radius: var(--radius-small);
  background: var(--gray-900); color: var(--white); font-size: 0.85rem; font-weight: 400; letter-spacing: 0;
  line-height: 1.4; text-align: left; box-shadow: var(--shadow-strong); white-space: normal; }

.menu { position: relative; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; width: 36px; height: 36px; border-radius: 50%;
                display: grid; place-items: center; color: var(--violet-700); font-weight: 700;
                border: 1px solid var(--lavender-300); background: var(--white); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: var(--lavender-100); }
.menu-panel { position: absolute; right: 0; top: 42px; z-index: 5; min-width: 250px;
              background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-small);
              box-shadow: var(--shadow-strong); padding: 6px; }
.menu-panel a, .menu-panel button { display: block; width: 100%; text-align: left; padding: 9px 12px;
                                    border: 0; background: none; font: inherit; color: var(--gray-900);
                                    text-decoration: none; border-radius: 6px; cursor: pointer; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--lavender-100); color: var(--violet-900); }
.menu-panel form { margin: 0; }
.menu-panel .danger { color: var(--error); }

.empty-state { text-align: center; padding: 48px 24px; }
.empty-state p { color: var(--gray-600); }

/* --- création de projet --------------------------------------------- */

.type-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.type-card { display: flex; flex-direction: column; gap: 10px; }
.type-card .type-visual { height: 96px; border-radius: 12px; background: var(--gradient);
                          display: grid; place-items: center; color: var(--white); }
.type-card .type-visual svg { width: 40px; height: 40px; }
.type-card.unavailable .type-visual { background: linear-gradient(135deg, var(--lavender-300), var(--lavender-100));
                                      color: var(--violet-900); }
.type-card .btn { margin-top: auto; align-self: flex-start; }
.type-grid + .script-banner { margin-top: 24px; }

/* --- détail --------------------------------------------------------- */

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.facts dt { color: var(--gray-600); }
.facts dd { margin: 0; font-weight: 500; }
.mail-body { overflow-wrap: anywhere; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
             font-size: 0.9rem; background: var(--gray-100); padding: 14px; border-radius: var(--radius-small); }
.notice { background: var(--lavender-100); border-left: 4px solid var(--violet-700);
          padding: 14px 18px; border-radius: var(--radius-small); margin: 0 0 20px; }

/* --- accueil -------------------------------------------------------- */

.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr 1.08fr; gap: 20px;
        overflow: hidden; color: var(--white); border-radius: 20px; }
/* Le fond violet ne passe pas sous les bords droit et bas de l'aperçu
   blanc : selon le zoom de l'écran, l'aperçu s'arrête à une fraction de
   pixel du bord et l'arrondi est découpé à part, ce qui laissait un liseré
   violet. Les bandes retirées restent sous l'aperçu (il commence à 44 px du
   haut, avant 60 % de la largeur). */
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--gradient-brand);
                clip-path: polygon(0 0, 100% 0, 100% 80px, calc(100% - 40px) 80px,
                                   calc(100% - 40px) calc(100% - 40px), 60% calc(100% - 40px), 60% 100%, 0 100%); }
.hero-text { padding: 56px 0 52px 52px; }
.hero-status { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 5px 12px;
               border-radius: 999px; background: rgba(255, 255, 255, 0.12); font-size: 0.8125rem; font-weight: 700; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; }
.hero h1 { margin: 20px 0 16px; color: var(--white); font-size: 2.875rem; line-height: 1.08; letter-spacing: -0.035em; }
.hero-lead { max-width: 470px; margin: 0 0 28px; color: #E4D7F5; font-size: 1.03rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
/* Les mentions sur une seule ligne. */
.hero-facts { display: flex; gap: 6px 20px; list-style: none; margin: 30px 0 0; padding: 18px 0 0;
              white-space: nowrap;
              border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: 0.8125rem; color: #D3C3EA; }
.hero-facts b { color: var(--white); }
/* Aperçu : l'éditeur dans un cadre de navigateur. */
.hero-visual { padding: 44px 0 0 10px; }
.browser-frame { height: 100%; overflow: hidden; border-radius: 12px 0 0 0; background: var(--white);
                 box-shadow: 0 30px 60px rgba(10, 0, 30, 0.35); }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: #F2EFF6; }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #D8D1E2; }
.browser-frame img { display: block; width: 100%; height: 420px; object-fit: cover; object-position: left top; }
.home-section { margin-top: 54px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; }
.step-card { overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.step-shot { display: block; width: 100%; height: 150px; object-fit: cover; object-position: left top;
             border-bottom: 1px solid var(--line); }
.step-shot-soft { display: grid; place-items: center; padding: 14px 18px; background: #F3EEF9; }
.step-shot-soft img { width: auto; max-width: 100%; height: 122px; object-fit: contain; border-radius: 8px;
                      box-shadow: 0 8px 20px rgba(43, 10, 82, 0.18); }
.step-body { padding: 18px 20px 20px; }
.step-kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; color: var(--violet-700);
               font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.step-body h3 { margin: 4px 0 6px; font-size: 1.125rem; letter-spacing: -0.015em; }
.step-body p { margin: 0; color: var(--gray-600); font-size: 0.875rem; }

.table-card { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.type-table { width: 100%; border-collapse: collapse; }
.type-table th, .type-table td { padding: 14px 20px; border-bottom: 1px solid var(--line); text-align: left; }
.type-table thead th { padding-top: 13px; padding-bottom: 13px; background: #FBFAFD; color: var(--gray-600);
                       font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.type-table tbody tr:last-child > * { border-bottom: 0; }
.type-table tbody th { width: 250px; font-weight: 400; }
.type-table td:nth-child(2) { color: var(--gray-700); }
.type-name { display: flex; align-items: center; gap: 12px; }
.type-icon { display: inline-grid; flex: none; color: var(--ink); }
.type-icon svg { display: block; }
.type-table .badge { white-space: nowrap; }

.home-bottom { display: grid; grid-template-columns: 360px 1fr; gap: 22px; align-items: start; }
.tool-state { padding: 22px 24px; }
.tool-state h2 { margin: 0 0 10px; color: var(--gray-600); font-size: 0.75rem; letter-spacing: 0.1em;
                 text-transform: uppercase; }
.tool-state dl { margin: 0; }
.tool-state dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0;
                       border-top: 1px solid var(--line); font-size: 0.875rem; }
.tool-state dl > div:first-child { border-top: 0; }
.tool-state dd { margin: 0; font-weight: 700; }
.tool-state .is-ok { color: #1F7A45; }
/* Le titre du journal s'aligne sur le haut de la carte « État de l'outil ». */
.home-bottom .section-head { align-items: center; margin: 0 0 14px; }
.home-bottom .section-head h2 { margin-top: -1px; line-height: 1; }
.journal-entry { padding: 18px 22px; }
.home-bottom .journal-entry + .journal-entry { margin-top: 12px; }
.journal-entry .entry-meta { margin: 0 0 4px; font-size: 0.8rem; }
.journal-entry h3 { margin: 0 0 4px; font-size: 1rem; }
.journal-entry p:not(.entry-meta) { margin: 0; color: var(--gray-700); font-size: 0.875rem; }

.home-section + .script-banner { margin-top: 54px; }
.support-banner { position: relative; overflow: hidden; display: flex; align-items: center; gap: 30px;
                  margin-top: 18px; padding: 30px 36px; border-radius: 16px; background: var(--gradient-brand);
                  color: var(--white); }
/* Reflet large et doux, en diagonale vers le bouton */
.support-banner::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, 0.04) 54%, rgba(255, 255, 255, 0.11) 68%,
                              rgba(255, 255, 255, 0.13) 76%, rgba(255, 255, 255, 0.05) 90%, transparent 100%); }
.support-banner > * { position: relative; }
.support-icon { display: inline-grid; flex: none; color: var(--white); }
.support-icon svg { width: 46px; height: 46px; }
.support-banner h2 { margin: 0 0 4px; color: var(--white); font-size: 1.25rem; }
.support-banner p { margin: 0; color: #D7CBEA; }
.support-banner .btn { flex: none; margin-left: auto; }
/* Au survol, un dégradé pêche → rose (le violet se fondrait dans le
   bandeau) ; texte violet foncé, lisible sur les deux teintes. */
.support-banner .btn:hover { background: linear-gradient(90deg, #FDAD9B, #F153A0) border-box;
                             border-color: transparent; color: var(--violet-950); }

/* --- documentation, mises à jour ------------------------------------ */

.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.doc-list > .card { margin-top: 0; }
.doc-list h2 { margin: 0 0 4px; }
.doc-list h2 a { text-decoration: none; }
.doc-list h2 a:hover { text-decoration: underline; }
.doc-list p { margin: 0; }
/* Recherche en haut de la documentation ; les mots trouvés surlignés */
.doc-search { display: flex; gap: 10px; margin-bottom: 20px; }
.doc-search input { flex: 1; min-width: 0; }
.doc-search-count { margin: 0 0 16px; display: flex; gap: 6px 14px; flex-wrap: wrap; }
.doc-list mark { background: var(--lavender-300); color: inherit; border-radius: 3px; padding: 0 2px; }
.doc-layout { display: grid; gap: 20px; grid-template-columns: 260px 1fr; align-items: start; }
.doc-layout > .card { margin-top: 0; }
.doc-nav { position: sticky; top: 16px; padding: 18px; }
.doc-nav-home { font-weight: 700; text-decoration: none; }
.doc-nav ul { list-style: none; margin: 10px 0 0; padding: 0; }
.doc-nav li a { display: block; padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--gray-900); }
.doc-nav li a:hover { background: var(--lavender-100); }
.doc-nav li a[aria-current="page"] { background: var(--lavender-100); color: var(--violet-900); font-weight: 600; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 24px; }
.prose li { margin-bottom: 4px; }
.prose code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.9em;
              background: var(--gray-100); border: 1px solid var(--gray-300); border-radius: 4px; padding: 1px 5px;
              overflow-wrap: anywhere; }
.changelog-entry h2 { margin-top: 0; }
/* Mêmes colonnes d'un tableau à l'autre : largeurs fixées. */
.pack-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 0 0 1.2em; font-size: 0.9rem; }
/* Avec la colonne du nom anglais (page française), le nom n'en prend que la moitié. */
.pack-table th:nth-child(2):not(:last-child), .pack-table td:nth-child(2):not(:last-child) { width: 48%; }
.pack-table th { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--gray-600);
                 font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.pack-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pack-table th:first-child, .pack-table td:first-child { width: 6em; }
.entry-meta { display: flex; gap: 10px; align-items: center; color: var(--gray-600); font-size: 0.9rem;
              margin-bottom: 6px; }

/* --- éditeur de carrière -------------------------------------------- */

.editor-head { align-items: center; }
.crumbs { margin: 0 0 14px; font-size: 0.9rem; }
.editor-tools { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.stepper { margin-bottom: 20px; }
.stepper ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stepper li > a, .stepper li > span { display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px 5px 5px;
                                      border: 1px solid transparent; border-radius: 999px; font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.stepper .step-number { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
                        font-size: 0.8rem; background: var(--lavender-100); color: var(--violet-900); }
.stepper li.open > a { background: var(--white); color: var(--violet-700); border-color: var(--line); }
.stepper li.open > a:hover { background: var(--lavender-100); }
.stepper li.current > span { background: var(--gradient) border-box; color: var(--white); box-shadow: var(--shadow); }
.stepper li.current .step-number { background: var(--white); color: var(--violet-700); }
.stepper li.later > span { color: var(--gray-600); opacity: 0.7; }

.editor-form > .card, .editor-form > details.card { margin: 0 0 20px; }
/* Retour sur une carte après un bouton (#ancre) : un peu d'air au-dessus. */
.editor-form .card[id] { scroll-margin-top: 20px; }
/* Dans l'éditeur, tout est dans un grand formulaire : les paragraphes et
   les boutons des cartes retrouvent leur espace (« form p » les colle). */
.editor-form .card p { margin: 0 0 14px; }
.editor-form .card p:last-child { margin-bottom: 0; }
.editor-form .card > .btn, .editor-form .card > button { margin: 6px 0 16px; }
.editor-form .card > .btn:last-child, .editor-form .card > button:last-child { margin-bottom: 0; }
.editor-form .card .schedule-title { margin: 0; }
.editor-form .card .promo-subtitle { margin: 12px 0 10px; }
.editor-card { padding: 28px; }
.editor-card h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.icon-row { display: flex; gap: 24px; align-items: flex-start; }
.icon-preview { width: 112px; height: 112px; flex: none; border-radius: 16px; background: var(--gradient-brand);
                display: grid; place-items: center; text-align: center; padding: 8px; }
.icon-preview .small { color: var(--lavender-300); }
/* Une image envoyée s'affiche seule : un fond semblerait faire partie d'elle. */
.icon-preview.has-image { background: none; padding: 0; }
/* Même colonne pour les deux images (l'icône centrée sur la largeur de
   l'illustration) : les textes à droite s'alignent, image importée ou non. */
.image-slot { width: 224px; flex: none; display: flex; justify-content: center; }
.illustration-preview { width: 224px; }
.illustration-preview img { width: 208px; height: 104px; object-fit: cover; border-radius: 8px; }
.icon-row input[type="file"] { display: block; margin-bottom: 4px; font: inherit; }
.icon-row .actions { margin-top: 12px; }
.image-block + .image-block { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--lavender-100); }
.image-title { margin: 0 0 4px; font-size: 1rem; }
.checkbox-line { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.inline-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin: 0; }
/* Réactions d'une activité : un bloc par réaction, dans l'ordre où elles
   s'appliquent. */
.reaction { margin: 0 0 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-small); }
.reaction-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
                 margin-bottom: 12px; }
.reaction-head h3 { margin: 0; font-size: 1.05rem; }
.reaction-tools { display: flex; align-items: center; gap: 8px; }
.reaction h4 { margin: 18px 0 8px; font-size: 0.95rem; }
.reaction-traits { margin: 0; padding: 0; border: 0; }
.reaction-traits legend { margin-bottom: 6px; padding: 0; font-weight: 600; }
.trait-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.trait-slots select { width: auto; max-width: 100%; }

/* Choix qui dépendent de la case au-dessus : décalés, précédés d'un tiret. */
.sub-choices { flex-direction: column; gap: 8px; margin: 10px 0 0 28px; }
.sub-choices .inline-check::before { content: "–"; color: var(--gray-600); }
.sub-choices-advanced { margin: 12px 0 0 28px; }
.object-id-list { margin: 8px 0 0; padding-left: 18px; font-size: 0.9rem; }
/* Champ étroit : seul le champ l'est, son étiquette garde la largeur voulue. */
.narrow-field input, .narrow-field select { max-width: 260px; }
.narrow-select { max-width: 360px; }

.hint { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; padding: 0;
        border: 1px solid var(--lavender-300); background: var(--lavender-100); color: var(--violet-700);
        font: inherit; font-size: 0.75rem; font-weight: 700; cursor: help; position: relative; vertical-align: middle; }
.hint:hover::after, .hint:focus::after {
  content: attr(data-hint); position: absolute; z-index: 20; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  width: max-content; max-width: 300px; padding: 10px 12px; border-radius: var(--radius-small);
  background: var(--gray-900); color: var(--white); font-size: 0.85rem; font-weight: 400; line-height: 1.4;
  text-align: left; box-shadow: var(--shadow-strong); white-space: normal;
  pointer-events: none; }    /* l'infobulle ne capte jamais la souris : le champ dessous reste utilisable */
/* Avec JavaScript, une seule bulle placée pour tenir entière dans la fenêtre
   (« ? » passé à la ligne, contre un bord) ; la bulle en CSS ne sert que sans. */
.js .hint:hover::after, .js .hint:focus::after { content: none; }
.hint-tip { position: fixed; z-index: 1000; max-width: min(300px, calc(100vw - 16px)); padding: 10px 12px;
            border-radius: var(--radius-small); background: var(--gray-900); color: var(--white);
            font-size: 0.85rem; font-weight: 400; line-height: 1.4; text-align: left;
            box-shadow: var(--shadow-strong); pointer-events: none; }

.schedule-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.level-schedule { padding: 14px 0; border-top: 1px solid var(--gray-300); }
.level-schedule:first-of-type { border-top: 0; }
.schedule-title { flex-basis: 100%; margin: 0; }
.day-picker { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.day { margin: 0; font-weight: 600; font-size: 0.85rem; }
.day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.day span { display: inline-grid; place-items: center; min-width: 46px; height: 36px; padding: 0 8px; border-radius: 8px;
            border: 1px solid var(--gray-300); background: var(--white); color: var(--gray-600); cursor: pointer; }
.day input:checked + span { background: var(--violet-700); border-color: var(--violet-700); color: var(--white); }
.day input:focus-visible + span { box-shadow: 0 0 0 3px rgba(93, 32, 145, 0.35); }
.time-pair { display: inline-flex; gap: 12px; align-items: center; }
.time-pair label, .pto-field { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.time-pair input { width: auto; }
.time-select { display: inline-flex; align-items: center; gap: 4px; }
.time-select select { width: auto; padding: 8px 10px; }
.time-label { font-weight: 500; }
.pto-field input { width: 90px; }

.level-card { padding: 0; overflow: visible; }
.level-card summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 18px 24px; }
.level-card summary::-webkit-details-marker { display: none; }
.level-card summary::after { content: "▾"; margin-left: auto; color: var(--violet-700); transition: transform 0.15s; }
.level-card:not([open]) summary::after { transform: rotate(-90deg); }
.level-number { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
                background: var(--gradient-brand); color: var(--white); font-weight: 700; }
.level-summary { display: flex; flex-direction: column; }
.level-summary strong { color: var(--violet-900); }
.level-body { padding: 0 24px 20px; border-top: 1px solid var(--lavender-100); padding-top: 20px; }
.level-numbers { display: grid; grid-template-columns: 240px 1fr; gap: 20px; max-width: 660px; }
.level-performance { display: grid; grid-template-columns: 240px 240px; gap: 20px; }
/* Cartes chances */
.chance-levels { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 0 0 20px; }
.chance-levels label, .effect-needs label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.chance-levels select { width: auto; }
.effect-title { font-weight: 600; }
.chance-choice { border: 1px solid var(--lavender-300); border-radius: var(--radius-small); padding: 18px 20px 12px;
                 margin: 0 0 18px; min-width: 0; }
.chance-choice legend { font-weight: 700; font-size: 0.95rem; color: var(--white); background: var(--gradient);
                       padding: 4px 16px; border-radius: 999px; box-shadow: var(--shadow); }
/* Réussite / Échec / Résultat : des étiquettes qu'on repère d'un coup d'œil. */
.outcome-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px;
               font-size: 0.9rem; font-weight: 700; }
.outcome-tag::before { font-weight: 800; }
.outcome-success { background: var(--success-bg); color: var(--success); border: 1px solid #BFE3CD; }
.outcome-success::before { content: "✓"; }
.outcome-failure { background: var(--error-bg); color: var(--error); border: 1px solid #F3C4CF; }
.outcome-failure::before { content: "✗"; }
.outcome-result { background: var(--lavender-100); color: var(--violet-800); border: 1px solid var(--lavender-300); }
.can-fail { margin: 0 0 14px; }
.chance-outcome-title { margin: 18px 0 10px; font-size: 1rem; color: var(--violet-800); }
.chance-effects { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 20px; margin: 0 0 14px; }
.effect-field { display: flex; flex-direction: column; gap: 6px; margin: 0; font-weight: 500; }
.effect-field.inline { flex-direction: row; align-items: center; }
.effect-field input { width: 100%; }
.effect-field.inline input { width: 80px; }
.effect-label { font-weight: 600; }      /* le « ? » suit le texte, même sur deux lignes */
.effect-skill, .effect-wide { grid-column: span 2; }
.effect-wide input { max-width: 234px; }
.effect-skill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.effect-skill-row select { width: auto; min-width: 0; }
/* Hors d'une grille d'effets (retour d'une activité) : le champ suivant
   garde l'écart habituel entre deux champs. */
.return-skill { margin-bottom: 24px; }
.effect-needs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 14px; }
/* « -100 » reste lisible à côté des flèches d'un champ numérique. */
.effect-needs input { width: 84px; }
.effect-moodlet { margin: 0 0 14px; }
.effect-moodlet > .effect-field { max-width: 360px; margin-bottom: 10px; }
.custom-moodlet { border-left: 3px solid var(--lavender-300); padding-left: 16px; margin: 8px 0 0; }
.effect-rare { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0 0 6px; }
/* Un même filet avant la réussite (ou le résultat) et avant l'échec. */
.chance-failure, .chance-first-outcome { border-top: 1px solid var(--lavender-100); margin-top: 16px; }
.chance-first-outcome { padding-top: 18px; }
/* « Plus de chances de réussir si… » : un encadré à part, qu'on retrouve d'un coup d'œil. */
.chance-bonuses { margin: 22px 0 8px; padding: 4px 18px 16px; background: var(--lavender-100);
                  border: 1px solid var(--lavender-300); border-left: 4px solid var(--violet-600);
                  border-radius: var(--radius-small); }
.chance-bonuses .chance-outcome-title { margin-top: 14px; }
.chance-bonus select { width: auto; min-width: 0; }
.chance-remove { margin: 10px 0 0; }
.chance-add-choice { margin: 4px 0 0; }
.card-actions { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--lavender-100); }
.schedule-summary { margin: 0 0 16px; }
.btn-small { padding: 6px 12px; font-size: 0.875rem; }
.track-title { margin: 28px 0 12px; font-size: 1.05rem; color: var(--violet-800); }
.editor-card .track-title:first-of-type { margin-top: 8px; }
.career-tree { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tree-track { display: flex; align-items: center; gap: 10px; }
.tree-track ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.tree-track li { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
                 background: var(--gradient-brand); color: var(--white); font-weight: 700; font-size: 0.85rem; }
.tree-branch li { background: var(--gradient); }
.tree-label { font-weight: 700; color: var(--violet-900); font-size: 0.9rem; min-width: 70px; }
.tree-fork { display: flex; flex-direction: column; gap: 10px; padding-left: 18px; border-left: 3px solid var(--lavender-300); }
.card.branch-card { margin-top: 28px; border-top: 4px solid var(--violet-600); }
.branch-add { margin-bottom: 8px; }
.creator-line { margin: 0 0 10px; }
.creator-line + .key-details { margin-bottom: 20px; }
.key-details summary { cursor: pointer; color: var(--violet-700); font-weight: 600; font-size: 0.9rem; }
.key-details[open] summary { margin-bottom: 14px; }
.key-details .form-field { margin-bottom: 8px; }
.level-add { margin-bottom: 24px; }
.card.danger-zone { margin-top: 28px; border: 1px solid var(--error-bg); }
.danger-zone h2 { color: var(--error); }
.promo-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; font-size: 1rem; }
/* Le passage d'un niveau au suivant : le niveau de départ en pastille
   claire, le niveau d'arrivée en pastille pleine, la flèche entre les deux. */
.promo-level { display: inline-flex; align-items: center; gap: 10px; padding: 4px 16px 4px 4px;
               border-radius: 999px; background: var(--lavender-100); border: 1px solid var(--lavender-300);
               color: var(--violet-900); font-weight: 700; }
.promo-level .level-number { width: 30px; height: 30px; font-size: 0.85rem; }
.promo-next { background: var(--gradient) border-box; border-color: transparent; color: var(--white); box-shadow: var(--shadow); }
.promo-next .level-number { background: var(--white); color: var(--violet-700); }
.promo-arrow { color: var(--violet-600); font-size: 1.3em; line-height: 1; }
.promo-or { color: var(--gray-600); font-weight: 500; font-size: 0.9rem; }
.promo-targets { display: inline-flex; align-items: center; gap: 8px; }
.promo-split { flex-direction: column; align-items: flex-start; gap: 4px; }
.promo-split .promo-or { padding-left: 16px; }
.promo-subtitle { font-weight: 600; margin: 8px 0 10px; }
.requirement-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.requirement-row select { width: auto; min-width: 260px; }
/* Branches côte à côte : une colonne par branche, une ligne par niveau. */
.branch-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.branch-columns > * { min-width: 0; }
.branch-columns > .card { margin-top: 0; }
.branch-columns > .track-title { margin: 28px 0 -8px; }
.branch-columns .requirement-row select { min-width: 0; flex: 1 1 180px; }
.branch-columns .promo-title { font-size: 0.95rem; }
.inline-number { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.inline-number input { width: 100px; }
.bonus-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px;
             border-top: 1px solid var(--lavender-100); }
.token-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.token-intro { font-size: 0.8rem; color: var(--gray-600); }
.token-chip { font: inherit; font-size: 0.8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; cursor: pointer;
              border: 1px dashed var(--violet-600); background: var(--lavender-100); color: var(--violet-800); }
.token-chip:hover { background: var(--lavender-300); }
.token-help { font-size: 0.8rem; margin-left: 4px; }
.gender-panel { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 10px; padding: 12px 14px;
                border-radius: var(--radius-small); background: var(--lavender-100); border: 1px solid var(--lavender-300); }
.gender-panel label { font-size: 0.85rem; font-weight: 600; margin: 0; }
.gender-panel input { display: block; margin-top: 4px; width: 200px; }
.field-with-action { display: flex; align-items: center; gap: 14px; }
.languages-head { margin-bottom: 20px; }
.language-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 20px; }
.language-tab { display: flex; flex-direction: column; padding: 10px 16px; border-radius: var(--radius-small);
                border: 1px solid var(--lavender-300); background: var(--white); text-decoration: none; color: var(--gray-900); }
.language-tab:hover { background: var(--lavender-100); }
.language-tab.current { background: var(--gradient) border-box; border-color: transparent; color: var(--white); }
.language-tab.current .small { color: #EFE4FC; }
.language-add { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.language-add label { margin: 0; }
.language-add select { width: auto; min-width: 220px; }
.language-current { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
                    margin-bottom: 14px; }
.language-current h2 { margin: 0; }
.editor-form .card .translation-row .original { margin: 6px 0 0; padding: 8px 12px; border-left: 3px solid var(--lavender-300);
                             background: var(--gray-100); color: var(--gray-600); font-size: 0.9rem; border-radius: 4px; }
.editor-entry { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.editor-entry h2, .editor-entry p { margin: 0 0 4px; }

.editor-bar { position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
              gap: 16px; flex-wrap: wrap; margin-top: 8px; padding: 14px 20px; background: var(--white);
              border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-strong); }
.save-status { margin: 0; color: var(--gray-600); font-size: 0.9rem; }
.save-ok { color: var(--success); font-weight: 600; }
.save-warning { color: #7A4B00; font-weight: 600; }
.save-status.save-error { color: var(--error); font-weight: 600; }

/* --- éditeur : diplôme, glisser-déposer, tâches ---------------------- */

/* Diplôme : la section est grisée pour une carrière réservée aux ados. */
.degree-subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 20px; margin: 4px 0 20px; }
.degree-option { display: flex; margin-bottom: 16px; }
.degree-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.degree-fields[disabled] { opacity: 0.45; }

.drag-handle { cursor: grab; color: var(--violet-600); font-size: 1.15rem; line-height: 1; padding: 4px 2px;
               user-select: none; flex: none; }
.drag-handle:active { cursor: grabbing; }
.level-list > .dragging { opacity: 0.45; outline: 2px dashed var(--violet-600); }
.level-list > .level-card + .level-card { margin-top: 20px; }

/* Sur un fond lavande, le « ? » a un rond blanc pour ressortir. */
.chance-bonuses .hint, .notice .hint { background: var(--white); }

/* Tâches de promotion : la nature d'abord, puis ses champs. */
.task-row > select:first-of-type { min-width: 220px; }
.task-fields { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.task-fields select { width: auto; min-width: 220px; max-width: 100%; }
.branch-columns .task-fields select, .branch-columns .task-row > select:first-of-type { min-width: 0; flex: 1 1 180px; }

/* Avertissement au-dessus des noms qui font les identifiants du mod. */
.field-warning { display: flex; align-items: flex-start; gap: 7px; margin: 0 0 8px; color: var(--error);
                 font-size: 0.875rem; font-weight: 500; line-height: 1.4; }
.field-warning svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }

.editor-tools .quick-export, .actions .quick-export { display: inline; margin: 0; }

/* --- onglet Aperçu -------------------------------------------------- */

.download-card .download-date { margin: 14px 0 0; }
.download-card .field-warning { font-size: 1rem; margin: 0 0 16px; }
.download-card.is-ready h2 { color: var(--success); }
.download-card.is-trial h2, .download-card.is-trial .field-warning { color: var(--orange-text); }
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.download-option { display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
                   padding: 16px 18px; border: 1px solid var(--lavender-300); border-radius: var(--radius-small); }
.download-option ul { margin: 0 0 8px; padding-left: 18px; }
.download-option > :nth-last-child(2) { margin-bottom: 14px; }
.download-option .btn { margin-top: auto; }
.download-card .download-option.is-mod { border: 2px solid var(--success); }
.download-card .download-option.is-trial { border: 2px solid var(--orange); }
.download-card .download-option.is-trial p, .download-card .download-option.is-trial li { color: var(--gray-600); }

.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li { padding: 8px 12px; border-radius: var(--radius-small); }
.check-list li + li { margin-top: 6px; }
.check-list.is-error li { background: var(--error-bg); }
.check-list.is-error a { color: var(--error); }
.check-list.is-warning li { background: var(--lavender-100); }

#summary .facts + .track-title { margin-top: 36px; }
.export-levels { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.export-levels th { text-align: left; color: var(--gray-600); font-weight: 600; padding: 6px 8px;
                    border-bottom: 1px solid var(--lavender-300); }
.export-levels td { padding: 8px; border-bottom: 1px solid var(--lavender-100); vertical-align: top; }
.export-levels td:first-child { width: 3em; color: var(--violet-700); font-weight: 700; }
.export-levels td div + div { margin-top: 4px; }
.job-days { display: inline-flex; gap: 3px; }
.job-days b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
              font-size: 0.75rem; background: var(--violet-700); color: var(--white); }
.job-days b.off { background: var(--gray-100); color: var(--gray-600); font-weight: 400; }

.copy-button { margin-top: 8px; }
.export-nav { margin-top: 24px; }

/* --- fenêtres du jeu reproduites (aperçus) -------------------------- */
/* Couleurs relevées sur l'interface du jeu, propres à ces aperçus. */

.ts4-scene { padding: 34px 20px 20px; border-radius: var(--radius-small); margin-bottom: 12px;
             background: radial-gradient(ellipse at 30% 20%, #4A5570, #1D2333 70%); }
.ts4-dialog { position: relative; max-width: 780px; margin: 0 auto; border-radius: 10px; overflow: visible;
              background: #F1F3F6; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); color: #2B4787; }
.ts4-portrait { position: absolute; left: -18px; top: -26px; width: 66px; height: 66px; border-radius: 50%;
                border: 3px solid #FFFFFF; background: #B9C7DD; display: grid; place-items: end center; overflow: hidden; }
.ts4-portrait svg { width: 52px; height: 52px; fill: #7F93B5; }
.ts4-close { position: absolute; right: 10px; top: 6px; width: 22px; height: 22px; border-radius: 50%;
             border: 1.5px solid #2B4787; display: grid; place-items: center; font-size: 15px; line-height: 1; }
.ts4-title { margin: 0; padding: 12px 60px 4px; text-align: center; font-size: 1.35rem; font-variant: small-caps;
             letter-spacing: 0.02em; color: #25408A; }
.ts4-filters { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; }
.ts4-filters i { width: 22px; height: 22px; border-radius: 50%; background: #B7BFCB; }
.ts4-filters i.on { background: #58B947; box-shadow: 0 0 0 2px #FFFFFF inset; }
.ts4-body { display: grid; grid-template-columns: minmax(170px, 38%) 1fr; gap: 12px; padding: 0 12px 12px; }
.ts4-list { list-style: none; margin: 0; padding: 6px; background: #DCE2EA; border-radius: 4px; }
.ts4-row { display: flex; align-items: center; gap: 10px; background: #FAFBFD; border: 1px solid #D3DAE4;
           padding: 5px 8px; font-size: 0.82rem; font-weight: 600; min-height: 56px; }
.ts4-row + .ts4-row { margin-top: 4px; }
.ts4-row.is-selected { background: #EAF6E6; border: 2px solid #5DAA4A; }
.ts4-row.is-other { opacity: 0.55; }
.ts4-icon { width: 44px; height: 44px; flex: none; border-radius: 4px; background: #C8D1DD; overflow: hidden; }
.ts4-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ts4-row.is-selected .ts4-icon { background: transparent; }
.ts4-line { height: 8px; width: 60%; border-radius: 4px; background: #C3CCD8; }
.ts4-line.short { width: 42%; }
.ts4-detail { display: flex; flex-direction: column; min-width: 0; }
.ts4-illustration { aspect-ratio: 2 / 1; background: #C8D1DD; display: grid; place-items: center; overflow: hidden;
                    font-size: 0.8rem; color: #5B6B86; }
.ts4-illustration img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ts4-name { margin: 8px 0 2px; font-variant: small-caps; font-size: 1.05rem; font-weight: 600; color: #25408A; }
.ts4-text { margin: 0 0 12px; font-size: 0.8rem; line-height: 1.35; color: #3561AE; }
.ts4-hiring { margin: auto 0 6px; padding: 5px; text-align: center; background: #E0F4DB; color: #3B8A2E;
              font-variant: small-caps; font-weight: 600; font-size: 0.95rem; }
.ts4-facts { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 5px; }
.ts4-facts > span { background: #DCE6F3; padding: 5px 4px; text-align: center; font-size: 0.8rem; font-weight: 600;
                    white-space: nowrap; }
.ts4-days b { font-weight: 700; color: #2B4787; }
.ts4-days b.off { color: #D0392F; }
.ts4-footer { display: flex; justify-content: flex-end; padding: 8px 12px; background: #DDE2E9;
              border-radius: 0 0 10px 10px; }
.ts4-ok { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
          background: radial-gradient(circle at 35% 30%, #5B9BF0, #1F5FC4); box-shadow: 0 0 0 2px #FFFFFF; }
.ts4-ok svg { width: 22px; height: 22px; fill: none; stroke: #FFFFFF; stroke-width: 3; stroke-linecap: round;
              stroke-linejoin: round; }

.ts4-card { max-width: 560px; margin: 0 auto; border-radius: 8px; overflow: hidden; background: #FFFFFF;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.ts4-card-body { padding: 22px 28px 20px; }
.ts4-card-title { margin: 0 0 12px; font-variant: small-caps; font-size: 1.7rem; font-weight: 600; line-height: 1.15;
                  color: #1D4AA0; }
.ts4-card-text { margin: 0; font-size: 1.02rem; line-height: 1.4; color: #2E6CC2; }
.ts4-card-choices { display: flex; flex-direction: column; gap: 10px; padding: 16px 22px 18px;
                    background: linear-gradient(#CDD1D7, #BCC1C8); }
.ts4-card-button { display: block; padding: 11px 16px; border-radius: 999px; text-align: center; font-weight: 600;
                   color: #1D4AA0; background: linear-gradient(#FFFFFF, #E6E9EE); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25); }

/* Aperçus d'une activité, d'après l'interface du jeu : une scène à la fois
   pour l'entrée (téléphone ou menu d'interactions), puis la notification et
   le moodlet du retour, chacun dans sa scène. */
.ts4-toggle { display: flex; justify-content: center; width: max-content; max-width: 100%; margin: 0 auto 14px;
              padding: 4px; border-radius: 999px; background: var(--lavender-200); }
.ts4-toggle label { margin: 0; }
.ts4-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.ts4-toggle span { display: block; padding: 7px 18px; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
                   color: var(--violet-950); cursor: pointer; }
.ts4-toggle input:checked + span { color: var(--white); background: var(--gradient) border-box; }
.ts4-toggle input:focus-visible + span { box-shadow: var(--focus); }
.ts4-stage { display: flex; justify-content: center; padding: 30px 20px; }
.ts4-return-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px;
                   margin-bottom: 12px; }
.ts4-return-grid .ts4-scene { margin: 0; }
.ts4-place { display: flex; flex-direction: column; align-items: center; gap: 16px; min-width: 0; }
.ts4-place figcaption { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
                        color: #C9D3E6; }

/* Bulle d'aide du jeu : blanche, texte bleu gras, pointe vers l'entrée. */
.ts4-bubble { position: absolute; z-index: 1; left: calc(100% + 14px); top: 50%; transform: translateY(-50%);
              width: max-content; max-width: 250px; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem;
              font-weight: 700; line-height: 1.35; text-align: left; white-space: normal; color: #1F4FA6;
              background: #FFFFFF; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.ts4-bubble::before { content: ""; position: absolute; left: -8px; top: 50%; margin-top: -8px;
                      border: 8px solid transparent; border-right-color: #FFFFFF; border-left: 0; }

/* Téléphone : carrousel des rubriques, liste sur fond pastel, retour. */
.ts4-phone { width: 290px; max-width: 100%; padding: 12px 12px 10px; border-radius: 16px;
             background: linear-gradient(#4A505C, #2E333D); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), inset 0 0 0 2px #5E6574; }
.ts4-phone-tabs { display: flex; justify-content: center; align-items: center; gap: 8px; margin-bottom: 10px; }
.ts4-phone-tab { position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 14px; }
.ts4-phone-tab svg { width: 32px; height: 32px; fill: rgba(255, 255, 255, 0.5); }
.ts4-phone-tab .hole { fill: #2E333D; }
.ts4-phone-tab.is-prev { background: linear-gradient(#447F49, #2B5630); }
.ts4-phone-tab.is-next { background: linear-gradient(#8E3E58, #5F293B); }
.ts4-phone-tab.is-prev svg { margin-left: 18px; }
.ts4-phone-tab.is-next svg { margin-right: 18px; }
.ts4-phone-tab.is-prev::after, .ts4-phone-tab.is-next::after { content: ""; position: absolute; top: 50%; margin-top: -9px;
                                                               border: 9px solid transparent; }
.ts4-phone-tab.is-prev::after { left: 6px; border-right: 12px solid #FFFFFF; border-left: 0; }
.ts4-phone-tab.is-next::after { right: 6px; border-left: 12px solid #FFFFFF; border-right: 0; }
.ts4-phone-tab.is-current { width: 74px; height: 74px; background: linear-gradient(#FCE9A4, #EFB23B);
                            box-shadow: 0 0 0 3px #6FD34B, 0 0 14px rgba(111, 211, 75, 0.7); }
.ts4-phone-tab.is-current svg { width: 42px; height: 42px; fill: #B8670F; }
.ts4-phone-tab.is-current .hole { fill: #F6CC6A; }
.ts4-phone-list { position: relative; padding: 8px 14px 8px 8px; border-radius: 6px;
                  background: linear-gradient(170deg, #CFEFE2 0%, #E6DAEE 45%, #EBCDE0 62%, #BCD8F1 100%); }
.ts4-phone-item { position: relative; display: flex; align-items: center; min-height: 62px; padding: 12px 10px;
                  border-bottom: 1px solid rgba(255, 255, 255, 0.8); font-weight: 600; line-height: 1.3; color: #1F4FA6; }
.ts4-phone-item:nth-last-child(2) { border-bottom: 0; }
.ts4-phone-item.is-hover { border-bottom: 0; border-radius: 6px; background: #FFFFFF; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); }
.ts4-phone-item .ts4-line { background: rgba(31, 79, 166, 0.22); }
.ts4-phone-scroll { position: absolute; right: 4px; top: 8px; bottom: 8px; width: 4px; border-radius: 2px;
                    background: rgba(255, 255, 255, 0.6); }
.ts4-phone-scroll::after { content: ""; position: absolute; left: -1px; top: 0; width: 6px; height: 24%; border-radius: 3px;
                           background: #FFFFFF; }
.ts4-phone-back { display: grid; place-items: center; padding-top: 8px; }
.ts4-phone-back svg { width: 30px; height: 30px; fill: none; stroke: #FFFFFF; stroke-width: 2.4; stroke-linecap: round;
                      stroke-linejoin: round; }

/* Menu d'interactions : bulles blanches en arc autour du Sim ou de l'objet,
   l'entrée de l'activité survolée (texte vert), la rubrique avec sa flèche. */
.ts4-pie { display: grid; grid-template-columns: auto auto; column-gap: 120px; row-gap: 16px; align-items: center; }
.ts4-pie > :nth-child(odd) { justify-self: end; }
.ts4-pie > :nth-child(even) { justify-self: start; }
.ts4-pie > .r2:nth-child(odd) { margin-right: 40px; }
.ts4-pie > .r2:nth-child(even) { margin-left: 40px; }
.ts4-pill { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 22px;
            border: 1px solid #C5CEDA; border-radius: 999px; font-weight: 600; white-space: nowrap; color: #1E3E91;
            background: linear-gradient(#FFFFFF 0%, #F3F5F8 55%, #DCE2EA 100%); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35); }
.ts4-pill.is-hover { color: #1C9A35; }
.ts4-pill img { width: 26px; height: 26px; }
.ts4-pill.is-other { min-width: 150px; }
.ts4-pill.is-other .ts4-line { width: 100%; background: rgba(30, 62, 145, 0.2); }
.ts4-pill.is-category { padding-left: 44px; }
.ts4-pill.is-category::before { content: ""; position: absolute; left: 3px; top: 50%; width: 34px; height: 34px; margin-top: -17px;
                                border-radius: 50%; background: linear-gradient(#A4ADBA, #6E7989); }
.ts4-pill.is-category::after { content: ""; position: absolute; left: 13px; top: 50%; margin-top: -7px;
                               border: 7px solid transparent; border-right: 10px solid #FFFFFF; border-left: 0; }

/* Notification du jeu : bleue ; en haut l'icône et le titre (petites
   capitales), puis le texte, et en bas le Sim cité avec son visage ;
   fermer (rouge) en haut, déplier (vert) en bas. */
.ts4-notif { position: relative; width: min(440px, 100%); overflow: hidden; border-radius: 8px;
             background: linear-gradient(#3A86DA, #2B6EC6); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45),
             inset 0 1px 0 rgba(255, 255, 255, 0.25); color: #FFFFFF; }
.ts4-notif-head { display: flex; align-items: center; gap: 16px; padding: 12px 46px 8px 12px; }
.ts4-notif-tile { flex: none; width: 66px; height: 66px; display: grid; place-items: center; overflow: hidden;
                  border: 1px solid #9EC4EE; border-radius: 4px; background: linear-gradient(#DCEAF8, #B9D3F0); }
.ts4-notif-tile img { width: 56px; height: 56px; }
.ts4-notif-title { margin: 0; font-size: 1.3rem; font-variant: small-caps; letter-spacing: 0.02em; line-height: 1.2; }
.ts4-notif-text { margin: 0; padding: 0 16px 12px; font-weight: 600; line-height: 1.35; }
.ts4-notif-sim { display: flex; align-items: center; gap: 16px; padding: 8px 46px 8px 12px; font-weight: 600;
                 background: rgba(255, 255, 255, 0.16); border-top: 1px solid rgba(255, 255, 255, 0.2); }
.ts4-notif-portrait { place-items: end center; }
.ts4-notif-portrait svg { width: 54px; height: 54px; fill: #8EA3C2; }
.ts4-notif-close { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; display: grid; place-items: center;
                   border-radius: 50%; background: radial-gradient(circle at 40% 35%, #FF7A7A, #D8262F); box-shadow: 0 0 0 2px #FFFFFF; }
.ts4-notif-close svg { width: 16px; height: 16px; fill: none; stroke: #FFFFFF; stroke-width: 3; stroke-linecap: round; }
.ts4-notif-more { position: absolute; right: 12px; bottom: 8px; width: 24px; height: 24px; }
.ts4-notif-more svg { width: 24px; height: 24px; fill: #8EDB5A; }
.ts4-notif-more .chevron { fill: none; stroke: #8EDB5A; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* Moodlet : l'infobulle (bandeau de la couleur de l'émotion, nom, raison,
   texte, durée), puis le panneau des émotions où est l'icône. */
.ts4-moodlet { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; width: min(330px, 100%); }
.ts4-moodlet-card { position: relative; width: 100%; border-radius: 8px; background: #FFFFFF;
                    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); }
.ts4-moodlet-card::after { content: ""; position: absolute; left: 44px; bottom: -10px; border: 10px solid transparent;
                           border-top-color: #FFFFFF; border-bottom: 0; }
.ts4-moodlet-head { margin: 0; padding: 5px 12px; border-radius: 8px 8px 0 0; font-weight: 700; color: var(--mood-on, #FFFFFF);
                    background: var(--mood); }
.ts4-moodlet-body { padding: 10px 14px 12px; }
.ts4-moodlet-name { margin: 0 0 2px; font-size: 1.05rem; font-weight: 700; color: #183C8E; }
.ts4-moodlet-reason { margin: 0 0 6px; font-weight: 700; color: #2E75D3; }
.ts4-moodlet-text { margin: 0 0 8px; line-height: 1.35; color: #1E3F8F; }
.ts4-moodlet-time { margin: 0; font-weight: 700; color: #183C8E; }
.ts4-moodlet-panel { display: flex; align-items: stretch; gap: 6px; height: 76px; padding: 6px 8px 6px 0; border-radius: 6px;
                     background: rgba(255, 255, 255, 0.12); }
.ts4-moodlet-emotion { width: 24px; display: flex; align-items: center; justify-content: center; overflow: hidden;
                       border-radius: 6px 0 0 6px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.03em;
                       text-transform: uppercase; color: var(--mood-on, #FFFFFF); background: var(--mood);
                       writing-mode: vertical-rl; transform: rotate(180deg); }
.ts4-moodlet-icon { width: 52px; height: 52px; align-self: center; display: grid; place-items: center; border-radius: 8px; border: 2px solid rgba(255, 255, 255, 0.8);
                    background: linear-gradient(#7FCF8C, #3E9A55); }
.ts4-moodlet-icon svg { width: 28px; height: 28px; fill: #FFFFFF; }
.ts4-moodlet-icon.is-ours { background: linear-gradient(color-mix(in srgb, var(--mood) 70%, #FFFFFF), var(--mood)); }
.ts4-moodlet-sep { width: 6px; margin: 4px 0; border-radius: 3px; background: #9AA2AE; }
/* Couleurs des émotions (bandeau et icône du moodlet) ; texte foncé sur
   la couleur claire. */
.mood-happy { --mood: #EDB92E; --mood-on: #4A3500; }
.mood-confident { --mood: #3C86D9; }
.mood-energized { --mood: #EF8A24; }
.mood-flirty { --mood: #E9609F; }
.mood-focused { --mood: #8A57C4; }
.mood-inspired { --mood: #1EA7B5; }
.mood-playful { --mood: #6DB83A; }
.mood-angry { --mood: #D7312E; }
.mood-sad { --mood: #3A5BA8; }
.mood-embarrassed { --mood: #DE5A7A; }
.mood-stressed { --mood: #DE6629; }
.mood-bored { --mood: #8E97A3; }
.mood-uncomfortable { --mood: #94803F; }
.mood-dazed { --mood: #9A84C4; }

/* --- customizers rapides --------------------------------------------- */

.notch-setting + .notch-setting { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.notch-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.notch-head label { margin: 0; font-weight: 700; }
.notch-setting .small { margin: 2px 0 8px; }
.notch-value { font-weight: 700; color: var(--violet-700); white-space: nowrap; }
.notch-setting input[type="range"] { width: 100%; margin: 0; accent-color: var(--violet-700); }
.notch-scale { display: flex; justify-content: space-between; gap: 8px; font-size: 0.75rem; color: var(--gray-600); }
.notch-example { margin: 10px 0 0; padding: 8px 12px; border-radius: var(--radius-small); background: var(--lavender-100); }
.customizer-notes { margin: 0 0 12px; padding-left: 18px; }
.customizer-file { margin: 0 0 18px; }
.school-help { margin-bottom: 18px; }

/* --- fenêtre de confirmation ---------------------------------------- */

.confirm-dialog { width: min(540px, calc(100vw - 32px)); padding: 24px 26px 22px; border: 0;
                  border-radius: var(--radius); box-shadow: var(--shadow-strong); color: var(--gray-900); }
.confirm-dialog::backdrop { background: rgba(38, 6, 63, 0.55); }
.confirm-dialog h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 1.3rem;
                     color: var(--error); }
.confirm-dialog h2 svg { width: 26px; height: 26px; flex: none; }
.confirm-text { margin: 0 0 22px; line-height: 1.55; }
.confirm-text strong { display: block; margin-bottom: 10px; }
.confirm-text p { margin: 0 0 8px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }

/* --- petits écrans -------------------------------------------------- */

/* Fenêtre trop étroite pour tout l'en-tête sur une ligne : le menu passe
   dessous, aligné à gauche, et défile si besoin. */
@media (max-width: 1140px) {
  .site-nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; }
}

@media (max-width: 760px) {
  .container { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 1.5rem; }
  .header-inner { gap: 10px 16px; }
  .header-actions { gap: 12px; }
  .site-nav { gap: 20px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters > :first-child { grid-column: 1 / -1; }
  .card { padding: 18px; }
  .hero { grid-template-columns: 1fr; }
  .hero-text { padding: 28px 22px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-visual { display: none; }
  .hero-facts { flex-wrap: wrap; }
  .hero::before { clip-path: none; }
  .steps, .home-bottom, .doc-layout, .branch-columns { grid-template-columns: 1fr; }
  /* Le tableau garde sa largeur et défile dans sa carte. */
  .type-table { min-width: 680px; }
  .script-banner, .support-banner { flex-wrap: wrap; padding: 22px; }
  .script-banner > .btn, .support-banner .btn { margin-left: 0; }
  .branch-columns > * { order: var(--order, 0); }
  .level-numbers, .level-performance { grid-template-columns: 1fr; }
  .effect-skill, .effect-wide { grid-column: auto; }
  .icon-row { flex-direction: column; }
  .editor-bar { position: static; }
  .doc-nav { position: static; }
  .footer-inner { flex-direction: column; }
  .export-levels { display: block; overflow-x: auto; }
  .ts4-body { grid-template-columns: 1fr; }
  .ts4-list { display: none; }
  .ts4-title { font-size: 1.1rem; }
  /* Aperçus étroits : la bulle d'aide passe sous l'entrée, le menu
     d'interactions ne garde que l'entrée de l'activité (et sa rubrique). */
  .ts4-bubble { position: static; transform: none; max-width: none; margin-top: 10px; }
  .ts4-bubble::before { display: none; }
  .ts4-phone-item.is-hover, .ts4-pill.is-hover { flex-wrap: wrap; white-space: normal; }
  .ts4-stage > div { width: 100%; }
  .ts4-pie { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .ts4-pie > .ts4-pill { justify-self: center; max-width: 100%; margin: 0; border-radius: 22px; }
  .ts4-pie > .is-other { display: none; }
  .ts4-pill .ts4-bubble, .ts4-phone-item .ts4-bubble { flex-basis: 100%; }
}

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