/* Thème « super_dev » : habillage doux et lisible, pour tous les utilisateurs.
 * Les ajustements propres aux clients s'appuient sur body.sd-client,
 * posé par le plugin super_dev_customer_portal (le thème ne déduit aucun rôle lui-même). */
@import url("/assets/application-c183e617.css");

:root {
  --sd-bg: #f6f4f0;
  --sd-card-bg: #fff;
  --sd-border: #e7e2da;
  --sd-text: #1f2933;
  --sd-muted: #5b6472;
  --sd-accent: #2f6f8f;
  --sd-accent-hover: #255a74;
  --sd-accent-text: #fff;
  --sd-warm: #d97a2b;
  --sd-ok: #3c8d5a;
  --sd-radius: 10px;
  --sd-radius-lg: 14px;
  --sd-title: #1f2933;

  --fonts-main: "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
  --color-top-menu-background: #fff;
  --color-header-background: #fff;
}

/* --- Fond et texte --- */
html, body { background: var(--sd-bg); color: var(--sd-text); }
a, a:link, a:visited { color: var(--sd-accent); }
a:hover, a:active { color: var(--sd-accent-hover); }

/* --- Barre du haut et en-tête : blancs, sobres --- */
#top-menu {
  background: var(--sd-card-bg);
  color: var(--sd-muted);
  border-bottom: 1px solid var(--sd-border);
  padding: 4px 16px;
}
#top-menu a, #top-menu a:link, #top-menu a:visited { color: var(--sd-muted); }
#top-menu a:hover { color: var(--sd-accent); }
#top-menu #loggedas a { color: var(--sd-text); }

#header {
  background: var(--sd-card-bg);
  color: var(--sd-text);
  border-bottom: 1px solid var(--sd-border);
}
#header a, #header a:hover, #header h1 { color: var(--sd-text); }
#header h1 { font-weight: 600; }
#quick-search input[type=search], #quick-search .drdn-trigger {
  border-radius: var(--sd-radius);
  border: 1px solid var(--sd-border);
  background: var(--sd-bg);
  color: var(--sd-text);
}
#quick-search label, #quick-search a { color: var(--sd-muted); }

/* Menu du projet : onglets discrets, actif souligné */
#main-menu { background: transparent; }
#main-menu li a {
  background: transparent;
  color: var(--sd-muted);
  border-radius: var(--sd-radius) var(--sd-radius) 0 0;
}
#main-menu li a:hover { background: var(--sd-bg); color: var(--sd-text); }
#main-menu li a.selected, #main-menu li a.selected:hover {
  background: var(--sd-bg);
  color: var(--sd-text);
  box-shadow: inset 0 -3px 0 var(--sd-accent);
}

/* --- Contenu --- */
#main { background: var(--sd-bg); }
#content {
  background: transparent;
  border: 0;
}
#content h2, #content h3, #content h4 { color: var(--sd-title); font-weight: 600; }
#content h2 { font-size: 1.6em; }
#sidebar { background: transparent; }
#sidebar h3 { color: var(--sd-muted); }

.box, div.issue, #my-page .mypage-box, .wiki-page .box {
  background: var(--sd-card-bg);
  border: 1px solid var(--sd-border);
  border-radius: var(--sd-radius-lg);
}
div.issue { padding: 16px 20px; }

