/* FormateurPro — feuille de style de base (sortie de index.html, correctif audit § 3). */
/* FormateurPro — feuille de style autonome, version UX conforme */

/* Reset de base */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0f172a;
  color: #111827;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#root {
  height: 100vh;
}

/* Champs de formulaire */
input, select, textarea, button {
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
}

button {
  font-family: inherit;
}

/* Boutons : retour visuel au survol */
button {
  transition: filter 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

button:hover:not(:disabled) {
  filter: brightness(0.97);
}

button:active:not(:disabled) {
  filter: brightness(0.93);
}

button:disabled {
  cursor: not-allowed;
}

/* Liens */
a {
  color: #3b82f6;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Barres de défilement discrètes */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.7);
}



/* Couche UX conformité : focus visible, badges, responsive de base */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #F59E0B;
  outline-offset: 2px;
}
@media (max-width: 920px) {
  #root { height: auto; min-height: 100vh; }
  body { overflow-x: hidden; }
}

/* Images responsives par défaut */
img {
  max-width: 100%;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: auto;
}

/* Confort de lecture des titres */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
}


/* === FormateurPro UX 2026 V2 : accessibilité, responsive et feedback === */
:root {
  --fp-touch: 42px;
  --fp-text-min: 13px;
}
button, [role="button"] { min-height: 36px; }
.fp-app-shell { min-width: 0; }
.fp-sidebar { min-width: 0; }
.fp-sidebar-nav { min-height: 0; }
.fp-side-nav-button {
  width: calc(100% - 12px);
  border: 0;
  text-align: left;
  font-family: inherit;
}
.fp-side-nav-button:focus-visible { outline-offset: -2px; }
.fp-main-column, .fp-main-scroll { min-width: 0; }
.fp-topbar { min-width: 0; }
.fp-global-search { min-width: 180px; }
.fp-mobile-only { display: none; }
#fp-toast-region {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 100000;
  display: grid;
  gap: 10px;
  max-width: min(420px, calc(100vw - 36px));
  pointer-events: none;
}
.fp-toast {
  pointer-events: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 5px solid #0B63F6;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(15,23,42,.20);
  padding: 12px 14px;
  color: #1f2937;
  font-size: 13.5px;
  line-height: 1.45;
  animation: fpToastIn .18s ease-out;
}
.fp-toast[data-type="success"] { border-left-color: #16a34a; }
.fp-toast[data-type="error"] { border-left-color: #dc2626; }
.fp-toast[data-type="warning"] { border-left-color: #d97706; }
@keyframes fpToastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 980px) {
  .fp-sidebar { width: 82px !important; padding-left: 0 !important; padding-right: 0 !important; }
  .fp-sidebar .fp-brand-text, .fp-sidebar .fp-nav-label, .fp-sidebar .fp-sidebar-footer-text { display: none !important; }
  .fp-side-nav-button { justify-content: center !important; padding-left: 12px !important; padding-right: 12px !important; margin-right: 6px !important; }
  .fp-topbar { padding-left: 16px !important; padding-right: 16px !important; }
  .fp-global-search { max-width: 280px !important; width: min(38vw, 280px) !important; }
  .fp-main-scroll { padding: 18px !important; }
}

@media (max-width: 720px) {
  #root { min-height: 100vh; height: auto; }
  .fp-app-shell { flex-direction: column !important; height: auto !important; min-height: 100vh; overflow: visible !important; }
  .fp-sidebar {
    width: 100% !important;
    height: auto !important;
    padding: 8px 0 !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-direction: row !important;
    align-items: center;
  }
  .fp-sidebar-brand { padding: 0 10px !important; flex: 0 0 auto; }
  .fp-sidebar .fp-brand-text { display: none !important; }
  .fp-sidebar-nav { display: flex !important; flex: 1; overflow-x: auto !important; overflow-y: hidden !important; gap: 4px; padding: 0 4px; scrollbar-width: thin; }
  .fp-side-nav-button {
    width: auto !important;
    flex: 0 0 auto;
    min-width: 48px;
    min-height: 44px;
    justify-content: center !important;
    border-radius: 10px !important;
    margin: 0 !important;
    padding: 8px 11px !important;
  }
  .fp-sidebar .fp-nav-label { display: none !important; }
  .fp-sidebar-footer { display: none !important; }
  .fp-main-column { overflow: visible !important; }
  .fp-topbar { position: sticky; top: 60px; z-index: 900; flex-wrap: wrap !important; gap: 8px !important; padding: 10px 12px !important; }
  .fp-global-search { order: 10; width: 100% !important; max-width: none !important; flex-basis: 100% !important; min-height: var(--fp-touch); }
  .fp-main-scroll { overflow: visible !important; padding: 14px !important; }
  .fp-hide-mobile { display: none !important; }
  .fp-mobile-only { display: inline-flex !important; }
}

@media (max-width: 520px) {
  .fp-main-scroll { padding: 10px !important; }
  input, select, textarea { font-size: 16px !important; } /* évite le zoom automatique iOS */
  .fp-toast { font-size: 14px; }
}

/* Aide vidéo intégrée */
#fp-video-help-btn{position:fixed;right:22px;bottom:22px;z-index:10050;border:0;border-radius:999px;background:#0B63F6;color:#fff;padding:13px 18px;font:700 14px/1.2 "Segoe UI",sans-serif;box-shadow:0 10px 30px rgba(15,37,68,.28);cursor:pointer}
    #fp-video-help-btn:hover{filter:brightness(.96)}
    #fp-video-help-modal{position:fixed;inset:0;z-index:10100;display:none;align-items:center;justify-content:center;background:rgba(15,37,68,.78);padding:24px}
    #fp-video-help-modal.fp-open{display:flex}
    #fp-video-help-card{width:min(1100px,96vw);background:#fff;border-radius:18px;overflow:hidden;box-shadow:0 25px 70px rgba(0,0,0,.38)}
    #fp-video-help-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;background:#B9472F;color:#fff}
    #fp-video-help-head strong{font:800 17px/1.2 "Segoe UI",sans-serif}
    #fp-video-help-close{border:0;background:#fff;color:#0F2544;width:36px;height:36px;border-radius:50%;font-size:22px;cursor:pointer}
    #fp-video-help-card video{display:block;width:100%;max-height:75vh;background:#000}
    #fp-video-help-foot{padding:10px 18px 14px;color:#64748b;font:500 12.5px/1.4 "Segoe UI",sans-serif}
    @media(max-width:720px){#fp-video-help-btn{right:12px;bottom:12px;padding:12px 15px}#fp-video-help-modal{padding:10px}}
