@import "../vendor/tom-select/dist/css/tom-select.default-FS08IxL.css";

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

/* BASE */
body {
  font-family: system-ui, sans-serif;
  background: #f5f5f5;
  color: #111;
}

h1, h2 {
    font-size: 1.7rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}



/* CONTAINER */
.container {
  padding: 11px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.head-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  flex-wrap: wrap;
}

.dashboard-card {
    background: #fff;
    border-radius: 14px;
    padding: 11px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    margin-bottom: 16px;
    width: 100%;
    max-width: 100%;

}

.logo-container {
  display: flex;
  justify-content: center;
}

.logo {
  height: 300px;
}

.rdv-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.rdv-title {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
}

.rdv-date {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.rdv-comment {
    margin: 0 0 14px;
    color: #4b5563;
    line-height: 1.4;
}

.rdv-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-family: system-ui, sans-serif;
    font-size: 1rem;
}

.btn-danger {
    border: none;
    background: #fee2e2;
    color: #b91c1c;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-family: system-ui, sans-serif;
    font-size: 0.8rem;
}

.btn-link {
    text-decoration: none;
    background: #eff6ff;
    color: #2563eb;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.8rem;
}

.tuile-user {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 15px;
}



.chart {
  position: relative;
  padding: 10px;
}

.chart canvas {
    max-height: 250px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.btn-form {
  margin-top: 15px;
}

form div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Recherche client */

.ts-wrapper {
    flex: 1;
    flex-direction: row;
}

.btn-quick-add {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 13px;
    background: transparent;
    border: 1px dashed #185FA5;
    color: #185FA5;
    border-radius: 6px;
    cursor: pointer;
}
.btn-quick-add:hover { background: #E6F1FB; }

#client-modal .client-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
}
#client-modal .client-modal-box {
    background: #fff; border-radius: 10px;
    padding: 1.5rem; width: 340px;
    display: flex; flex-direction: column; gap: 10px;
}
#client-modal h3 { margin: 0; font-size: 15px; }
#client-modal label {
    display: flex; flex-direction: column;
    font-size: 12px; color: #666; gap: 3px;
}
#client-modal input { padding: 7px 10px; border: 1px solid #ccc; border-radius: 6px; }
.client-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
#cm-cancel { background: transparent; border: 1px solid #ccc; border-radius: 6px; padding: 6px 14px; cursor: pointer; }
#cm-submit { background: #185FA5; color: #fff; border: none; border-radius: 6px; padding: 6px 14px; cursor: pointer; font-weight: 500; }

/* HEADER */
.header {
  background: #548a9b;
  color: white;
}

/* INNER */
.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
}

/* LOGO */
.header__logo {
  font-weight: bold;
  font-size: 18px;
}

/* BURGER */
.header__toggle {
  background: none;
  border: none;
  font-size: 22px;
  color: white;
  cursor: pointer;
}

/* NAV MOBILE */
.nav {
  display: none;
  flex-direction: column;
  background: #548a9b;
}

.nav a {
  padding: 14px 16px;
  text-decoration: none;
  color: white;
  border-top: 1px solid #2d4e58;
}

.nav a:hover {
  color: #ce6e1a;
}

/* ACTIVE */
.nav.active {
  display: flex;
}

/* ---------------------------------- */


/* ── Wrapper page ── */
.renovea-form-wrapper {
  min-height: 100vh;
  background: #f0f2f4;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lien-admin {
  margin-bottom: 20px;
}

/* ── Card ── */
.card-group {
  display: flex;
  justify-content: center;
  gap: 25px;
  width: 100%;
}

.card-line {
  flex-direction: row !important;
}

.card {
  width: 100%;
  max-width: 560px;
  background: #ffffff;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 32px;
}

.card-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
}

.card-header h1 {
  font-size: 20px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.card-header p {
  font-size: 13px;
  color: #6b6b6b;
}

/* ── Grille du formulaire ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  grid-column: 1 / -1;
}

/* ── Labels ── */
.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #6b6b6b;
}