/* Tableaux de l'équipe : aérés mais denses, lignes séparées finement */
table.list {
  background: var(--sd-card-bg);
  border: 1px solid var(--sd-border);
  border-radius: var(--sd-radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}
table.list th {
  background: var(--sd-bg);
  color: var(--sd-muted);
  font-weight: 600;
  border: 0;
  border-bottom: 1px solid var(--sd-border);
}
table.list td { border: 0; border-bottom: 1px solid var(--sd-border); }
table.list tbody tr:hover { background: #fbfaf7; }
table.list tbody tr:last-child td { border-bottom: 0; }

/* Boutons */
input[type=submit], input[type=button], button:not(.sd-help) {
  border-radius: var(--sd-radius);
}
input[type=submit], .button-positive {
  background: var(--sd-accent);
  border: 1px solid var(--sd-accent);
  color: var(--sd-accent-text);
}
input[type=submit]:hover { background: var(--sd-accent-hover); }

/* Champs */
input[type=text], input[type=email], input[type=password], input[type=search],
input[type=number], input[type=date], select, textarea {
  border-radius: 8px;
  border: 1px solid var(--sd-border);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(47, 111, 143, .35);
  border-color: var(--sd-accent);
}

/* Messages */
#flash_notice, .flash.notice, div.flash.notice {
  background: #e5f3ea; border-color: #b9dcc5; color: #245c39; border-radius: var(--sd-radius);
}
#errorExplanation, .flash.error {
  border-radius: var(--sd-radius);
}

#footer { background: transparent; border-top: 1px solid var(--sd-border); color: var(--sd-muted); }

/* --- Clients : interface encore plus épurée (purement visuel) --- */
body.sd-client #footer { display: none; }

/* --- Connexion --- */
#login-form {
  background: var(--sd-card-bg);
  border: 1px solid var(--sd-border);
  border-radius: var(--sd-radius-lg);
  box-shadow: 0 6px 24px rgba(31, 41, 51, .06);
}
#login-form input#login-submit { background: var(--sd-accent); border-color: var(--sd-accent); color: #fff; }

/* --- Mobile : l'en-tête garde un fond coloré, car Redmine y place en blanc
   le bouton du menu (≡) et le sélecteur de projet --- */
@media screen and (max-width: 899px) {
  /* Le menu mobile (≡) de Redmine prend ces variables comme fonds (menu et
     titres de section « Général », « Profil »…), avec un texte blanc : sans
     ces lignes, il hériterait du blanc de la barre du haut et de l'en-tête,
     et son texte serait invisible. */
  :root {
    --color-top-menu-background: var(--sd-accent);
    --color-header-background: #24566f;
  }
  html body #header { background: var(--sd-accent); border-bottom: 0; }
  html body #header a, html body #header a:hover, html body #header a.mobile-toggle-button,
  html body #header #project-jump .drdn-trigger { color: #fff; }
  html body #header .mobile-toggle-button { border-inline-start-color: rgba(255, 255, 255, .3); }
}

/* --- Touche de couleur : fine bande dégradée sous l'en-tête --- */
#header { box-shadow: inset 0 -3px 0 0 transparent; position: relative; }
#header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, #2f6f8f, #2bb3a3, #f2c14e, #d97a2b);
}
html, body { background: linear-gradient(180deg, #fbf7f1 0, var(--sd-bg) 320px) fixed, var(--sd-bg); }

/* --- Clients : même largeur de contenu que leur page d'accueil (960 px,
   centré) sur la fiche d'un ticket et « Mon compte » --- */
body.sd-client.controller-issues.action-show #content,
body.sd-client.controller-my.action-account #content {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* --- Clients : barre du haut, en-tête et menu du projet alignés sur la
   largeur du contenu (960 px centrés, 20 px de marge intérieure), sur grand
   écran. Les fonds et la bande dégradée restent sur toute la largeur. --- */
@media screen and (min-width: 900px) {
  body.sd-client #top-menu,
  body.sd-client #header,
  body.sd-client #main-menu {
    padding-left: max(16px, calc((100% - 960px) / 2 + 20px));
    padding-right: max(16px, calc((100% - 960px) / 2 + 20px));
  }
}

/* --- Messages (erreurs, notifications, avertissements) : sans marge
   intérieure verticale --- */
#errorExplanation, div.flash, .nodata, .warning, .conflict {
  padding-block: 0;
}

/* --- Aide (wiki du projet d'aide, body.sd-wiki posé par le plugin) ---
   Contenu dans une carte blanche, titres de section de couleurs différentes,
   étapes numérotées en pastilles, tableaux et encadrés « astuce » colorés. */
