/* ---------------------------- */
/* PALETTE SOBASO PRO */
:root {
    --orange: #FF6B00;
    --orange-dark: #e65c00;
    --blue: #0066CC;
    --blue-dark: #004a99;
    --gray-light: #f9f9f9;
    --gray-medium: #777;
    --gray-dark: #222;
    --white: #fff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --border-radius: 8px;
    --transition: 0.25s ease;
}

/* ---------------------------- */
/* GLOBAL */
body {
    margin: 0;
    padding: 0;
    font-family: "Arial", sans-serif;
    background-color: var(--gray-light);
    color: var(--gray-dark);
}

.container {
    max-width: 1200px;
    margin: 20px auto 20px auto;
    background: var(--white);
    padding: 10px;
    border-radius: var(--border-radius);
    box-shadow: 0px 4px 12px rgba(0,0,0,0.08);
    border-top: 5px solid var(--orange);
}

.lucide.lucide-refresh-cw-icon.lucide-refresh-cw {
  padding-right: 6px;
}

.icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

span {
  display: flex;
  align-items: anchor-center;
  gap: 3px;
}

/* TITRE */
h1 {
    color: var(--blue);
    font-size: 26px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

/* SECTION */
.section-title {
    color: var(--orange);
    font-size: 18px;
    margin: 20px 0 10px;
    font-weight: bold;
}

/* CARTE DEMANDE */
.admin-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 18px 22px;
    margin-bottom: 18px;
    border-left: 6px solid var(--blue);
    box-shadow: 0px 2px 8px rgba(0,0,0,0.08);
    transition: transform .2s ease;
}
.admin-card:hover {
    transform: translateY(-1px);
    box-shadow: 0px 4px 12px rgba(0,0,0,0.12);
}

/* CONTENU CARTE */
.admin-card .client-name {
    font-size: 17px;
    font-weight: bold;
    color: var(--blue);
}
.admin-card .client-info {
    font-size: 15px;
    margin-top: 6px;
    color: var(--gray-dark);
}

/* BADGES */
.badge {
	display: inline-block;
	padding: 3px 10px;
	font-size: 12px;
	font-weight: bold;
	border-radius: 12px;
	text-transform: uppercase;
	color: #fff;
	margin-left: 8px;
}

.badge.pending    { background: var(--warning); }
.badge.validated  { background: var(--blue); }
.badge.assigned   { background: var(--blue-dark); }
.badge.en_route   { background: var(--orange); }
.badge.done       { background: var(--success); }
.badge.cancelled  { background: var(--danger); }
.badge.urgent     { background: var(--danger); float: right;}


/* FORM D’ATTRIBUTION */
.admin-card form {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-card select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    flex: 1;
    font-size: 14px;
}

.admin-card button {
    padding: 10px 14px;
    border: none;
    background: var(--orange);
    color: #fff;
    font-weight: bold;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background var(--transition);
}
.admin-card button:hover {
    background: var(--orange-dark);
}

/* RESPONSIVE */
@media (max-width: 720px) {
    .admin-card form {
        flex-direction: column;
    }
}

/* CALENDRIER / AGENDA */
.calendar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.calendar-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 6px solid var(--blue);
    transition: transform 0.2s ease;
}

.calendar-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.calendar-card.urgent {
    border-left: 6px solid var(--danger);
}

.calendar-time {
    font-weight: bold;
    color: var(--gray-dark);
    margin-bottom: 5px;
}

.calendar-client {
    font-size: 14px;
    color: var(--gray-dark);
    margin-bottom: 8px;
}

.calendar-card form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.calendar-card select {
    padding: 8px;
    border-radius: var(--border-radius);
    border: 1px solid #ccc;
    flex: 1;
}

.calendar-card button {
    padding: 8px 12px;
    background: var(--orange);
    color: #fff;
    font-weight: bold;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
}

.calendar-card button:hover {
    background: var(--orange-dark);
}

.calendar-card label {
    padding: 8px 8px;
}

