/* common.css IT Dashboard / Presentation
   Design system : blanc dominant, texte noir, accents rouge #e63946 et bleu #2563eb
   WCAG 2.1 AA/AAA Gabriel ROULON 2026 */

/* === VARIABLES === */
:root {
  --bg: #ffffff;
  --bg-secondary: #f7f7f7;
  --bg-card: #f0f0f0;
  --border: #e0e0e0;
  --text: #111111;
  --text-secondary: #555555;
  --red: #e63946;
  --blue: #2563eb;
  --blue-dim: rgba(37, 99, 235, 0.07);
  --red-dim: rgba(230, 57, 70, 0.07);
  --max-width: 960px;
  --header-h: 68px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* === ACCESSIBILITE === */
.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  background: var(--blue);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 4px 4px;
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

*:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 3px;
}

/* === HEADER === */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 100;
  gap: 16px;
}

.header-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}
.header-left a {
  text-decoration: none;
  color: var(--text);
  transition: color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.header-left a:hover { color: var(--text-secondary); }
.header-main {
  font-size: 0.95em;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  line-height: 1.4;
}
.header-sub {
  font-size: 0.72em;
  font-weight: 400;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 460px;
  line-height: 1.4;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Bouton Lecture rapide */
.btn-quick-read {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.88em;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn-quick-read:hover,
.btn-quick-read:focus-visible {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--text-secondary);
  outline: none;
}

/* Variante Important (rouge) */
.btn-important {
  color: var(--red);
  border-color: var(--red);
}
.btn-important:hover,
.btn-important:focus-visible {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.18);
}

/* Variante Statuts (bleu) */
.btn-blue {
  color: var(--blue);
  border-color: var(--blue);
}
.btn-blue:hover,
.btn-blue:focus-visible {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

/* === BOUTON CHATBOT (header legacy) === */
.btn-chatbot {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.88em;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 7px;
}
.btn-chatbot::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  animation: pulse-dot 2.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
.btn-chatbot:hover,
.btn-chatbot.active {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--text-secondary);
  outline: none;
}

/* === FAB RÉSUMÉ IA (icône chatbox flottante) === */
.btn-chatbot-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 400;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 13px 20px 13px 15px;
  font-size: 0.85em;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.42), 0 2px 8px rgba(0,0,0,0.14);
  transition: background 0.18s, box-shadow 0.18s, transform 0.15s, opacity 0.22s;
}
.btn-chatbot-fab.fab-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}
.btn-chatbot-fab::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.btn-chatbot-fab:hover,
.btn-chatbot-fab.active {
  background: #1a4fba;
  box-shadow: 0 6px 28px rgba(37, 99, 235, 0.52), 0 3px 10px rgba(0,0,0,0.18);
  transform: translateY(-2px);
  outline: none;
}

/* === CHATBOT PANEL === */
.chatbot-panel {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 460px;
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
  z-index: 450;
  transform: translateY(14px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.chatbot-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.chatbot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.chatbot-title-group {
  display: flex;
  align-items: center;
  gap: 7px;
}
.chatbot-title {
  font-size: 0.76em;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.chatbot-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s;
}
.chatbot-panel.typing .chatbot-dot {
  background: var(--blue);
  animation: pulse-dot 0.7s step-end infinite;
}
.chatbot-panel.done .chatbot-dot {
  background: #2a9d4a;
}

.chatbot-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1em;
  padding: 3px 7px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.chatbot-close-btn:hover { color: var(--text); background: var(--bg-secondary); }

.chatbot-body { padding: 14px 16px 16px; flex: 1; min-height: 0; overflow-y: auto; }

.chatbot-think {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 20px;
  margin-bottom: 10px;
}
.chatbot-think span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: think-bounce 1.2s ease-in-out infinite;
}
.chatbot-think span:nth-child(2) { animation-delay: 0.18s; }
.chatbot-think span:nth-child(3) { animation-delay: 0.36s; }
@keyframes think-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-5px); opacity: 1; }
}
.chatbot-think.hidden { display: none; }

.chatbot-msg {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 15px;
  font-size: 0.88em;
  line-height: 1.8;
  color: var(--text);
  min-height: 56px;
  word-break: break-word;
  text-align: justify;
}
.chatbot-para {
  display: block;
  height: 9px;
}