body.sd-wiki {
  --sd-help-teal: #1d8a7e;
  --sd-help-orange: #c8651b;
  --sd-help-violet: #7a55b0;
  --sd-help-tip-bg: #fff6dc;
  --sd-help-tip-border: #f2c14e;
  --sd-help-head-bg: #e8f3f6;
}
body.sd-wiki #content > .contextual,
body.sd-wiki #content > .wiki-page,
body.sd-wiki #content > fieldset,
body.sd-wiki #content > .wiki-update-info,
body.sd-wiki #content > p.breadcrumb { max-width: 860px; margin-inline: auto; }
body.sd-wiki #content > .wiki-page {
  background: var(--sd-card-bg); border: 1px solid var(--sd-border); border-radius: var(--sd-radius-lg);
  box-shadow: 0 6px 24px rgba(31, 41, 51, .06); padding: 28px 40px 32px;
  font-size: 1.05em; line-height: 1.65;
}
body.sd-wiki #content .wiki-page h1 {
  color: var(--sd-accent); font-size: 1.9em; border: 0; margin: 0 0 18px; padding-bottom: 12px; position: relative;
}
body.sd-wiki #content .wiki-page h1::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 72px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, #2f6f8f, #2bb3a3, #f2c14e, #d97a2b);
}
body.sd-wiki #content .wiki-page h2 {
  --sd-h2: var(--sd-help-teal);
  border: 0; border-left: 5px solid var(--sd-h2); border-radius: 3px;
  padding: 2px 0 2px 12px; margin: 30px 0 12px; color: var(--sd-h2); font-size: 1.35em;
}
body.sd-wiki #content .wiki-page h2:nth-of-type(4n+2) { --sd-h2: var(--sd-help-orange); }
body.sd-wiki #content .wiki-page h2:nth-of-type(4n+3) { --sd-h2: var(--sd-help-violet); }
body.sd-wiki #content .wiki-page h2:nth-of-type(4n+4) { --sd-h2: var(--sd-accent); }
body.sd-wiki #content .wiki-page h3 { color: var(--sd-accent-hover); font-size: 1.12em; border: 0; margin: 22px 0 6px; }
body.sd-wiki .wiki-page strong { color: var(--sd-title); }
body.sd-wiki .wiki-page p, body.sd-wiki .wiki-page li { color: var(--sd-text); }

/* Listes à puces : pastilles de couleur */
body.sd-wiki .wiki-page ul:not(.toc, .toc ul) { list-style: none; padding-left: 4px; }
body.sd-wiki .wiki-page ul:not(.toc, .toc ul) > li { position: relative; padding-left: 22px; margin: 6px 0; }
body.sd-wiki .wiki-page ul:not(.toc, .toc ul) > li::before {
  content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%;
  background: var(--sd-help-teal);
}

/* Listes numérotées : étapes dans des pastilles */
body.sd-wiki .wiki-page ol { list-style: none; counter-reset: sd-step; padding-left: 0; }
body.sd-wiki .wiki-page ol > li {
  counter-increment: sd-step; position: relative; padding: 6px 0 6px 44px; margin: 4px 0; min-height: 30px;
}
body.sd-wiki .wiki-page ol > li::before {
  content: counter(sd-step); position: absolute; left: 0; top: 4px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--sd-accent); color: #fff; font-weight: 700; font-size: .9em;
  display: flex; align-items: center; justify-content: center;
}