.time {
    padding: 2px 2px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	border-radius: 6px;
	border: none;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.date-filter input[type="date"] {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.date-filter button,
.btn-reset {
    padding: 8px 12px;
    background: var(--blue);
    color: #fff;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
}

.btn-reset {
    background: var(--gray-medium);
}

.intervention {
	width: 100%;
}

.slot {
    padding: 8px 12px;
    margin: 3px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    cursor: pointer;
}

.slot:hover:not(.occupied) {
    background: var(--success);
}

.slot.selected {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.slot.occupied {
    background: #eee;
    color: #999;
    cursor: not-allowed;
}

.choix_tec {
	padding: 8px;
	border-radius: var(--border-radius);
	border: 1px solid #ccc;
}

.global-map { width: 100%; height: 300px; border-radius: 10px; margin-bottom: 20px; border: 1px solid #ddd; overflow: hidden; }

.card-wrapper { margin-bottom: 15px; border-radius: 10px; overflow: hidden; border: 1px solid #e1e4e8; }
.card-main { padding: 18px; display: flex; justify-content: space-between; align-items: center; background: #fff; cursor: pointer; }

.urgent-active { background: #fffafa !important; border-right: 5px solid #e74c3c; }

.map-container { display: none; height: 300px; background: #eee; border-top: 1px solid #ddd; }
.map-container iframe { width: 100%; height: 100%; border: 0; }

.service-type { background: #ebf2ff; color: #0056b3; padding: 3px 10px; border-radius: 20px; font-size: 0.75em; font-weight: bold; border: 1px solid #d0e1ff; }

.stats-box { background: #f8f9fa; padding: 10px 15px; border-radius: 8px; font-size: 0.85em; margin-top: 10px; border: 1px solid #eee; display: block; width: fit-content; }
.stats-row { display: flex; margin-bottom: 5px; align-items: anchor-center; gap: 5px;}

/* Style Post-it compact */
    .stats-box2 {
        max-height: 0;
        overflow: hidden;
        transition: all 0.4s ease-in-out;
        opacity: 0;
        font-size: 0.85em; /* Un peu plus petit pour le côté compact */
        line-height: 1.1;  /* Interligne réduit */
        white-space: pre-wrap;
    }

    .stats-box2.open {
        max-height: 800px;
        opacity: 1;
        margin-top: 8px;
        padding: 12px;
        background: #fef9c3; /* Jaune Post-it */
        border: 1px solid #fde047;
        border-left: 4px solid #eab308; /* Bordure d'accentuation */
        border-radius: 4px;
        color: #713f12; /* Texte marron foncé pour le contraste sur jaune */
    }

    /* Supprime les espaces vides excessifs à l'affichage */
    .stats-box2 br {
        content: "";
        display: block;
        margin-bottom: 2px; /* Contrôle l'espace entre les lignes */
    }

    .btn-notes-toggle {
        background: #f1f5f9;
        color: #475569;
        border: 1px solid #e2e8f0;
        padding: 4px 10px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 0.75rem;
        font-weight: 600;
        margin-top: 8px;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

.form-update { display: flex; gap: 10px; align-items: center; }
select, input { padding: 9px; border: 1px solid #ddd; border-radius: 6px; }
.btn-ok { background: #27ae60; color: white; border: none; padding: 10px 18px; border-radius: 6px; cursor: pointer; font-weight: bold; }

/* Fleches de navigation entre jours, autour du champ date -- meme
   modele que technician/index.php. */
.date-nav-btn {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px;
    background: #f0f2f5; color: var(--blue); text-decoration: none;
    font-size: 18px; font-weight: 700;
}
.date-nav-btn:hover { background: #e2e6ec; }

/* .btn-filter n'avait jamais ete style nulle part -- utilisait
   l'apparence par defaut (grisatre, plate) du navigateur, d'ou le
   flagrant contraste avec les autres boutons deja bien integres du
   tableau de bord (ex: .btn-ok, .btn-toggle-mode). */
.btn-filter {
    background: var(--blue); color: #fff; border: none;
    padding: 9px 18px; border-radius: 6px; cursor: pointer; font-weight: 700;
    font-size: 13.5px; transition: background .15s ease;
}
.btn-filter:hover { background: var(--blue-dark); }