/* Design system macompta.fr — tokens repris de mc-kit-ui (couleurs, Inter, formes). */

@font-face { font-family: "Inter-Bold";     src: url("assets/fonts/Inter-Bold.woff2") format("woff2"); }
@font-face { font-family: "Inter-SemiBold"; src: url("assets/fonts/Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Inter-Medium";   src: url("assets/fonts/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter-Regular";  src: url("assets/fonts/Inter-Regular.woff2") format("woff2"); }

:root {
  /* _mc-colors.scss */
  --black: #1F2933;
  --black-02: #1F2937;
  --white: #FCFCFF;
  --primary: #E6197B;
  --primary-dark: #AC135C;          /* primary assombri (hover) */
  --primary-transparent-005: rgba(230, 25, 123, .05);
  --grey-light: #E9E9E9;
  --grey-medium: #CBD2D9;
  --grey-dark: #9AA5B1;
  --violet-extra-light: #F3F4FD;
  --violet-light: #F5F1FF;
  --blue-light: #E9EFFF;
  --success: #23992D;
  --error: #FF5D5D;

  --font-bold: "Inter-Bold", Helvetica, Arial, sans-serif;
  --font-semibold: "Inter-SemiBold", Helvetica, Arial, sans-serif;
  --font-medium: "Inter-Medium", Helvetica, Arial, sans-serif;
  --font-regular: "Inter-Regular", Helvetica, Arial, sans-serif;

  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-regular);
  font-size: 14px;
  color: var(--black);
  background: var(--white);
}

/* ---------- Vue connexion (calquée sur pro.macompta.fr) ---------- */

.vue_connexion { min-height: 100vh; background: #fff; }

.logo_connexion {
  display: flex;
  justify-content: center;
  margin-bottom: 60px;
}
.logo_connexion .img_logo {
  display: block;
  margin-top: 52px;
  max-width: 236px;
}

.container_form {
  max-width: 437px;
  margin: 0 auto 50px;
  padding: 0 16px;
}

.title_connexion_form {
  font-family: var(--font-bold);
  font-size: 20px;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 1px solid var(--primary);
  padding-bottom: 14px;
  margin-bottom: 24px;
  line-height: 1.35;
}

.aide {
  color: var(--grey-dark);
  text-align: center;
  margin-bottom: 24px;
}

/* ---------- Champs (McInput / McLabel) ---------- */

.mc_champ { margin-bottom: 16px; }
.mc_champ.ligne { display: flex; align-items: center; gap: 8px; margin-bottom: 0; }

.mc_label {
  display: inline-block;
  font-family: var(--font-semibold);
  font-size: 14px;
  margin-bottom: 5px;
}
.mc_champ.ligne .mc_label { margin-bottom: 0; }

.mc_input_wrapper {
  display: flex;
  align-items: center;
  border: 1px solid var(--grey-light);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--white);
  transition: border-color .2s ease-out;
}
.mc_input_wrapper:focus-within { border-color: var(--primary); }

.mc_input_wrapper input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  padding: 8px 0;
  font-family: var(--font-regular);
  font-size: 14px;
  color: var(--black);
}
.mc_input_wrapper input::placeholder { color: var(--grey-dark); font-style: italic; }

/* ---------- Boutons (McButton) ---------- */

.mc_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 50px;
  padding: 8px 14px;
  border: 0;
  border-radius: 5px;
  font-family: var(--font-medium);
  font-size: 14px;
  cursor: pointer;
  transition: background-color .15s linear;
}
.mc_button.primary { color: var(--white); background-color: var(--primary); }
.mc_button.primary:hover { background-color: var(--primary-dark); }
.mc_button.secondary {
  color: var(--primary);
  background-color: var(--white);
  border: 1px solid var(--primary);
}
.mc_button.secondary:hover { background-color: var(--primary-transparent-005); }
.mc_button:disabled {
  color: var(--grey-dark);
  background-color: var(--grey-medium);
  border: 0;
  cursor: default;
}
.mc_button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.mc_button.pleine_largeur { width: 100%; margin-top: 8px; }