.chatbot-cursor-blink {
  display: inline-block;
  width: 2px;
  height: 12px;
  background: var(--blue);
  animation: blink-cur 0.65s step-end infinite;
  margin-left: 1px;
  vertical-align: text-bottom;
}
@keyframes blink-cur { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.chatbot-status {
  font-size: 0.71em;
  color: var(--text-secondary);
  margin-top: 9px;
  padding-left: 2px;
  min-height: 14px;
  transition: color 0.3s;
}
.chatbot-status.done { color: #2a9d4a; }

/* === NAV PANEL (ressources Vue Jury) === */
.nav-panel {
  position: fixed;
  bottom: 80px;
  right: 496px;
  width: 480px;
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
  z-index: 449;
  transform: translateY(14px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.nav-panel.open { transform: translateY(0); opacity: 1; pointer-events: all; }
.nav-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
}
.nav-panel-title { font-size: 0.76em; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.07em; }
.nav-panel-close { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 1.1em; padding: 3px 7px; border-radius: 4px; line-height: 1; transition: color 0.15s, background 0.15s; }
.nav-panel-close:hover { color: var(--text); background: var(--bg-secondary); }
.nav-panel-body { padding: 12px 16px 14px; overflow-y: auto; flex: 1; min-height: 0; }
.nav-section-label { font-size: 0.66em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); opacity: 0.6; margin: 10px 0 5px; }
.nav-section-label:first-child { margin-top: 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.nav-links a { font-size: 0.82em; color: var(--blue); text-decoration: none; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; padding: 5px 10px; transition: background 0.15s, border-color 0.15s; }
.nav-links a:hover { background: var(--bg-secondary); border-color: var(--blue); }
.chatbot-nav-btn { flex-shrink: 0; white-space: nowrap; background: none; border: 1px solid var(--border); border-radius: 4px; color: var(--blue); font-size: 0.82em; padding: 7px 12px; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.chatbot-nav-btn:hover { background: var(--bg-card); border-color: var(--blue); }
.chatbot-prompt-sep { border: none; border-top: 1px solid var(--border); margin: 12px 0 10px; }
.chatbot-prompt-text { font-size: 0.82em; color: var(--text-secondary); display: block; margin-bottom: 8px; }
.chatbot-prompt-btns { display: flex; gap: 8px; }
.chatbot-prompt-yes { background: var(--blue); border: none; border-radius: 4px; color: #0f172a; font-size: 0.82em; font-weight: 700; padding: 5px 14px; cursor: pointer; transition: opacity 0.15s; }
.chatbot-prompt-yes:hover { opacity: 0.85; }
.chatbot-prompt-no { background: none; border: 1px solid var(--border); border-radius: 4px; color: var(--text-secondary); font-size: 0.82em; padding: 5px 14px; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.chatbot-prompt-no:hover { background: var(--bg-card); border-color: var(--blue); color: var(--text); }

/* === BREADCRUMB === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.83em;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb-sep { color: var(--border); font-size: 1.1em; }
.breadcrumb-current { color: var(--text); font-weight: 500; }

/* === HEADER CENTER (sous-titre centré — index.html) === */
.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.95em;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: 0.01em;
}

/* === FOOTER === */
footer {
  border-top: 1px solid var(--border);
  padding: 20px 40px;
  color: var(--text-secondary);
  font-size: 0.88em;
}
footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
footer a:hover { color: var(--text); }

/* === FOOTER PROFESSIONNEL (Vue RH) === */
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.footer-col { display: flex; flex-direction: column; gap: 3px; }
.footer-col-right { align-items: flex-end; }
.footer-name { font-weight: 600; color: var(--text); font-size: 0.90em; }
.footer-sub { font-size: 0.80em; color: var(--text-secondary); }
.footer-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.footer-sep { color: var(--border); }
.footer-contact-link { font-size: 0.84em; text-decoration: none; color: var(--text-secondary); transition: color 0.15s; }
.footer-contact-link:hover { color: var(--text); }
@media (max-width: 700px) {
  .footer-inner { flex-direction: column; align-items: center; gap: 14px; }
  .footer-col-right { align-items: center; }
}

/* === PAGE HEADER (titre de page avec bordure basse) === */
.page-header {
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.page-header h1 { font-size: 2em; margin-bottom: 6px; }
.page-header .subtitle { color: var(--text-secondary); font-size: 0.97em; }

/* === MAIN === */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--header-h) + 12px) clamp(16px, 4vw, 40px) 48px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === ACCORDEON === */
.accordion {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  background: var(--bg-secondary);
  color: var(--text);
  border: none;
  border-left: 3px solid var(--border);
  padding: 14px 20px;
  text-align: left;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s, border-left-color 0.15s;
  font-family: var(--font);
}
.accordion-header:hover { background: var(--bg-card); }
.accordion-header::after {
  content: "+";
  font-size: 1.2em;
  font-weight: 400;
  color: var(--text-secondary);
  transition: transform 0.2s;
}
.accordion.active .accordion-header::after { content: "−"; }

.accordion.importance-high .accordion-header { border-left-color: var(--blue); }
.accordion.importance-warning .accordion-header { border-left-color: var(--red); }
.accordion.importance-critical .accordion-header { border-left-color: var(--red); }

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.accordion.active .accordion-content { max-height: 9000px; }

.accordion-inner {
  padding: 24px;
  border-top: 1px solid var(--border);
}

/* Grilles fixes pour cards composants */
.cc-2col { grid-template-columns: repeat(2, 1fr) !important; }
.cc-3col { grid-template-columns: repeat(3, 1fr) !important; }
.cc-2col > *:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* === CARDS === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px 0;
}
.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--text-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.card h4 {
  color: var(--text);
  font-size: 0.95em;
  font-weight: 600;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.card p {
  color: var(--text-secondary);
  font-size: 0.9em;
  line-height: 1.55;
  margin: 0;
}

/* Nav cards (index) */
.nav-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-card:hover {
  border-color: var(--text-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  opacity: 1;
}
.nav-card .card-title { font-weight: 600; font-size: 0.95em; color: var(--text); }
.nav-card .card-desc { font-size: 0.85em; color: var(--text-secondary); line-height: 1.45; }
.nav-card .card-arrow { font-size: 0.84em; color: var(--text-secondary); margin-top: 4px; font-weight: 500; transition: transform 0.2s; }
.nav-card:hover .card-arrow { transform: translateX(4px); color: var(--blue); }

/* Metric cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.metric-card:hover {
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}
.metric-card .metric-value {
  font-size: 2.2em;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}
.metric-card .metric-label {
  font-size: 0.85em;
  color: var(--text-secondary);
}

/* === HIGHLIGHT === */
.highlight {
  background: var(--blue-dim);
  border-left: 3px solid var(--blue);
  border-radius: 0 6px 6px 0;
  padding: 16px 20px;
  margin: 20px 0;
}
.highlight p {
  margin: 0;
  font-size: 0.95em;
  line-height: 1.65;
  color: var(--text);
}
.highlight strong { color: var(--text); font-weight: 700; }

.highlight-red {
  background: var(--red-dim);
  border-left-color: var(--red);
}
.highlight-red p { color: var(--text); }

/* === TYPOGRAPHIE === */
h1 { font-size: 1.9em; font-weight: 700; color: var(--text); margin-bottom: 12px; }
h2 { font-size: 1.35em; font-weight: 600; color: var(--text); margin: 24px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
h3 { font-size: 1.1em; font-weight: 600; color: var(--text); margin: 16px 0 8px; }
p { font-size: 0.97em; line-height: 1.75; color: var(--text); margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }
a { color: inherit; transition: color 0.15s; }
a:hover { color: var(--text-secondary); }
code {
  font-family: 'Courier New', monospace;
  font-size: 0.88em;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--text);
}

/* === MODAL === */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  max-width: 480px;
  width: 100%;
  padding: 28px 32px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.4em;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.modal-close:hover {
  color: var(--text);
  background: var(--bg-card);
}

.modal-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.78em;
  text-align: center;
}

.modal-body {
  font-size: 0.95em;
  line-height: 1.7;
  color: var(--text-secondary);
  text-align: justify;
}
.modal-body p { color: var(--text-secondary); }

/* === LETTRE === */
.letter-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 40px 48px;
  margin-bottom: 32px;
}
.letter-greeting { font-weight: 500; margin-bottom: 24px; color: var(--text-secondary); }
.letter-signature {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: right;
}
.letter-signature .sig-name { font-weight: 700; font-size: 1.1em; color: var(--text); }
.letter-signature .sig-first { font-weight: 400; color: var(--text-secondary); margin-top: 4px; }

/* Survol paragraphes lettre */
.letter-section p:not(.letter-greeting) {
  border-left: 2px solid transparent;
  padding-left: 0;
  border-radius: 0 4px 4px 0;
  cursor: default;
  transition: padding-left 0.22s ease, border-left-color 0.22s ease, background 0.22s ease;
}
.letter-section p:not(.letter-greeting):hover {
  border-left-color: var(--border);
  padding-left: 10px;
  background: rgba(0, 0, 0, 0.02);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  header { padding: 0 16px; }
  .header-left h2 { font-size: 0.85em; }
  .btn-quick-read, .btn-chatbot, .btn-important { font-size: 0.8em; padding: 5px 10px; }
  .header-sub { display: none; }
  main { padding: calc(var(--header-h) + 20px) 16px 40px; }
  .cards-grid { grid-template-columns: 1fr; }
  .cards-grid-3 { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .letter-section { padding: 24px 20px; }
  .chatbot-panel { width: calc(100vw - 24px); right: 12px; bottom: 72px; max-height: 65vh; }
  .nav-panel { width: calc(100vw - 24px); left: 12px; bottom: 72px; max-height: 65vh; }
  .btn-chatbot-fab { right: 16px; bottom: 20px; padding: 11px 16px 11px 13px; font-size: 0.82em; }
}

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .modal-card { padding: 20px; }
}

/* === LANDING — VIEW SELECTORS (index.html) === */
.landing-context {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.landing-ctx-tag {
  font-size: 0.77em;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
}
.landing-ctx-sep {
  color: var(--border);
  font-size: 0.85em;
  user-select: none;
}
/* S3 — Séparateur stylisé */
.landing-sep {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  font-size: 0.72em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-secondary);
  white-space: nowrap;
}
.landing-sep::before,
.landing-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
/* S2 — Animation d'entrée séquentielle */
@keyframes viewBtnIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.view-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.view-btn {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: 12px;
  padding: 22px 28px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  animation: viewBtnIn 0.35s ease both;
}
.view-btn:nth-child(2) { animation-delay: 0.08s; }
.view-btn:nth-child(3) { animation-delay: 0.16s; }
.view-btn:hover {
  border-color: var(--blue);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.10);
  transform: translateY(-2px);
}
.view-btn-num {
  font-size: 2em;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
  width: 48px;
  letter-spacing: -0.04em;
  transition: color 0.2s;
}
.view-btn:hover .view-btn-num {
  color: rgba(37, 99, 235, 0.22);
  transform: translateY(-2px);
}
.view-btn-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.view-btn-tag {
  font-size: 0.68em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--blue);
}
.view-btn-title {
  font-size: 1.05em;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.view-btn-desc {
  font-size: 0.84em;
  color: var(--text-secondary);
  line-height: 1.5;
}
.view-btn-arrow {
  font-size: 1.2em;
  color: var(--border);
  flex-shrink: 0;
  transition: transform 0.2s, color 0.2s;
}
.view-btn:hover .view-btn-arrow {
  color: var(--blue);
  transform: translateX(6px);
}
/* S1 — Compteur de ressources */
.view-btn-count {
  font-size: 0.71em;
  color: var(--text-secondary);
  opacity: 0.55;
  margin-top: 3px;
}

/* === VUE COLS P1 (vue_ecole, vue_tech) === */
.vue-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: start;
}
.vue-col {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.vue-col-label {
  padding: 8px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  font-size: 0.66em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-secondary);
}
.vue-col-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 14px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  transition: background 0.15s;
}
.vue-col-row:last-child { border-bottom: none; }
.vue-col-row:hover { background: var(--bg-secondary); }
.vue-col-row.finalized   { border-left-color: #1a7a3a; }
.vue-col-row.in-progress { border-left-color: #999; }
.vue-col-row.demo        { border-left-color: var(--blue); }
.vue-col-title {
  flex: 1;
  font-size: 0.87em;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  transition: color 0.15s;
}
.vue-col-row:hover .vue-col-title { color: var(--blue); }
.vue-col-status {
  font-size: 0.63em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  white-space: nowrap;
}
.vue-col-status.finalized   { color: #1a7a3a; }
.vue-col-status.in-progress { color: var(--text-secondary); }
.vue-col-status.demo        { color: var(--blue); }
.vue-col-arrow {
  font-size: 0.80em;
  color: var(--border);
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
}
.vue-col-row:hover .vue-col-arrow {
  color: var(--blue);
  transform: translateX(3px);
}
@media (max-width: 600px) {
  .vue-cols { grid-template-columns: 1fr; }
}

/* === VUE TABLE P3 (vue_rh, vue_ecole, vue_tech) === */
.vue-table {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 4px;
}
.vue-table-head {
  display: grid;
  grid-template-columns: 130px 1fr 100px 20px;
  padding: 7px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  font-size: 0.66em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-secondary);
}
.vue-table-row {
  display: grid;
  grid-template-columns: 130px 1fr 100px 20px;
  padding: 11px 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  align-items: center;
  transition: background 0.15s;
}
.vue-table-row:last-child { border-bottom: none; }
.vue-table-row:hover { background: var(--bg-secondary); }
.vue-table-cat {
  font-size: 0.71em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
}
.vue-table-title {
  font-size: 0.90em;
  font-weight: 500;
  color: var(--text);
  transition: color 0.15s;
}
.vue-table-row:hover .vue-table-title { color: var(--blue); }
.vue-table-status {
  font-size: 0.67em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vue-table-status.finalized  { color: #1a7a3a; }
.vue-table-status.in-progress { color: var(--text-secondary); }
.vue-table-status.demo        { color: var(--blue); }
.vue-table-arrow {
  font-size: 0.85em;
  color: var(--border);
  text-align: right;
  transition: color 0.15s, transform 0.15s;
}
.vue-table-row:hover .vue-table-arrow {
  color: var(--blue);
  transform: translateX(3px);
}
@media (max-width: 600px) {
  .vue-table-head { grid-template-columns: 1fr 90px 20px; }
  .vue-table-row  { grid-template-columns: 1fr 90px 20px; }
  .vue-table-cat  { display: none; }
}

/* === VUE CARDS (vue_rh, vue_ecole, vue_tech) === */
.vue-section-label {
  font-size: 0.72em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-secondary);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin: 32px 0 16px;
}
.vue-section-label:first-child { margin-top: 0; }
.vue-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.vue-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.vue-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 20px 16px;
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.vue-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--border);
  transition: background 0.2s;
}
.vue-card:hover {
  border-color: var(--text-secondary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
}
.vue-card:hover::before { background: var(--blue); }
.vue-card-cat {
  font-size: 0.67em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-secondary);
  margin-bottom: 7px;
  opacity: 0.65;
}
.vue-card-title {
  font-size: 0.97em;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 8px;
}
.vue-card-desc {
  font-size: 0.83em;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}
.vue-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.vue-card-status {
  font-size: 0.68em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vue-card-status.finalized { color: #1a7a3a; }
.vue-card-status.in-progress { color: var(--text-secondary); }
.vue-card-status.demo { color: var(--blue); }
.vue-card-arrow {
  font-size: 0.82em;
  color: var(--border);
  font-weight: 400;
  transition: transform 0.2s, color 0.2s;
  margin-left: auto;
}
.vue-card:hover .vue-card-arrow {
  transform: translateX(4px);
  color: var(--blue);
}

@media (max-width: 768px) {
  .vue-grid, .vue-grid-2 { grid-template-columns: 1fr; }
  .view-btn { gap: 16px; padding: 18px 20px; }
  .view-btn-num { font-size: 1.6em; width: 36px; }
  .landing-context { margin-bottom: 24px; padding-bottom: 18px; }
}

/* === PRINT === */
@media print {
  header, footer, .modal-overlay, .btn-quick-read, .btn-chatbot, .btn-chatbot-fab, .btn-important, .nav-dropdown, .chatbot-panel { display: none !important; }
  main { padding: 0; max-width: 100%; animation: none; }
  .accordion-content { max-height: none !important; overflow: visible !important; }
  .accordion-inner { border-top: none; }
}
