/* =============================================================================
 * Charte "Logo AD" pour Planka
 * Injecté dans views/index.ejs au démarrage du conteneur (cf. command du docker-compose.yml)
 * Planka utilise des classes CSS hachées (_logo_jdrq3_40) : on cible le préfixe stable
 * avec [class*="_logo_"]. À revérifier après une mise à jour majeure de Planka.
 * Palette : Nuit #0B1E30 · Bleu signal #0F5FA8 · Bleu flux #2A8FD4 · Cyan #5FD0E6 · Ivoire #F2F5F7
 * ========================================================================== */

/* --- Polices auto-hébergées --- */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/IBMPlexSans-latin-ext.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;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/IBMPlexSans-latin.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: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("fonts/SpaceGrotesk-latin-ext.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;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("fonts/SpaceGrotesk-latin.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;
}

:root {
  --ad-nuit: #0b1e30;
  --ad-nuit-2: #11283d;
  --ad-signal: #0f5fa8;
  --ad-flux: #2a8fd4;
  --ad-cyan: #5fd0e6;
  --ad-ivoire: #f2f5f7;
  --ad-bordure: #dce6ed;
  --ad-gris: #4a6072;
  --ad-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ad-titre: "Space Grotesk", "IBM Plex Sans", system-ui, sans-serif;
}

/* --- Typographie : Semantic UI impose sa police sur chaque composant .ui --- */
body, #app, .ui, .ui.button, .ui.input > input, .ui.form input, .ui.form textarea,
.ui.menu, .ui.popup, .ui.modal, .ui.dropdown, .ui.label, input, textarea, button, select {
  font-family: var(--ad-sans) !important;
}
h1, h2, h3, .ui.header, [class*="_title_"], [class*="_formTitle_"] {
  font-family: var(--ad-titre) !important;
  letter-spacing: -0.01em;
}

/* --- Fond général (tableaux sans image, accueil) : Nuit au lieu du gris #22252a --- */
body#app, #app { background: var(--ad-nuit); }
#app [class*="_bottom_"] div:nth-child(2n) { border-top-color: var(--ad-nuit); }
#app [class*="_eyeLeft_"], #app [class*="_eyeRight_"] { background: var(--ad-nuit); }

/* --- En-tête : le logo texte "PLANKA" est remplacé par le logo @D clair --- */
a[class*="_logo_"][class*="_title_"] {
  display: inline-block;
  width: 96px;
  min-height: 50px;
  font-size: 0 !important;
  color: transparent !important;
  background: url("logo-white.svg") no-repeat 18px center / auto 26px;
}

/* --- Boutons principaux et liens --- */
.ui.primary.button, .ui.primary.buttons .button {
  background-color: var(--ad-signal) !important;
  color: #fff !important;
}
.ui.primary.button:hover, .ui.primary.buttons .button:hover,
.ui.primary.button:focus, .ui.primary.buttons .button:focus {
  background-color: var(--ad-flux) !important;
}
.ui.primary.button:active, .ui.primary.buttons .button:active { background-color: var(--ad-nuit) !important; }
.ui.labeled.icon.button > .icon, .ui.labeled.icon.buttons > .button > .icon { background-color: rgba(0, 0, 0, 0.12); }
a { color: var(--ad-signal); }
.ui.form input:focus, .ui.input > input:focus, .ui.form textarea:focus { border-color: var(--ad-flux) !important; }

/* --- Listes et cartes du tableau --- */
[class*="_outerWrapper_"] { background: #e8eef2 !important; }
[class*="_addCardButton_"] { background: #e8eef2 !important; color: var(--ad-gris) !important; }
[class*="_addCardButton_"]:hover { background: var(--ad-bordure) !important; color: var(--ad-nuit) !important; }

/* --- Couverture des projets sans image --- */
[class*="_cover_"]:not(.column) { background-color: var(--ad-signal) !important; }

/* --- Page de connexion --- */
/* logo : bloc nuit @D */
img[class*="_logo_"] { content: url("logo-bloc.svg"); }
/* titre "PLANKA" masqué, le logo suffit */
h1[class*="_formTitle_"] { display: none !important; }
[class*="_formSubtitle_"] { color: var(--ad-nuit) !important; }
/* panneau de droite : aplat nuit + logo en filigrane à la place de la photo */
.ui.grid > .column[class*="_cover_"] {
  background: var(--ad-nuit) url("logo-white.svg") no-repeat center / 36% auto !important;
}
.ui.grid > .column[class*="_cover_"] [class*="_coverOverlay_"] { background: transparent !important; }