/* ---------- Reprise de session dev (localhost) ---------- */

.dev_mario {
  margin-top: 24px;
  padding: 14px;
  border: 1px dashed var(--grey-medium);
  border-radius: 8px;
  background: var(--violet-extra-light);
}
.dev_mario summary {
  font-family: var(--font-semibold);
  font-size: 13px;
  color: var(--grey-dark);
  cursor: pointer;
}
.aide_dev { font-size: 12px; color: var(--grey-dark); margin: 10px 0; }
.aide_dev code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--grey-light);
  padding: 1px 4px;
  border-radius: 3px;
}
.dev_mario textarea {
  width: 100%;
  border: 1px solid var(--grey-light);
  border-radius: 8px;
  padding: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  resize: vertical;
  margin-bottom: 10px;
}
.dev_mario textarea:focus { outline: none; border-color: var(--primary); }

/* ---------- Vue dossiers ---------- */

#vue-dossiers { min-height: 100vh; background: var(--violet-extra-light); }

.entete_app {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  padding: 12px 24px;
  border-bottom: 1px solid var(--grey-light);
}
.logo_entete { height: 28px; }

.contenu {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

.titre_page {
  font-family: var(--font-semibold);
  font-size: 18px;
  margin-bottom: 18px;
}

.mc_card {
  background: var(--white);
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 1px 4px rgba(31, 41, 51, .08);
}

.barre_periode {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--grey-light);
}

.barre_recherche {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 12px 0 4px;
}

.mc_champ.recherche { margin-bottom: 0; flex: 1 1 320px; max-width: 420px; }

.compteur {
  font-family: var(--font-medium);
  font-size: 13px;
  color: var(--grey-dark);
  padding-bottom: 9px;
  white-space: nowrap;
}

/* ---------- Tableau (mc-table) ---------- */

.mc_table { width: 100%; border-collapse: collapse; }

.mc_table th {
  font-family: var(--font-semibold);
  font-size: 14px;
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--grey-medium);
}

.mc_table td {
  padding: 10px;
  border-bottom: 1px solid var(--grey-light);
  font-size: 14px;
}

.mc_table tbody tr { transition: background-color .15s linear; }
.mc_table tbody tr:hover { background-color: var(--violet-light); }
.mc_table .col_action { width: 160px; }
.mc_table td:last-child { text-align: right; }

.mc_table .col_select { width: 38px; }
.mc_table .col_select input,
.mc_table td:first-child input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  vertical-align: middle;
}
.mc_table tbody tr.selectionnee { background-color: var(--blue-light); }
.mc_table tbody tr.selectionnee:hover { background-color: var(--violet-light); }

/* ---------- Barre de sélection ---------- */

/* Barre de sélection flottante : reste visible en bas de l'écran même quand la
   liste des dossiers est très longue (jusqu'à ~1700 lignes). */
.barre_selection {
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  bottom: 16px;
  z-index: 5;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(31, 41, 51, .14);
}

/* Spinner du bouton pendant la génération */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: var(--white);
  border-radius: 50%;
  vertical-align: -2px;
  animation: mc_spin .6s linear infinite;
}
@keyframes mc_spin { to { transform: rotate(360deg); } }

.resume_selection {
  font-family: var(--font-semibold);
  font-size: 14px;
  margin-right: auto;
}

.mc_button.lien {
  color: var(--grey-dark);
  background: transparent;
  padding: 8px 4px;
  text-decoration: underline;
}
.mc_button.lien:hover { color: var(--black); background: transparent; }

.mc_table td.ligne_vide {
  text-align: center;
  color: var(--grey-dark);
  font-style: italic;
  padding: 22px 10px;
}
.mc_table tbody tr:has(.ligne_vide):hover { background-color: transparent; }

/* ---------- Messages ---------- */

.message { margin-top: 14px; font-family: var(--font-medium); }
.message.erreur { color: var(--error); }
.message.info { color: var(--success); }
