/* Jetons repris de l'interface d'Excalidraw 0.18 (variables --color-* de @excalidraw/excalidraw/index.css), pour que l'explorateur et la barre de titre aient le même rendu que l'éditeur, en clair comme en sombre. */ :root { --ex-island: #ffffff; /* --island-bg-color */ --ex-canvas: #ffffff; /* --default-bg-color */ --ex-surface-lowest: #ffffff; --ex-surface-low: #ececf4; --ex-surface-mid: #f2f2f7; --ex-surface-high: #f1f0ff; --ex-on-surface: #1b1b1f; --ex-primary: #6965db; --ex-brand-hover: #5753d0; --ex-brand-active: #4440bf; --ex-primary-container: #e0dfff; /* --color-surface-primary-container */ --ex-on-primary-container: #030064; --ex-outline: #767680; --ex-outline-variant: #c5c5d0; --ex-gray-20: #ebebeb; --ex-muted: #7a7a7a; /* --color-gray-60 */ --ex-danger: #c92a2a; /* --button-destructive-color */ --ex-danger-bg: #ffe3e3; --ex-scrollbar: #ced4da; --ex-shadow-island: 0 0 0.93px 0 rgb(0 0 0 / 0.17), 0 0 3.13px 0 rgb(0 0 0 / 0.08), 0 7px 14px 0 rgb(0 0 0 / 0.05); --ex-shadow-modal: 0 100px 80px rgb(0 0 0 / 0.07), 0 41.8px 33.4px rgb(0 0 0 / 0.05), 0 22.3px 17.9px rgb(0 0 0 / 0.042), 0 12.5px 10px rgb(0 0 0 / 0.035), 0 6.65px 5.3px rgb(0 0 0 / 0.028), 0 2.77px 2.2px rgb(0 0 0 / 0.02); --ex-radius-md: 0.375rem; --ex-radius-lg: 0.5rem; --ex-btn: 2rem; /* --default-button-size */ --ex-btn-lg: 2.25rem; /* --lg-button-size */ --ex-font: Assistant, system-ui, BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; /* Alias utilisés par le reste de la feuille. */ --bg: var(--ex-canvas); --panel: var(--ex-island); --fg: var(--ex-on-surface); --muted: var(--ex-muted); --border: var(--ex-gray-20); --accent: var(--ex-primary); --accent-soft: var(--ex-primary-container); --danger: var(--ex-danger); --ok: #2b8a3e; --warn: #e67700; --topbar-h: 48px; --drawer-w: 330px; color-scheme: light; } :root[data-theme="dark"] { --ex-island: #232329; --ex-canvas: #121212; --ex-surface-lowest: hsl(0 0% 7%); --ex-surface-low: hsl(240 8% 15%); --ex-surface-mid: hsl(240 6% 10%); --ex-surface-high: hsl(245 10% 21%); --ex-on-surface: #e3e3e8; --ex-primary: #a8a5ff; --ex-brand-hover: #bbb8ff; --ex-brand-active: #d0ccff; --ex-primary-container: #403e6a; --ex-on-primary-container: #e0dfff; --ex-outline: #8e8d9c; --ex-outline-variant: #46464f; --ex-gray-20: hsl(245 10% 21%); --ex-muted: #999999; --ex-danger: #ffa8a8; --ex-danger-bg: #5a0000; --ex-scrollbar: #343a40; --ok: #69db7c; --warn: #ffa94d; color-scheme: dark; } * { box-sizing: border-box; } html, body, #root { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--fg); font: 14px/1.4 var(--ex-font); } /* Bouton standard : celui de « Bibliothèque » dans Excalidraw (.sidebar-trigger). */ button, .actions a { -webkit-tap-highlight-color: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; height: var(--ex-btn-lg); padding: 0 0.625rem; font: 0.75rem/1 var(--ex-font); letter-spacing: 0.4px; color: var(--ex-on-surface); background: var(--ex-surface-low); border: none; border-radius: var(--ex-radius-lg); box-shadow: 0 0 0 1px var(--ex-surface-lowest); cursor: pointer; text-decoration: none; white-space: nowrap; } button svg, .actions a svg { flex: none; } button:hover:not(:disabled), .actions a:hover { background: var(--ex-surface-high); } button:active:not(:disabled), .actions a:active { box-shadow: 0 0 0 1px var(--ex-brand-active); } button:focus-visible, .actions a:focus-visible { outline: 2px solid var(--ex-primary); outline-offset: 1px; } button.active { background: var(--ex-primary-container); color: var(--ex-on-primary-container); } button:disabled { opacity: 0.5; cursor: default; } button.square { width: var(--ex-btn-lg); padding: 0; } button.primary { background: var(--ex-primary); color: var(--ex-surface-lowest); font-weight: 600; } button.primary:hover:not(:disabled) { background: var(--ex-brand-hover); } button.danger, .actions .danger { color: var(--ex-danger); } button.danger:hover:not(:disabled) { background: var(--ex-danger-bg); } /* Bouton icône : ceux des îlots d'Excalidraw (outils, zoom, annuler). */ .icon-btn { width: var(--ex-btn); height: var(--ex-btn); padding: 0; flex: none; background: transparent; box-shadow: none; font-size: 16px; } .icon-btn:hover:not(:disabled) { background: var(--ex-surface-high); } .icon-btn.on { background: var(--ex-primary-container); color: var(--ex-on-primary-container); } /* Champ texte : ExcTextField. */ .text-input, .search { height: var(--ex-btn-lg); padding: 0 0.75rem; border: 1px solid var(--ex-gray-20); border-radius: var(--ex-radius-lg); background: var(--ex-surface-low); color: var(--ex-on-surface); font: 0.875rem var(--ex-font); } .text-input:hover, .search:hover { border-color: var(--ex-brand-hover); } .text-input:focus, .search:focus-within { outline: none; border-color: var(--ex-brand-active); } .text-input::placeholder, .search input::placeholder { color: var(--ex-outline); } .muted { color: var(--muted); } .danger { color: var(--danger); } .error, .notice { margin: 0; padding: 6px 10px; border-radius: var(--ex-radius-lg); font-size: 13px; cursor: pointer; } .error { background: var(--ex-danger-bg); color: var(--danger); } .notice { background: var(--ex-surface-low); white-space: pre-line; } .notice.busy { cursor: progress; color: var(--muted); } /* Barres de défilement fines, comme dans Excalidraw. */ * { scrollbar-width: thin; scrollbar-color: var(--ex-scrollbar) transparent; } /* --- Mise en page ----------------------------------------------------------- */ .app { display: grid; grid-template-rows: var(--topbar-h) 1fr; grid-template-columns: 0 1fr; height: 100dvh; transition: grid-template-columns 0.15s ease; } .app.drawer-open { grid-template-columns: var(--drawer-w) 1fr; } .app.resizing { transition: none; cursor: col-resize; user-select: none; } /* Poignée de redimensionnement, à cheval sur la bordure de l'explorateur. */ .splitter { display: none; grid-area: 2 / 1; justify-self: end; position: relative; z-index: 5; width: 9px; margin-right: -5px; cursor: col-resize; touch-action: none; } .drawer-open .splitter { display: block; } .splitter::after { content: ""; position: absolute; inset: 0 3px; border-radius: 2px; transition: background 0.1s; } .splitter:hover::after, .splitter:focus-visible::after, .resizing .splitter::after { background: var(--accent); } .splitter:focus-visible { outline: none; } .topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 0 8px; padding-left: max(8px, env(safe-area-inset-left)); border-bottom: 1px solid var(--border); background: var(--panel); min-width: 0; } .topbar .title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .topbar .title .sep { margin-right: 8px; font-weight: 400; } /* Logo + titre personnalisés (clic : dialogue « Personnaliser »). */ .brand { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 40%; flex: none; border: none; background: transparent; height: auto; padding: 2px 6px 2px 2px; box-shadow: none; font: 600 15px/1.2 var(--ex-font); letter-spacing: normal; border-radius: var(--ex-radius-lg); } .brand-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* Logo stocké en 64x64 : affiché plus petit, il reste net sur écran HiDPI. */ .logo { --logo-size: 34px; flex: none; width: var(--logo-size); height: var(--logo-size); border-radius: 50%; /* masque rond */ object-fit: cover; background: var(--bg); box-shadow: 0 0 0 1px var(--border); } .logo.big { --logo-size: 64px; } .topbar-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; padding-left: 4px; border-left: 1px solid var(--border); } .status { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--ex-surface-low); } .status.saved { color: var(--ok); } .status.dirty, .status.saving { color: var(--warn); } .status.error { color: var(--danger); } .drawer { grid-area: 2 / 1; overflow: hidden; border-right: 1px solid var(--border); background: var(--panel); min-width: 0; } .backdrop { display: none; } .canvas { grid-area: 2 / 2; position: relative; isolation: isolate; /* la poignée passe au-dessus de l'interface Excalidraw */ min-width: 0; min-height: 0; } .canvas > .error { position: absolute; z-index: 10; top: 8px; left: 50%; transform: translateX(-50%); } .placeholder { height: 100%; display: grid; place-items: center; padding: 16px; text-align: center; } /* --- Explorateur ------------------------------------------------------------ */ .explorer { position: relative; width: var(--drawer-w); height: 100%; display: flex; flex-direction: column; padding: 12px 10px 8px; gap: 8px; } .toolbar { display: flex; flex-wrap: wrap; gap: 6px; } .searchbar { display: flex; align-items: center; gap: 4px; } .search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 0 0.625rem; color: var(--ex-outline); cursor: text; } .search input { flex: 1; min-width: 0; height: 100%; border: none; outline: none; background: transparent; color: var(--ex-on-surface); font: inherit; } /* Sélecteur vignettes/liste : groupe d'onglets de la barre latérale d'Excalidraw. */ .segmented { display: flex; flex: none; padding: 2px; border: 1px solid var(--ex-surface-high); border-radius: 0.625rem; background: var(--ex-canvas); } .segmented .icon-btn { width: calc(var(--ex-btn-lg) - 6px); height: calc(var(--ex-btn-lg) - 6px); } .crumbs { display: flex; flex-wrap: wrap; align-items: center; font-size: 13px; } .crumbs button { height: auto; padding: 3px 6px; background: transparent; box-shadow: none; outline: 1px dashed transparent; font-size: 13px; letter-spacing: normal; } .entries { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; } .entries .empty { padding: 12px 8px; } .row { display: flex; align-items: center; gap: 4px; border-radius: var(--ex-radius-lg); border: 1px dashed transparent; } .row:hover { background: var(--ex-surface-low); } li.active > .row { background: var(--accent-soft); } .item.drop > .row, .crumbs button.drop { border-color: var(--accent); outline-color: var(--accent); background: var(--accent-soft); } .row .name { flex: 1; display: flex; gap: 8px; align-items: center; min-width: 0; height: auto; justify-content: flex-start; text-align: left; border: none; background: transparent; box-shadow: none; padding: 6px; font-size: 13px; line-height: 1.3; letter-spacing: normal; } .row .name:hover:not(:disabled) { background: transparent; } .row .icon { flex: none; display: grid; place-items: center; width: 44px; color: var(--muted); } .row .icon.folder, .folder { color: var(--ex-primary); } .row .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .row .meta { font-size: 11px; white-space: nowrap; } .actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 4px 6px 8px 30px; font-size: 13px; } .actions button, .actions a { height: var(--ex-btn); } /* --- Mobile : l'explorateur devient un tiroir superposé -------------------- */ @media (max-width: 768px) { .app, .app.drawer-open { grid-template-columns: 0 1fr; } .drawer { position: fixed; z-index: 20; top: var(--topbar-h); bottom: 0; left: 0; width: min(330px, 88vw); /* largeur réglable : bureau uniquement */ transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: 2px 0 12px rgb(0 0 0 / 0.2); } .explorer { width: 100%; padding-bottom: max(8px, env(safe-area-inset-bottom)); } .drawer-open .drawer { transform: none; } .drawer-open .backdrop { display: block; position: fixed; z-index: 15; inset: var(--topbar-h) 0 0 0; background: rgb(0 0 0 / 0.35); } .row .meta, .topbar .status, .save-label, .has-scene .brand-title { display: none; } .splitter, .drawer-open .splitter { display: none; } .row .name { padding: 10px 6px; /* cibles tactiles plus grandes */ } } /* --- Explorateur : sélection, vignettes, déplacement ----------------------- */ :root { --thumb-bg: #ffffff; } :root[data-theme="dark"] { --thumb-bg: #121212; } .spacer { flex: 1; } .selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px 6px; border-radius: var(--ex-radius-lg); background: var(--ex-primary-container); color: var(--ex-on-primary-container); font-size: 13px; } .selbar button { height: var(--ex-btn); } .selbar .count { flex: 1; font-weight: 600; white-space: nowrap; } .selbar .icon-btn { color: inherit; } .selbar .icon-btn.danger { color: var(--danger); } /* Case à cocher : au survol (souris), toujours visible pendant une sélection et sur écran tactile. */ .item .check { width: 16px; height: 16px; margin: 0 0 0 4px; flex: none; accent-color: var(--accent); cursor: pointer; opacity: 0; } .item:hover .check, .item .check:focus-visible, .selecting .item .check { opacity: 1; } @media (hover: none) { .item .check { opacity: 1; } } .item.selected > .row { background: var(--accent-soft); outline: 1px solid var(--accent); } .entries .item.up .row { padding-left: 20px; } /* Miniatures */ .thumb { flex: none; display: grid; place-items: center; width: 44px; height: 33px; border-radius: var(--ex-radius-md); border: 1px solid var(--border); background: var(--thumb-bg); overflow: hidden; } .thumb img { width: 100%; height: 100%; object-fit: contain; } :root[data-theme="dark"] .thumb img { filter: invert(93%) hue-rotate(180deg); /* même rendu que le mode sombre d'Excalidraw */ } .thumb .ph { color: var(--muted); font-size: 14px; } .thumb.server, .thumb.generating { background: linear-gradient(90deg, var(--thumb-bg), var(--panel), var(--thumb-bg)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; } @keyframes shimmer { to { background-position: -200% 0; } } /* Vue grille */ .entries.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); grid-auto-flow: row dense; gap: 6px; align-content: start; } .entries.grid > .empty, .entries.grid > .menu-row { grid-column: 1 / -1; } .entries.grid .row { position: relative; flex-direction: column; align-items: stretch; gap: 0; height: 100%; border: 1px solid var(--border); background: var(--ex-surface-lowest); transition: border-color 0.1s; } .entries.grid .row:hover { border-color: var(--ex-primary); background: var(--ex-surface-lowest); } .entries.grid .row .name { justify-content: flex-start; } .entries.grid .row .name { flex-direction: column; align-items: stretch; gap: 4px; padding: 4px; } .entries.grid .thumb, .entries.grid .icon { width: 100%; height: auto; aspect-ratio: 4 / 3; } .entries.grid .icon { border-radius: var(--ex-radius-md); background: var(--ex-surface-mid); } .entries.grid .label { text-align: center; font-size: 12.5px; } .entries.grid .where { display: block; } .entries.grid .check { position: absolute; top: 8px; left: 6px; z-index: 1; } .entries.grid .more { position: absolute; top: 4px; right: 4px; z-index: 1; background: color-mix(in srgb, var(--bg) 80%, transparent); border-radius: 6px; opacity: 0; } .entries.grid .item:hover .more, .entries.grid .more:focus-visible { opacity: 1; } @media (hover: none) { .entries.grid .more { opacity: 1; } } .entries.grid .actions { padding: 4px 2px 8px; } .drag-ghost { position: fixed; top: -100px; left: -100px; padding: 4px 10px; border-radius: 12px; background: var(--ex-primary); color: var(--ex-surface-lowest); font: 600 13px var(--ex-font); } /* Dialogue « Déplacer vers… » */ .modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / 0.4); } .modal { width: min(420px, 100%); max-height: min(560px, 90dvh); display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 0.75rem; background: var(--ex-island); border: 1px solid var(--border); box-shadow: var(--ex-shadow-modal); } .modal h3 { margin: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .modal .folders { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 120px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--ex-radius-lg); background: var(--ex-surface-lowest); } .modal .folders button { width: 100%; height: auto; justify-content: flex-start; text-align: left; border-radius: 0; background: transparent; box-shadow: none; padding: 9px 10px; font-size: 13px; letter-spacing: normal; } .modal .folders button:hover:not(:disabled) { background: var(--ex-surface-high); } .modal .folders .empty { padding: 10px; } .modal-actions { display: flex; gap: 6px; align-items: center; } /* Dialogue « Personnaliser » */ .customize .field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; } .customize .field > span { font-weight: 600; } .logo-edit { display: flex; align-items: center; gap: 12px; } .placeholder-logo { display: grid; place-items: center; font-size: 24px; } .logo-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .logo-actions small { flex-basis: 100%; } /* --- Import par glisser-déposer -------------------------------------------- */ .drop-hint { position: absolute; inset: 8px; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; text-align: center; border: 2px dashed var(--ex-primary); border-radius: var(--ex-radius-lg); background: color-mix(in srgb, var(--ex-island) 96%, transparent); backdrop-filter: blur(2px); color: var(--ex-primary); font-weight: 600; pointer-events: none; } .drop-hint small { color: var(--muted); font-weight: 400; } /* Survol d'un dossier précis : l'indication générale s'efface. */ .explorer:has(.item.drop) .drop-hint, .explorer:has(.crumbs .drop) .drop-hint { opacity: 0; } /* --- Mise à jour d'Excalidraw ---------------------------------------------- */ .update-btn { position: relative; color: var(--ex-primary); } .update-btn::after { content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--ex-island); } .modal .cmd { display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: var(--ex-radius-lg); background: var(--ex-surface-low); } .modal .cmd code { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; } .modal .link { color: var(--ex-primary); font-size: 13px; } /* Dialogue « Paramètres » */ .modal.settings { width: min(480px, 100%); max-height: min(720px, 92dvh); overflow-y: auto; } .modal h4 { margin: 6px 0 0; padding-top: 8px; border-top: 1px solid var(--border); font-size: 12px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); } .modal h3 + h4 { border-top: none; padding-top: 0; } .modal .versions { margin: 0; font-size: 13px; line-height: 1.5; } .modal small code { font-size: 11px; } /* Choix du canal : RadioGroup d'Excalidraw. */ .radio-group { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--ex-surface-high); border-radius: 0.625rem; background: var(--ex-island); align-self: flex-start; } .radio-group button { flex-direction: column; gap: 2px; height: auto; min-width: 110px; padding: 6px 12px; background: transparent; box-shadow: none; font-size: 13px; } .radio-group button small { font-size: 11px; letter-spacing: normal; opacity: 0.75; } .radio-group button.on { background: var(--ex-primary); color: var(--ex-surface-lowest); } /* --- Historique des versions ----------------------------------------------- */ .modal.history { width: min(920px, 100%); height: min(640px, 92dvh); max-height: none; } .history-head { display: flex; align-items: center; gap: 8px; } .history-head h3 { flex: 1; min-width: 0; } .history-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 240px 1fr; gap: 10px; } .versions-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--ex-radius-lg); background: var(--ex-surface-lowest); } .versions-list button { width: 100%; height: auto; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border-radius: 0; background: transparent; box-shadow: none; font-size: 13px; letter-spacing: normal; } .versions-list button.on { background: var(--accent-soft); color: var(--ex-on-primary-container); } .versions-list small { font-size: 11px; } .versions-list .empty { padding: 10px; font-size: 13px; } .history-preview { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 6px; } .history-preview .segmented { align-self: flex-start; } .history-preview .segmented button { height: calc(var(--ex-btn-lg) - 6px); background: transparent; box-shadow: none; } .history-preview .segmented button.on { background: var(--ex-primary-container); color: var(--ex-on-primary-container); } .svg-box { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--ex-radius-lg); background: var(--ex-surface-lowest); color: var(--muted); } .svg-box svg { max-width: 100%; max-height: 100%; } .legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font-size: 12px; } .legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; } .modal-actions a.link { display: inline-flex; padding: 6px; } @media (max-width: 640px) { .modal.history { height: 92dvh; } .history-body { grid-template-columns: 1fr; grid-template-rows: minmax(90px, 30%) 1fr; } .history-head button span { display: none; } }