/* =========================================================
   JCOM Studio / JCOM Projects — index.css (COMPLET)
   Style "Startup moderne" : bleu tech + accent or
   Compatible avec tes anciens modules (tables, modales, etc.)
========================================================= */

/* -------------------------
   🎨 Variables (Thème)
-------------------------- */
:root{
  --bg: #0b1020;            /* fond profond */
  --surface: #111a33;       /* surface principale */
  --surface-2: #0f1730;     /* surface secondaire */
  --text: #e9eefc;          /* texte */
  --muted: #b7c0de;         /* texte secondaire */
  --line: rgba(255,255,255,.10);

  --primary: #2563eb;       /* bleu */
  --primary-2: #1d4ed8;
  --accent: #f5c542;        /* or */

  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* -------------------------
   🌐 Base / Reset léger
-------------------------- */
*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(37,99,235,.25), transparent 60%),
    radial-gradient(1000px 500px at 90% 10%, rgba(245,197,66,.18), transparent 60%),
    var(--bg);
  color: var(--text);
}

#app{
  padding: 24px;
}

/* -------------------------
   🔗 Liens
-------------------------- */
a{
  color: #9ec5ff;
  text-decoration: none;
}
a:hover{ text-decoration: underline; }

/* -------------------------
   🧭 Header (dans les modules)
-------------------------- */
header{
  background: linear-gradient(135deg, rgba(37,99,235,.18), rgba(245,197,66,.10));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

h1{
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: .4px;
  color: var(--text);
}

header .tagline{
  margin-top: 8px;
  color: var(--muted);
  font-size: .95rem;
}

/* -------------------------
   ✅ Titres
-------------------------- */
h2, h3{
  margin-top: 0;
  color: var(--text);
}
h2{ font-size: 1.4rem; }
h3{ font-size: 1.1rem; color: var(--muted); }

/* -------------------------
   🧭 Navigation (onglets/buttons)
-------------------------- */
nav{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

nav button{
  flex: 0 0 auto;
  padding: 10px 14px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

nav button:hover{
  background: rgba(37,99,235,.18);
  border-color: rgba(37,99,235,.35);
  transform: translateY(-1px);
}

nav button.active{
  background: linear-gradient(135deg, rgba(37,99,235,.35), rgba(37,99,235,.18));
  border-color: rgba(37,99,235,.55);
  color: var(--text);
  box-shadow: 0 10px 20px rgba(37,99,235,.15);
}

/* Nav liens (si ton navigateur.html utilise <a>) */
nav a{
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
}
nav a:hover{
  background: rgba(37,99,235,.18);
}

/* -------------------------
   🟦 Modules (conteneurs)
-------------------------- */
.module_about,
.module_studio,
.module_consulting,
.module_formations,
.module_home,
.module_suivi,
.module_checklist,
.module_pt,
.module_simulateur,
.module_notation,
.module_admin{
  max-width: 1100px;
  margin: 18px auto;
  padding: 0;
}

/* Zone de contenu injectée */
#contenu_about,
#contenu_studio,
#contenu_consulting,
#contenu_formations,
#contenu_home,
#contenu_suivi,
#contenu_checklist{
  margin-top: 14px;
  padding: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* -------------------------
   🔘 Boutons (global)
-------------------------- */
button{
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

button:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37,99,235,.22);
}

button:disabled{
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Bouton "secondaire" si tu veux */
.btn-secondary{
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
}

/* -------------------------
   🧾 Formulaires
-------------------------- */
fieldset{
  margin-bottom: 16px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}

legend{
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  color: var(--muted);
}

label{
  display: block;
  margin-top: 10px;
  font-weight: 650;
  color: var(--muted);
}

input, textarea, select{
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(17,26,51,.75);
  color: var(--text);
  outline: none;
}

input::placeholder, textarea::placeholder{
  color: rgba(233,238,252,.45);
}

input:focus, textarea:focus, select:focus{
  border-color: rgba(37,99,235,.65);
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}

/* Range */
input[type="range"]{
  width: 100%;
  accent-color: var(--primary);
}

/* -------------------------
   🧩 Messages
-------------------------- */
.message{
  margin-top: 10px;
  font-weight: 700;
}
.message.success{ color: #34d399; }
.message.error{ color: #fb7185; }

/* Zone info (ancien style conservé mais modernisé) */
.zone-info{
  background: rgba(37,99,235,.10);
  border-left: 4px solid var(--accent);
  padding: 10px 12px;
  margin-top: 10px;
  font-size: .95rem;
  color: var(--text);
  border-radius: 10px;
}

/* -------------------------
   📊 Tableaux (modernisés)
-------------------------- */
table{
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  color: var(--text);
  background: rgba(255,255,255,.02);
  border-radius: 12px;
  overflow: hidden;
}

thead{
  background: rgba(37,99,235,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
}

td, th{
  border: 1px solid rgba(255,255,255,.10);
  padding: 10px;
}

tbody tr:nth-child(odd){ background: rgba(255,255,255,.02); }
tbody tr:hover{ background: rgba(37,99,235,.08); }

/* -------------------------
   📊 Tables larges & longues
-------------------------- */
.table-wrapper{
  position: relative;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 70vh;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  box-shadow: var(--shadow);
  display: block;
  max-width: 100%;
}

/* force scroll si très large */
.table-wrapper > table{
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

/* entêtes collantes */
.table-wrapper > table thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(37,99,235,.18);
}

/* 2e ligne sticky si double thead */
.table-wrapper > table thead tr:nth-child(2) th{
  position: sticky;
  top: 42px;
  z-index: 1;
  background: rgba(37,99,235,.10);
}

/* sticky first col option */
.table-wrapper > table.tbl--sticky-first th:first-child,
.table-wrapper > table.tbl--sticky-first td:first-child{
  position: sticky;
  left: 0;
  background: rgba(17,26,51,.95);
  z-index: 3;
  box-shadow: 2px 0 0 rgba(255,255,255,.08);
}

/* compacité */
.table-wrapper > table.tbl--compact th,
.table-wrapper > table.tbl--compact td{
  padding: 8px 10px;
}

/* align numérique */
.table-wrapper td[data-type="number"],
.table-wrapper th[data-type="number"],
.table-wrapper .cell-num{
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* cell clip */
.table-wrapper .cell-clip{
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* scrollbar (facultatif) */
.table-wrapper::-webkit-scrollbar{ height: 10px; width: 12px; }
.table-wrapper::-webkit-scrollbar-thumb{ background: rgba(158,197,255,.35); border-radius: 8px; }
.table-wrapper::-webkit-scrollbar-track{ background: rgba(255,255,255,.06); }

/* -------------------------
   🪟 Modale (unique)
-------------------------- */
.modal{
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content{
  background: rgba(17,26,51,.96);
  padding: 20px;
  border-radius: var(--radius);
  width: 90%;
  height: 90%;
  max-width: 1100px;
  max-height: 90vh;
  overflow: auto;
  position: relative;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
}

.modal .close{
  position: absolute;
  top: 10px; right: 15px;
  font-size: 24px;
  font-weight: bold;
  color: rgba(233,238,252,.75);
  cursor: pointer;
}

.modal .close:hover{
  color: #fff;
}

/* -------------------------
   🧱 Layout utilitaires (anciens)
-------------------------- */
.filtres{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.filtres label{ font-weight: 700; }

.ligne-filtres{
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.bloc-filtre{
  display: flex;
  flex-direction: column;
  min-width: 150px;
}

/* -------------------------
   🌳 Arborescence / Tree
-------------------------- */
.tree, .tree ul{
  list-style-type: none;
  padding-left: 20px;
  margin: 0;
}

.tree li{
  cursor: pointer;
  position: relative;
  padding-left: 20px;
  line-height: 1.5;
  transition: background-color .2s ease;
  border-radius: 10px;
}

.tree li:hover{
  background-color: rgba(255,255,255,.06);
}

.tree li::before{
  content: "▶";
  position: absolute;
  left: 0;
  transition: transform .2s ease;
  color: rgba(233,238,252,.70);
}

.tree li.expanded::before{
  transform: rotate(90deg);
}

.tree ul{ display: none; }
.tree li.expanded > ul{ display: block; }

/* -------------------------
   🔐 Indicateurs mot de passe
-------------------------- */
#indicateursMdp{
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  font-size: .95rem;
}

#indicateursMdp li{
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  font-weight: 600;
}

#indicateursMdp li::before{
  content: "⚪";
  display: inline-block;
  width: 1.2em;
  margin-right: .5em;
  color: rgba(233,238,252,.45);
}

#indicateursMdp li.valide::before{
  content: "✅";
  color: #34d399;
}

#indicateursMdp li.invalide::before{
  content: "❌";
  color: #fb7185;
}

/* -------------------------
   ✅ Checkbox layouts
-------------------------- */
#checkboxAnnees,
#checkboxImpots{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1rem;
  align-items: center;
}

#checkboxAnnees label{
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
}

#modeAnneesRadios{
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 1rem;
}

/* -------------------------
   📆 Calendrier (style)
-------------------------- */
#conteneurCalendrier{
  width: 100%;
  margin: 1rem auto;
  border-collapse: collapse;
}

.mois-ligne{
  border-bottom: 1px solid rgba(255,255,255,.10);
  padding: .5rem 0;
}

.mois-ligne h4{
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
}

.evenement{
  margin-left: 1rem;
  font-size: .95rem;
  color: rgba(233,238,252,.75);
}

/* -------------------------
   🎮 Logo (optionnel)
-------------------------- */
.logo-jcom{
  height: 44px;
  width: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 20px rgba(0,0,0,.35);
}

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

/* Empêche fieldset de casser le scroll interne */
fieldset.panel{ overflow: hidden; }

/* -------------------------
   🧾 Footer
-------------------------- */
footer{
  text-align: center;
  padding: 16px;
  color: rgba(233,238,252,.70);
  font-size: .9rem;
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 18px;
}

/* -------------------------
   📱 Responsive
-------------------------- */
@media (max-width: 768px){
  #app{ padding: 14px; }
  nav{ gap: 8px; }
  nav button{ width: 100%; }
}


/* =========================================================
   Sidebar (navigateur.html) — JCOM Startup
========================================================= */

.sidebar{
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 260px;
  padding: 18px;
  background: rgba(17,26,51,.92);
  border-right: 1px solid rgba(255,255,255,.10);
  box-shadow: 10px 0 30px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 999;
}

.sidebar-top{ display: flex; flex-direction: column; gap: 12px; }

.brand{
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(135deg, rgba(37,99,235,.20), rgba(245,197,66,.10));
}

.brand-logo{
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 20px rgba(0,0,0,.35);
}

.brand-text{ line-height: 1.1; }
.brand-name{
  font-weight: 800;
  letter-spacing: .3px;
  color: var(--text);
}
.brand-tagline{
  font-size: .80rem;
  color: rgba(233,238,252,.75);
  margin-top: 4px;
}

.sidebar-title{
  margin: 0;
  margin-top: 6px;
  font-size: .95rem;
  font-weight: 800;
  color: rgba(233,238,252,.75);
  text-transform: uppercase;
  letter-spacing: .12em;
}

.sidebar-links{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-links li{ margin: 0; }

.sidebar-links a{
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(233,238,252,.85);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  font-weight: 650;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.sidebar-links a:hover{
  background: rgba(37,99,235,.18);
  border-color: rgba(37,99,235,.40);
  transform: translateY(-1px);
}

.sidebar-links a.active{
  background: linear-gradient(135deg, rgba(37,99,235,.35), rgba(37,99,235,.16));
  border-color: rgba(37,99,235,.55);
  color: var(--text);
  box-shadow: 0 10px 22px rgba(37,99,235,.15);
}

.sidebar-bottom{
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.10);
}

.user-info{
  font-size: .9rem;
  color: rgba(233,238,252,.75);
}

.user-info strong{
  display: block;
  color: var(--text);
  margin-bottom: 6px;
}

.user-info a{
  color: #9ec5ff;
  font-weight: 700;
}

/* ✅ Contenu à droite de la sidebar */
body{
  padding-left: 260px;
}

/* ✅ Responsive : sidebar devient topbar */
@media (max-width: 900px){
  body{ padding-left: 0; padding-top: 78px; }

  .sidebar{
    width: 100%;
    height: 78px;
    bottom: auto;
    padding: 10px 12px;
    flex-direction: row;
    align-items: center;
  }

  .sidebar-title{ display: none; }
  .sidebar-links{
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .sidebar-links a{
    white-space: nowrap;
    padding: 8px 10px;
  }

  .sidebar-bottom{ display: none; }

  .brand{
    padding: 8px 10px;
    border-radius: 14px;
  }
  .brand-logo{ width: 60px; height: 40px; }
  .brand-tagline{ display: none; }
}

/* =========================
   JCOM Splash (Home About)
   ========================= */
.jcom-splash{
  margin-top: 14px;
  border-radius: 16px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(0,51,102,0.10), rgba(175,162,72,0.10));
  border: 1px solid rgba(0,0,0,0.06);
}

.jcom-splash__inner{
  max-width: 980px;
  margin: 0 auto;
}

.jcom-splash__brand{
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.jcom-splash__logo{
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 14px;
  background: white;
  padding: 8px;
  border: 1px solid rgba(0,0,0,0.06);
}

.jcom-splash__title{
  margin: 0;
  font-size: 1.8rem;
  color: #003366;
}

.jcom-splash__tagline{
  margin: 4px 0 0;
  color: #6b6b6b;
  font-weight: 600;
}

.jcom-splash__desc{
  margin: 12px 0 16px;
  color: #2c2c2c;
  line-height: 1.6;
}

.jcom-splash__cta{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.btn-primary{
  background: #003366;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary:hover{
  opacity: 0.92;
}

.btn-ghost{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0,51,102,0.25);
  color: #003366;
  text-decoration: none;
  font-weight: 700;
  background: rgba(255,255,255,0.6);
}

.btn-ghost:hover{
  background: rgba(255,255,255,0.9);
}

.jcom-splash__chips{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip{
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,0,0,0.06);
  font-weight: 600;
  color: #003366;
}

/* responsive */
@media (max-width: 520px){
  .jcom-splash{ padding: 16px; }
  .jcom-splash__brand{ align-items: flex-start; }
  .jcom-splash__title{ font-size: 1.5rem; }
}

/* =========================
   Animations JCOM Splash
   ========================= */

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

@keyframes logoPop {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  60% {
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floatSoft {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}

/* Activation animations */

.jcom-splash {
  animation: fadeInUp 0.8s ease-out;
}

.jcom-splash__logo {
  animation: logoPop 0.8s ease-out forwards,
             floatSoft 4s ease-in-out infinite;
}

.jcom-splash__title,
.jcom-splash__tagline,
.jcom-splash__desc,
.jcom-splash__cta,
.jcom-splash__chips {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.jcom-splash__title { animation-delay: 0.2s; }
.jcom-splash__tagline { animation-delay: 0.3s; }
.jcom-splash__desc { animation-delay: 0.4s; }
.jcom-splash__cta { animation-delay: 0.5s; }
.jcom-splash__chips { animation-delay: 0.6s; }

/* Animation bouton */
.btn-primary {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 51, 102, 0.25);
}

.about-section {
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.7;
}

.about-section h2 {
  color: #003366;
  margin-bottom: 10px;
}

.about-section h3 {
  margin-top: 25px;
  color: #afa248;
}

.about-section ul {
  padding-left: 20px;
}

.about-highlight {
  margin-top: 25px;
  padding: 15px;
  background: rgba(0, 51, 102, 0.08);
  border-left: 4px solid #003366;
  font-weight: 600;
}

.game-image {
  width: 180px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}