/* Tableaux */
body.sd-wiki .wiki-page table {
  border-collapse: separate; border-spacing: 0; width: 100%; margin: 14px 0 18px;
  border: 1px solid var(--sd-border); border-radius: var(--sd-radius); overflow: hidden;
}
body.sd-wiki .wiki-page table th {
  background: var(--sd-help-head-bg); color: var(--sd-accent-hover); text-align: left;
  border: 0; border-bottom: 1px solid var(--sd-border); padding: 10px 14px;
}
body.sd-wiki .wiki-page table td { border: 0; border-bottom: 1px solid var(--sd-border); padding: 10px 14px; vertical-align: top; }
body.sd-wiki .wiki-page table tr:last-child td { border-bottom: 0; }
body.sd-wiki .wiki-page table tbody tr:nth-child(even) td { background: #fbfaf7; }

/* Encadrés « astuce » (citations) */
body.sd-wiki .wiki-page blockquote {
  background: var(--sd-help-tip-bg); border: 0; border-left: 5px solid var(--sd-help-tip-border);
  border-radius: var(--sd-radius); margin: 18px 0; padding: 12px 18px; color: var(--sd-text); font-style: normal;
}
body.sd-wiki .wiki-page blockquote p { margin: 4px 0; }

/* Liens entre pages et séparateur */
body.sd-wiki .wiki-page a.wiki-page { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(47, 111, 143, .35); }
body.sd-wiki .wiki-page a.wiki-page:hover { text-decoration-color: currentColor; }
body.sd-wiki .wiki-page hr { border: 0; height: 2px; margin: 26px 0; background: linear-gradient(90deg, transparent, var(--sd-border), transparent); }

/* Clients : pas de bloc « Fichiers (0) » sous l'aide */
body.sd-help.sd-client #content > fieldset.collapsible { display: none; }

@media screen and (max-width: 899px) {
  body.sd-wiki #content > .wiki-page { padding: 18px 16px 22px; font-size: 1em; }
  body.sd-wiki .wiki-page h1 { font-size: 1.55em; }
  body.sd-wiki .wiki-page table { display: block; overflow-x: auto; }
}

/* --- Historique d'une demande, vue équipe ---
   Chaque entrée est une carte. Celles qui portent un message ont une bordure
   gauche (bleue pour l'équipe, orange pour un client) ; les entrées sans
   message (changements seuls) restent discrètes. La vue client a sa propre
   mise en forme (CSS du plugin, body.sd-client). */
body:not(.sd-client) #history .journal {
  margin: 0 0 10px;
  background: var(--sd-card-bg);
  border: 1px solid var(--sd-border);
  border-radius: var(--sd-radius);
}
body:not(.sd-client) #history .journal.has-notes { border-left: 4px solid var(--sd-accent); }
body:not(.sd-client) #history .journal.has-notes.sd-from-client { border-left-color: var(--sd-warm); background: #fffaf4; }
body:not(.sd-client) #history .journal:not(.has-notes) { background: transparent; border-style: dashed; }
body:not(.sd-client) #history h4.journal-header {
  background: transparent;
  padding: 10px 14px 4px;
  font-weight: normal;
  color: var(--sd-muted);
}
body:not(.sd-client) #history div:target h4.journal-header { background: #eef5f9; }
body:not(.sd-client) #history h4.journal-header a.user { color: var(--sd-text); font-weight: 600; }
body:not(.sd-client) #history .journal.sd-from-client h4.journal-header a.user::after {
  content: "Client";
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 9px;
  background: var(--sd-warm);
  color: #fff;
  font-size: .8em;
  font-weight: 600;
}
body:not(.sd-client) #history .journal-content { padding: 0 14px 10px; margin: 0; }
body:not(.sd-client) #history .journal-details {
  list-style: none;
  padding: 0;
  margin: 2px 0 6px;
  color: var(--sd-muted);
  font-size: .9em;
}
body:not(.sd-client) #history .journal-details li {
  display: inline-block;
  margin: 0 6px 4px 0;
  padding: 2px 9px;
  border-radius: 6px;
  background: #f1eee8;
}
body:not(.sd-client) #history .journal-details li strong { color: var(--sd-text); font-weight: 600; }
body:not(.sd-client) #history .journal-details li i { font-style: normal; color: var(--sd-text); }
body:not(.sd-client) #history .journal .journal-content .wiki {
  margin: 4px 0 0;
  color: var(--sd-text);
  font-size: 1.05em;
  line-height: 1.55;
}
