/* =====================================================================
   HABILLAGE A — 01/11/2026 (registre n° 36)
   Affichage seul : aucune fonction modifiée. Actif uniquement sous
   .atis-a (classe posée sur <div class="wrapper"> dans Layout.js).
   Retour arrière : apply-habillage.sh --rollback <sauvegarde>.
   ===================================================================== */

/* ---------- Fond, police ---------- */
.atis-a,
.atis-a > section.section-container,
.atis-a .content-wrapper {
  background: #F3F5F8 !important;
  color: #1F2A37;
}
.atis-a .content-wrapper { border-top: 0 !important; }

/* ---------- Barre du haut : blanche, onglets ---------- */
.atis-a .topnavbar {
  background: #fff !important;
  background-image: none !important;
  border-top: 3px solid #23B7E5 !important;
  border-bottom: 1px solid #E3E8EE !important;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}
.atis-a .topnavbar .navbar-header { background: #fff !important; background-image: none !important; }
.atis-a .topnavbar .navbar-nav > li > a,
.atis-a .topnavbar .navbar-nav > .open > a {
  color: #3B4A5A !important;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: color .15s, background-color .15s, border-color .15s;
}
.atis-a .topnavbar .navbar-nav > li > a:hover,
.atis-a .topnavbar .navbar-nav > li > a:focus { color: #0B6E99 !important; background: #F3F9FC !important; }
.atis-a .topnavbar .navbar-nav > li.active > a,
.atis-a .topnavbar .navbar-nav > li.active > a:hover,
.atis-a .topnavbar .navbar-nav > li.active > a:focus {
  color: #0B6E99 !important;
  background: transparent !important;
  border-bottom-color: #23B7E5;
}
.atis-a .topnavbar i.fa { color: inherit; font-size: 18px; vertical-align: -1px; }
.atis-a .topnavbar .text-nav { font-size: 15px; text-transform: none; font-weight: 600; vertical-align: baseline; margin-left: 6px; }
.atis-a .topnavbar .navbar-nav > li > a .fa-user-circle { font-size: 26px; color: #0B6E99; }

/* boutons Demandes reçues / Maintenance / Relevés (styles en ligne d'origine neutralisés) */
.atis-a .topnavbar .navbar-nav > li > a > span[style] {
  background: transparent !important;
  color: inherit !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  animation: none !important;
}
.atis-a .topnavbar .navbar-nav > li > a > span[style] > span[style] {
  display: inline-block;
  min-width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  padding: 0 6px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  background: #FFF1E0 !important;
  color: #A84A00 !important;
  margin-left: 6px !important;
}
/* pastille Demandes reçues : orange plein + pulsation conservée (alerte) */
.atis-a .topnavbar .navbar-nav > li > a[href="/__recues/"] > span[style] > span[style] {
  background: #C2410C !important;
  color: #fff !important;
  animation: atisPulse 1.6s ease-in-out infinite !important;
}

/* bouton Planning (admin) */
.atis-a .topnavbar .navbar-nav > li.atis-planning > a {
  margin: 9px 6px 0;
  padding: 9px 16px !important;
  border-radius: 8px;
  border-bottom: 0;
  background: #0B73A0 !important;
  color: #fff !important;
}
.atis-a .topnavbar .navbar-nav > li.atis-planning > a:hover,
.atis-a .topnavbar .navbar-nav > li.atis-planning > a:focus { background: #084F6E !important; color: #fff !important; }

/* écrans moyens (768–1200 px) : menu plus serré pour tenir sur une ligne */
@media (min-width: 768px) and (max-width: 1200px) {
  .atis-a .topnavbar .navbar-nav > li > a { padding-left: 8px; padding-right: 8px; }
  .atis-a .topnavbar .text-nav { font-size: 14px; margin-left: 4px; }
  .atis-a .topnavbar .navbar-nav > li.atis-planning > a { padding: 9px 12px !important; }
}

/* menu replié (téléphone) */
.atis-a .topnavbar .navbar-toggle { border-color: #CBD3DC; }
.atis-a .topnavbar .navbar-toggle .icon-bar { background-color: #3B4A5A !important; }
.atis-a .topnavbar .navbar-collapse { background: #fff; border-top-color: #E3E8EE; }
.atis-a .atis-recues-xs { background: #F3F5F8 !important; color: #3B4A5A !important; }
.atis-a .atis-recues-xs.actif { background: #C2410C !important; color: #fff !important; }
.atis-a .atis-planning-xs {
  float: right; margin: 8px 6px 0 0; padding: 6px 10px; border-radius: 6px;
  background: #0B73A0; color: #fff !important; font-weight: 600; text-decoration: none !important; white-space: nowrap;
  font-size: 0; line-height: 1;
}
.atis-a .atis-planning-xs .fa { font-size: 18px; }

/* ---------- Titres, fil d'Ariane ---------- */
.atis-a .content-heading {
  background: transparent !important;
  border: 0 !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  color: #14324A !important;
  padding: 20px 15px 12px !important;
}
.atis-a .breadcrumb { background: transparent; padding: 14px 0 6px; font-size: 14px; }
.atis-a .breadcrumb > li > a { color: #0B6E99; font-weight: 600; }
.atis-a .breadcrumb > .active { color: #5B6878; }

/* ---------- Boutons ---------- */
.atis-a .btn { border-radius: 8px; font-weight: 600; }
.atis-a .btn-primary { background: #0B73A0; border-color: #0B73A0; color: #fff; }
.atis-a .btn-primary:hover, .atis-a .btn-primary:focus { background: #084F6E; border-color: #084F6E; color: #fff; }
.atis-a .btn-success { background: #fff; border-color: #CBD3DC; color: #1F2A37; }
.atis-a .btn-success:hover, .atis-a .btn-success:focus { background: #EAF2F8; border-color: #9FB4C6; color: #0B6E99; }
.atis-a .btn-warning { background: #fff; border-color: #E8A15C; color: #A84A00; }
.atis-a .btn-warning:hover, .atis-a .btn-warning:focus { background: #FFF1E0; border-color: #D98A3F; color: #8A3D00; }
.atis-a .btn-danger { background: #fff; border-color: #E4A3A3; color: #B42318; }
.atis-a .btn-danger:hover, .atis-a .btn-danger:focus { background: #FDECEC; border-color: #D47F7F; color: #8E1B12; }
.atis-a .btn-labeled .btn-label { background: transparent !important; border-radius: 8px 0 0 8px; }
.atis-a .content-wrapper > .row .col-sm-3 > a.btn-primary { background: #fff; border-color: #CBD3DC; color: #1F2A37; }
.atis-a .content-wrapper > .row .col-sm-3 > a.btn-primary:hover { background: #EAF2F8; color: #0B6E99; }

/* ---------- Champs ---------- */
.atis-a .form-control { border-color: #CBD3DC; border-radius: 8px; color: #1F2A37; }
.atis-a .form-control:focus { border-color: #23B7E5; box-shadow: 0 0 0 3px rgba(35, 183, 229, .18); }
.atis-a .input-group-addon { background: #fff; border-color: #CBD3DC; color: #5B6878; font-weight: 600; }
.atis-a .input-group-addon:first-child { border-radius: 8px 0 0 8px; }
.atis-a .input-group .form-control { border-radius: 0; }
.atis-a .input-group-btn:last-child > .btn { border-radius: 0 8px 8px 0; margin-left: 8px; }

/* barre des dates (liste) + ligne des interrupteurs : cartes blanches */
.atis-a .content-wrapper > .inline.form-group.row {
  background: #fff; border: 1px solid #E3E8EE; border-radius: 12px 12px 0 0;
  margin: 0 !important; padding: 14px 4px 0;
}
.atis-a .content-wrapper > .inline.form-group.row + .row {
  background: #fff; border: 1px solid #E3E8EE; border-top: 0; border-radius: 0 0 12px 12px;
  margin: 0 0 16px !important; padding: 4px 4px 14px !important;
  display: flex; align-items: center; flex-wrap: wrap; color: #3B4A5A; font-weight: 600;
}
.atis-a .content-wrapper > .inline.form-group.row + .row > [class*="col-"] { float: none; }
.atis-a .content-wrapper > .inline.form-group.row + .row > .col-sm-3:last-child {
  width: auto; flex: 1 0 auto; display: flex; justify-content: flex-end; align-items: center; gap: 8px;
  flex-wrap: nowrap; white-space: nowrap;
}
.atis-a .content-wrapper > .inline.form-group.row + .row > .col-sm-3:last-child > .btn { margin-right: 0 !important; }

/* interrupteurs rc-switch */
.atis-a .rc-switch { background: #CBD3DC; border-color: #CBD3DC; vertical-align: middle; margin-left: 6px; }
.atis-a .rc-switch-checked { background: #0B73A0; border-color: #0B73A0; }
/* interrupteurs du tableau (label.switch) */
.atis-a .switch input:checked + em { background-color: #0B73A0 !important; border-color: #0B73A0 !important; }

/* ---------- Tableau des interventions ---------- */
.atis-a .ReactTable {
  background: #fff; border: 1px solid #E3E8EE !important; border-radius: 12px; overflow: hidden;
  font-size: 14px; color: #1F2A37;
}
.atis-a .ReactTable .rt-thead.-header { box-shadow: none !important; background: #fff; }
.atis-a .ReactTable .rt-thead .rt-th {
  border-right: 0 !important; padding: 12px 8px 8px !important;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5B6878;
}
.atis-a .ReactTable .rt-thead .rt-th.-sort-asc { box-shadow: inset 0 3px 0 0 #23B7E5 !important; }
.atis-a .ReactTable .rt-thead .rt-th.-sort-desc { box-shadow: inset 0 -3px 0 0 #23B7E5 !important; }
.atis-a .ReactTable .rt-thead.-filters { border-bottom: 1px solid #E3E8EE !important; }
.atis-a .ReactTable .rt-thead.-filters .rt-th { padding: 0 8px 10px !important; }
.atis-a .ReactTable .rt-thead.-filters input,
.atis-a .ReactTable .rt-thead.-filters select {
  height: 32px; border: 1px solid #CBD3DC !important; border-radius: 6px !important; background: #fff; font-size: 13px; padding: 0 6px;
}
.atis-a .ReactTable .rt-tbody .rt-tr-group { border-bottom: 1px solid #EEF1F5 !important; }
.atis-a .ReactTable .rt-tbody .rt-td { border-right: 0 !important; padding: 11px 8px !important; }
.atis-a .ReactTable.-striped .rt-tr.-odd { background: #fff !important; }
.atis-a .ReactTable.-striped .rt-tr.-even { background: #FAFBFC !important; }
.atis-a .ReactTable.-highlight .rt-tbody .rt-tr:not(.-padRow):hover { background: #F2F8FC !important; }
.atis-a .ReactTable .rt-tbody .rt-td:first-child { font-weight: 700; color: #0B6E99; }
.atis-a .ReactTable .rt-tbody .rt-td .fa-list-alt,
.atis-a .ReactTable .rt-tbody .rt-td .fa-trash,
.atis-a .ReactTable .rt-tbody .rt-td .fa-history,
.atis-a .ReactTable .rt-tbody .rt-td .fa-paperclip,
.atis-a .ReactTable .rt-tbody .rt-td .fa-reply { font-size: 17px; color: #5B6878; padding: 4px; border-radius: 6px; }
.atis-a .ReactTable .rt-tbody .rt-td a:hover .fa-list-alt { color: #0B6E99; background: #EAF2F8; }
.atis-a .ReactTable .rt-tbody .rt-td .fa-trash:hover { color: #B42318; background: #FDECEC; }
.atis-a .ReactTable .rt-tbody .rt-td .fa-list-alt { color: #0B73A0; }
/* pagination */
.atis-a .ReactTable .-pagination { border-top: 1px solid #E3E8EE !important; box-shadow: none !important; padding: 8px 12px; }
.atis-a .ReactTable .-pagination .-btn { background: #fff; border: 1px solid #CBD3DC; border-radius: 8px; color: #1F2A37; font-weight: 600; height: 38px; }
.atis-a .ReactTable .-pagination .-btn:not([disabled]):hover { background: #EAF2F8; color: #0B6E99; }
.atis-a .ReactTable .-pagination .-btn[disabled] { color: #8A96A3; opacity: 1; }
.atis-a .ReactTable .-pagination input,
.atis-a .ReactTable .-pagination select { border: 1px solid #CBD3DC; border-radius: 6px; height: 34px; }

/* ---------- Statuts : pastilles ---------- */
.atis-a .label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 12px; font-size: 12px !important; font-weight: 600; line-height: 1.2;
}
.atis-a .label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.atis-a .label-warning { background: #FFF1E0; color: #A84A00; }
.atis-a .label-primary { background: #E1EFFC; color: #1557A6; }
.atis-a .label-success { background: #DFF5E6; color: #17733A; }
.atis-a .label-danger  { background: #FDECEC; color: #B42318; }
.atis-a .label-info    { background: #E1F4FA; color: #0B6E99; }
.atis-a .label-default { background: #EEF1F5; color: #3B4A5A; }

/* ---------- Fiche d'une demande ---------- */
.atis-a .atis-fiche-tete { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.atis-a .atis-fiche-tete h1 { margin: 0; font-size: 26px; font-weight: 700; color: #14324A; }
.atis-a .atis-fiche-tete .atis-fiche-titre { flex-basis: 100%; margin: 0; font-size: 16px; color: #3B4A5A; }
.atis-a .atis-fiche-tete .atis-fiche-plan { font-size: 14px; color: #5B6878; }
.atis-a .atis-fiche-tete .label { font-size: 13px !important; }
/* cartes de la frise (styles en ligne d'origine adoucis) */
.atis-a .content-wrapper div[style*="box-shadow"][style*="189, 59, 54"],
.atis-a .content-wrapper div[style*="rgb(189, 59, 54)"] {
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05) !important;
  border: 1px solid #E3E8EE !important;
  border-radius: 12px !important;
  overflow: hidden;
  background: #fff;
}
.atis-a .content-wrapper div[style*="background-color: rgb(255, 144, 43)"] { background-color: #FFF6EC !important; color: #A84A00 !important; border-bottom: 1px solid #F5DEC4; }
.atis-a .content-wrapper div[style*="background-color: rgb(93, 156, 236)"] { background-color: #EEF5FD !important; color: #1557A6 !important; border-bottom: 1px solid #D3E4F8; }
.atis-a .content-wrapper div[style*="background-color: rgb(39, 194, 76)"] { background-color: #ECF8F0 !important; color: #17733A !important; border-bottom: 1px solid #CDEBD7; }
.atis-a .content-wrapper div[style*="background-color: rgb(240, 80, 80)"] { background-color: #FDECEC !important; color: #B42318 !important; border-bottom: 1px solid #F5CFCF; }

.atis-a .content-wrapper div[style*="rgb(189, 59, 54)"] p,
.atis-a .content-wrapper div[style*="rgb(189, 59, 54)"] div { font-size: 14px; line-height: 1.5; }

/* ---------- Paramètres : cartes et onglets ---------- */
.atis-a .panel { border-radius: 10px; overflow: hidden; border-color: #E3E8EE; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.atis-a .panel-primary { border-color: #D3E4F8; }
.atis-a .panel-primary > .panel-heading { background: #EEF5FD !important; color: #14324A !important; border-color: #D3E4F8 !important; font-weight: 700; }
.atis-a .panel-primary > .panel-heading .fa { color: #5B6878; }
.atis-a .btn-info { background: #fff; border-color: #9FC3E0; color: #0B6E99; }
.atis-a .btn-info:hover, .atis-a .btn-info:focus { background: #EAF2F8; border-color: #0B73A0; color: #084F6E; }
.atis-a .nav-tabs > li > a { color: #3B4A5A; font-weight: 600; border-radius: 8px 8px 0 0; }
.atis-a .nav-tabs > li.active > a,
.atis-a .nav-tabs > li.active > a:hover,
.atis-a .nav-tabs > li.active > a:focus { color: #0B6E99; background: #fff !important; border-color: #E3E8EE #E3E8EE #fff; box-shadow: inset 0 3px 0 #23B7E5; }

/* ---------- Pied de page ---------- */
.atis-a footer { background: transparent !important; border-top: 0 !important; color: #5B6878; }

/* =====================================================================
   iPhone (≤ 768 px) : chaque ligne du tableau devient une carte.
   Toutes les colonnes et tous les filtres restent présents ;
   en-têtes conservés (tri au toucher).
   ===================================================================== */
@media (max-width: 768px) {
  .atis-a .content-heading { padding: 14px 8px 8px !important; font-size: 22px !important; }
  .atis-a .content-wrapper > .inline.form-group.row,
  .atis-a .content-wrapper > .inline.form-group.row + .row { border-radius: 12px; margin-bottom: 10px !important; }

  html body .atis-a .ReactTable { border: 0 !important; background: transparent; border-radius: 0; overflow: visible; }
  html body .atis-a .ReactTable .rt-table { overflow: visible !important; }
  html body .atis-a .ReactTable .rt-thead,
  html body .atis-a .ReactTable .rt-tbody { min-width: 0 !important; width: 100% !important; }

  /* en-têtes = pastilles de tri */
  html body .atis-a .ReactTable .rt-thead.-header .rt-tr { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 8px; }
  html body .atis-a .ReactTable .rt-thead.-header .rt-th {
    flex: 0 0 auto !important; width: auto !important; max-width: none !important; min-width: 0 !important;
    padding: 6px 10px !important; background: #fff; border: 1px solid #E3E8EE !important; border-radius: 14px;
    font-size: 11px !important;
  }
  html body .atis-a .ReactTable .rt-thead.-header .rt-th:empty,
  html body .atis-a .ReactTable .rt-thead.-header .rt-th.atis-col-fiche,
  html body .atis-a .ReactTable .rt-thead.-header .rt-th.atis-col-act,
  html body .atis-a .ReactTable .rt-thead.-header .rt-th:not([class*="atis-col-"]),
  html body .atis-a .ReactTable .rt-thead.-header .rt-th .rt-resizer { display: none !important; }

  /* filtres empilés */
  html body .atis-a .ReactTable .rt-thead.-filters { border: 0 !important; }
  html body .atis-a .ReactTable .rt-thead.-filters .rt-tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-bottom: 10px; }
  html body .atis-a .ReactTable .rt-thead.-filters .rt-th {
    width: auto !important; max-width: none !important; min-width: 0 !important; flex: none !important; padding: 0 !important; overflow: visible;
  }
  html body .atis-a .ReactTable .rt-thead.-filters .rt-th:empty { display: none !important; }
  html body .atis-a .ReactTable .rt-thead.-filters .rt-th::before {
    display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5B6878; margin: 0 0 3px 2px; text-align: left;
  }
  html body .atis-a .ReactTable .rt-thead.-filters .rt-th.atis-col-num::before    { content: "Numéro"; }
  html body .atis-a .ReactTable .rt-thead.-filters .rt-th.atis-col-client::before { content: "Client"; }
  html body .atis-a .ReactTable .rt-thead.-filters .rt-th.atis-col-site::before   { content: "Site"; }
  html body .atis-a .ReactTable .rt-thead.-filters .rt-th.atis-col-interv::before { content: "Intervenant"; }
  html body .atis-a .ReactTable .rt-thead.-filters .rt-th.atis-col-statut::before { content: "Statut"; }
  html body .atis-a .ReactTable .rt-thead.-filters input,
  html body .atis-a .ReactTable .rt-thead.-filters select { height: 40px; font-size: 15px; width: 100%; }

  /* lignes = cartes */
  html body .atis-a .ReactTable .rt-tbody { overflow: visible !important; }
  html body .atis-a .ReactTable .rt-tbody .rt-tr-group { border: 0 !important; margin-bottom: 8px; flex: 0 0 auto; }
  html body .atis-a .ReactTable .rt-tbody .rt-tr {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas:
      "num   client  statut fiche"
      "titre titre   titre  titre"
      "site  site    interv act"
      "cree  planif  planif act";
    column-gap: 10px; row-gap: 2px;
    background: #fff !important; border: 1px solid #E3E8EE; border-radius: 12px; padding: 10px 12px;
  }
  html body .atis-a .ReactTable .rt-tbody .rt-td {
    display: block !important; width: auto !important; max-width: none !important; min-width: 0 !important; flex: none !important;
    padding: 0 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px !important;
  }
  html body .atis-a .ReactTable .rt-tbody .rt-td > div { text-align: left !important; }
  html body .atis-a .ReactTable .rt-tbody .rt-td.atis-col-num    { grid-area: num; font-size: 15px !important; }
  html body .atis-a .ReactTable .rt-tbody .rt-td.atis-col-client { grid-area: client; font-weight: 600; color: #3B4A5A; }
  html body .atis-a .ReactTable .rt-tbody .rt-td.atis-col-statut { grid-area: statut; }
  html body .atis-a .ReactTable .rt-tbody .rt-td.atis-col-fiche  { grid-area: fiche; }
  html body .atis-a .ReactTable .rt-tbody .rt-td.atis-col-titre  { grid-area: titre; font-weight: 600; font-size: 15px !important; padding: 2px 0 !important; }
  html body .atis-a .ReactTable .rt-tbody .rt-td.atis-col-site   { grid-area: site; color: #5B6878; }
  html body .atis-a .ReactTable .rt-tbody .rt-td.atis-col-interv { grid-area: interv; color: #3B4A5A; }
  html body .atis-a .ReactTable .rt-tbody .rt-td.atis-col-act    { grid-area: act; align-self: center; }
  html body .atis-a .ReactTable .rt-tbody .rt-td.atis-col-cree   { grid-area: cree; color: #5B6878; font-size: 13px !important; }
  html body .atis-a .ReactTable .rt-tbody .rt-td.atis-col-planif { grid-area: planif; color: #5B6878; font-size: 13px !important; }
  html body .atis-a .ReactTable .rt-tbody .rt-td.atis-col-cree > div:not(:empty)::before { content: "Créée le "; }
  html body .atis-a .ReactTable .rt-tbody .rt-td.atis-col-planif > div:not(:empty)::before { content: "· planifiée le "; }
  html body .atis-a .ReactTable .rt-tbody .rt-td.atis-col-appel,
  html body .atis-a .ReactTable .rt-tbody .rt-td.atis-col-facture { display: none !important; }
  html body .atis-a .ReactTable .rt-tbody .rt-tr.-padRow { display: none !important; }
  html body .atis-a .ReactTable .rt-tbody .rt-td:not([class*="atis-col-"]) { display: none !important; }
}