/* ── Séparateurs de section ── */
.section-label {
  font-size: 11px;
  font-weight: 500;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  grid-column: 1 / -1;
  margin-top: 4px;
}

/* ── Champs ── */
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a1a;
  background: #ffffff;
  border: 0.5px solid rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #4a7d8f;
  box-shadow: 0 0 0 3px rgba(74, 125, 143, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #bbb;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

/* ── Select custom arrow ── */
.select-wrap {
  position: relative;
}

.select-wrap select {
  padding-right: 32px;
  cursor: pointer;
}

.select-wrap::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #aaa;
  pointer-events: none;
}

/* ── Badges statut ── */
.status-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 0.5px solid rgba(0, 0, 0, 0.15);
  background: #f5f5f5;
  color: #6b6b6b;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.badge:hover {
  border-color: #4a7d8f;
  color: #4a7d8f;
}

.badge.selected {
  background: rgba(74, 125, 143, 0.1);
  border-color: #4a7d8f;
  color: #4a7d8f;
}

/* ── Actions ── */
.form-actions {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 0.5px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: space-between;
  width: 100%;
  grid-column: 1 / -1;
}

.btn-secondary {
  padding: 9px 18px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  color: #ffffff;
  background: transparent;
  border: 0.5px solid rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  flex: 1;
}

.btn-secondary:hover {
  background: #f5f5f5;
}

.btn-primary {
  padding: 9px 22px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  color: #ffffff;
  background: #4a7d8f;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  flex: 1;
}

.btn-primary:hover {
  background: #3d6b7a;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  text-align: center;
  padding: 9px 22px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  color: #ffffff;
  background: #adadad;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-secondary:hover {
  background: rgb(129, 129, 129);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: #f9f9f9;
    border: 0.5px solid rgba(0,0,0,0.1);
    border-radius: 8px;
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    display: block;
}

.toggle-hint {
    font-size: 12px;
    color: #aaa;
    display: block;
    margin-top: 2px;
}

/* Cache le checkbox natif */
.toggle-input {
    display: none !important;
}

/* Track */
.toggle-track {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ddd;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    border: none !important;
    box-shadow: none !important;
}

/* Thumb */
.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* État coché */
.toggle-input:checked + .toggle-track {
    background: #4a7d8f;
}

.toggle-input:checked + .toggle-track .toggle-thumb {
    transform: translateX(20px);
}

/* ---------------------------------------- */

.flash-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
}

.flash {
    position: relative;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.flash-success { background: #ecfdf5; color: #065f46; border-left: 4px solid #10b981; }
.flash-error   { background: #fef2f2; color: #991b1b; border-left: 4px solid #ef4444; }
.flash-warning { background: #fffbeb; color: #92400e; border-left: 4px solid #f59e0b; }
.flash-info    { background: #eff6ff; color: #1e40af; border-left: 4px solid #3b82f6; }

.flash-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: currentColor;
    opacity: 0.3;
    animation: progress 4s linear forwards;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); max-height: 100px; margin: 0; }
    to   { opacity: 0; transform: translateX(40px); max-height: 0; }
}

@keyframes progress {
    from { width: 100%; }
    to   { width: 0%; }
}

.flash.hiding {
    animation: slideOut 0.4s ease forwards;
}

/* ---------------------------------------- */

/* DESKTOP */
@media (min-width: 768px) {

  .header__toggle {
    display: none;
  }

  .nav {
    display: flex !important;
    flex-direction: row;
    justify-content: center;
  }

  .nav a {
    border: none;
  }

}

@media (max-width: 900px) {
  .card-group {
    flex-direction: column;
  }

  .chartAnnuel {
    height: 250px !important;
  }
}

@media (max-width: 400px) {
    .dataTables_wrapper {
      width: 100% !important;
      overflow-x: hidden !important;
    }

    table#table {
        width: 100% !important;
    }

  
}