/* ==========================================================
   ADMIN-GUIDE
   Design institutionnel, sobre et responsive
   Feuille de style principale
   ========================================================== */

/* 1. VARIABLES ET BASE
   ---------------------------------------------------------- */

:root {
    --primary-color: #304554;
    --primary-dark: #243744;
    --primary-light: #e9eef1;

    --accent-color: #984b43;
    --accent-hover: #7f3d37;
    --accent-light: #f7ece9;

    --success-color: #526b5b;
    --success-light: #eaf1ec;

    --warning-color: #936a2d;
    --warning-light: #f8f0e1;

    --danger-color: #a44343;
    --danger-light: #f8eaea;

    --info-color: #426b85;
    --info-light: #eaf1f5;

    --background-color: #f3f2ee;
    --card-bg: #ffffff;
    --surface-muted: #f7f7f4;

    --text-color: #29383f;
    --muted-color: #6f7c80;
    --border-color: #dedfd9;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --shadow-sm: 0 2px 6px rgba(36, 55, 68, 0.05);
    --shadow-md: 0 5px 16px rgba(36, 55, 68, 0.07);

    --transition: 0.18s ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    background: var(--background-color);
    color: var(--text-color);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

a {
    color: var(--primary-color);
}

img {
    max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary-dark);
    line-height: 1.3;
}

h1 {
    font-size: 30px;
}

h2 {
    font-size: 23px;
}

h3 {
    font-size: 18px;
}

h1 i,
h2 i,
h3 i {
    margin-right: 8px;
}

p {
    overflow-wrap: anywhere;
}

::selection {
    background: #dce5e9;
    color: var(--primary-dark);
}

:focus-visible {
    outline: 3px solid rgba(66, 107, 133, 0.4);
    outline-offset: 2px;
}

.muted {
    color: var(--muted-color);
}

/* 2. NAVIGATION PRINCIPALE
   ---------------------------------------------------------- */

.navbar {
    min-height: 76px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 4%;
    gap: 28px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    color: var(--primary-dark);
    text-decoration: none;
}

.brand-icon {
    font-size: 30px;
}

.brand strong {
    display: block;
    font-size: 20px;
    line-height: 1.3;
}

.brand small {
    display: block;
    color: var(--muted-color);
    font-size: 11px;
}

.navbar nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
}

.navbar nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 27px 0 25px;
    border-bottom: 2px solid transparent;
    color: #53656e;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--transition), border-color var(--transition);
}

.navbar nav a:hover,
.navbar nav a.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.navbar nav a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.nav-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.icon-btn,
.profile-btn,
.menu-btn {
    border: 0;
    background: transparent;
    color: var(--primary-color);
}

.icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.icon-btn>i {
    font-size: 20px;
}

.icon-btn:hover {
    background: var(--surface-muted);
}

.icon-btn:hover>i {
    color: var(--accent-color);
}

.icon-btn b {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    font-weight: 600;
}

.profile-btn:hover {
    background: var(--surface-muted);
}

.profile-btn .fa-chevron-down {
    margin-left: 2px;
    font-size: 11px;
}

.avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 700;
}

.menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    font-size: 22px;
}

.menu-btn:hover {
    background: var(--surface-muted);
}

.profile-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 210px;
    padding: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 1000;
}

.profile-menu.show {
    display: block;
}

.profile-menu button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-color);
    text-align: left;
}

.profile-menu button:hover {
    background: var(--surface-muted);
}

.profile-menu hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 6px 0;
}

/* 3. CONTENEURS ET TITRES
   ---------------------------------------------------------- */

.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 30px 4% 55px;
}

.page-title {
    margin-bottom: 25px;
}

.page-title h1 {
    margin-top: 0;
    margin-bottom: 5px;
}

.section-head,
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 38px 0 18px;
}

.section-head h2,
.section-header h2 {
    margin: 0;
    font-size: 23px;
}

.link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-color);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.link i {
    font-size: 13px;
}

/* 4. ACCUEIL ET BANNIÈRE
   ---------------------------------------------------------- */

.hero {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 300px;
    padding: 42px;
    overflow: hidden;
    border: 1px solid #dce2e3;
    border-radius: var(--radius-lg);
    background: #e9eeec;
}

.hero:after {
    content: "🏛️";
    position: absolute;
    right: 5%;
    bottom: -20px;
    font-size: 160px;
    opacity: 0.08;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 820px;
}

.eyebrow {
    color: var(--accent-color);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 8px 0 18px;
    color: var(--primary-dark);
    font-size: clamp(30px, 3.2vw, 42px);
    line-height: 1.15;
}

.hero p {
    color: #5f6f74;
    font-size: 16px;
    line-height: 1.7;
}

/* 5. BOUTONS
   ---------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 17px;
    border: 1px solid var(--accent-color);
    border-radius: var(--radius-sm);
    background: var(--accent-color);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition);
}

.btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn i {
    margin: 0;
    font-size: 14px;
}

.btn.secondary {
    background: #fff;
    border-color: #cfd5d5;
    color: var(--primary-color);
}

.btn.secondary:hover {
    background: var(--surface-muted);
    border-color: #aeb9bb;
}

.btn.danger {
    background: var(--danger-light);
    border-color: #e8c9c9;
    color: var(--danger-color);
}

.btn.danger:hover {
    background: #f1dada;
}

.btn-secondary {
    background: #f0f1ee;
    border-color: #d8dad5;
    color: var(--primary-color);
}

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

/* 6. RECHERCHE
   ---------------------------------------------------------- */

.search,
.search-box {
    display: flex;
    gap: 8px;
    margin: 24px 0 15px;
    padding: 6px;
    border: 1px solid #d5dcdd;
    border-radius: var(--radius-md);
    background: #fff;
}

.search input,
.search-box input {
    flex: 1;
    min-width: 0;
    padding: 13px;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text-color);
    font-size: 15px;
}

.search button,
.search-box button {
    flex-shrink: 0;
    padding: 12px 19px;
    border: 1px solid var(--accent-color);
    border-radius: var(--radius-sm);
    background: var(--accent-color);
    color: #fff;
    font-weight: 700;
}

.search button:hover,
.search-box button:hover {
    background: var(--accent-hover);
}

.search-simple {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #cfd7d8;
    border-radius: var(--radius-sm);
    outline: none;
    background: #fff;
    color: var(--text-color);
}

.search-simple:focus {
    border-color: var(--primary-color);
}

.search-simple-wrapper {
    position: relative;
}

.search-simple-wrapper>i {
    position: absolute;
    top: 50%;
    left: 15px;
    z-index: 1;
    color: var(--muted-color);
    font-size: 14px;
    transform: translateY(-50%);
}

.search-simple-wrapper .search-simple {
    padding-left: 40px;
}

/* 7. CARTES ET GRILLES
   ---------------------------------------------------------- */

.grid,
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
}

.service-card {
    min-height: 180px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.service-card:hover {
    border-color: #c5cecf;
    box-shadow: var(--shadow-md);
}

.service-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #dbe2e2;
    border-radius: var(--radius-md);
    background: #eef1ef;
    color: var(--primary-color);
    font-size: 23px;
}

.service-icon i {
    margin: 0;
}

.service-card h3 {
    margin: 15px 0 6px;
}

.service-card p {
    font-size: 14px;
    line-height: 1.6;
}

.stat>i {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 23px;
}

.stats,
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 25px;
}

.stat {
    padding: 21px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
}

.stat strong {
    display: block;
    margin-top: 7px;
    color: var(--primary-dark);
    font-size: 28px;
}

.dashboard-card {
    padding: 25px;
    text-align: center;
}

.dashboard-card h3 {
    margin: 15px 0 10px;
}

.dashboard-number {
    margin-top: 10px;
    color: var(--primary-dark);
    font-size: 32px;
    font-weight: 700;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.dashboard-services,
.dashboard-status,
.dashboard-chart {
    margin-top: 28px;
}

.service-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.service-stat:last-child {
    border-bottom: 0;
}

.service-stat strong {
    font-size: 20px;
}

.chart-container {
    position: relative;
    height: 350px;
    margin-top: 20px;
}

.layout-two {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 22px;
}

/* 8. ASSISTANT IA ET CONVERSATION
   ---------------------------------------------------------- */

.chat {
    max-width: 900px;
    margin: 0 auto;
}

.chat-box {
    min-height: 480px;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: #fff;
}

.msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 15px 0;
}

.msg.user {
    justify-content: flex-end;
}

.bubble {
    max-width: 78%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.bot .bubble {
    background: #f4f5f2;
    border-color: #e2e4df;
}

.user .bubble {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.bot-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-color);
}

.bot-icon i {
    font-size: 18px;
}

.recommendation {
    margin: 12px 0;
    padding: 17px;
    border: 1px solid #d7dfdf;
    border-radius: var(--radius-md);
    background: #fbfbf9;
}

.recommendation h3 {
    margin-top: 0;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--success-color);
}

.check i {
    color: var(--success-color);
    font-size: 14px;
}

.chat-input {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.chat-input input {
    flex: 1;
    min-width: 0;
    padding: 13px;
    border: 1px solid #cfd7d8;
    border-radius: var(--radius-sm);
    outline: none;
}

.chat-input input:focus {
    border-color: var(--primary-color);
}

/* 9. DEMANDES ET LISTES
   ---------------------------------------------------------- */

.list {
    display: grid;
    gap: 14px;
}

.row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.request {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.request-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    padding: 19px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
}

.request-card-content {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.request-card-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    color: var(--primary-color);
    font-size: 20px;
}

.request-card-info {
    min-width: 0;
}

.request-card-info h3 {
    margin: 0 0 5px;
}

.request-card-info p {
    margin: 4px 0;
}

.request-date {
    font-size: 13px;
    color: var(--muted-color);
}

.request-date i {
    margin-right: 5px;
}

.request-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.request-card-actions .btn {
    white-space: nowrap;
}

/* 10. STATUTS
   ---------------------------------------------------------- */

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}

.status.pending {
    background: var(--warning-light);
    border-color: #ead9b9;
    color: #80591e;
}

.status.ok {
    background: var(--success-light);
    border-color: #d2e2d6;
    color: #42624d;
}

.status.refused {
    background: var(--danger-light);
    border-color: #eccfcf;
    color: #983d3d;
}

.status.done {
    background: #e9eef0;
    border-color: #d4dfe2;
    color: #405d6c;
}

/* Menus de statut dans l'administration */

.admin-demande-status,
.admin-rendezvous-status,
.status-select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 9px 10px;
    border: 1px solid #cfd7d8;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-color);
    font-size: 13px;
    cursor: pointer;
}

.admin-demande-status:focus,
.admin-rendezvous-status:focus,
.status-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(48, 69, 84, 0.12);
}

.admin-demande-status.pending,
.admin-rendezvous-status.pending {
    background-color: #f8f0e1;
    color: #80591e;
}

.admin-demande-status.ok,
.admin-rendezvous-status.ok,
.admin-demande-status.done,
.admin-rendezvous-status.done {
    background-color: #eaf1ec;
    color: #42624d;
}

.admin-demande-status.refused,
.admin-rendezvous-status.refused {
    background-color: #f8eaea;
    color: #983d3d;
}

.admin-demande-status.info,
.admin-rendezvous-status.info {
    background-color: #eaf1f5;
    color: #365d76;
}

.status-select-group {
    margin-top: 20px;
}

.status-select-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.status-select-group label i {
    margin-right: 6px;
}

.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.status-select {
    min-height: 46px;
    padding: 0 40px 0 13px;
    font-size: 14px;
    font-weight: 600;
    appearance: none;
    -webkit-appearance: none;
}

.status-select:hover {
    border-color: #aeb9bb;
}

.select-arrow {
    position: absolute;
    top: 50%;
    right: 14px;
    color: var(--muted-color);
    font-size: 13px;
    pointer-events: none;
    transform: translateY(-50%);
}

/* 11. RENDEZ-VOUS ET CALENDRIER
   ---------------------------------------------------------- */

.appointment-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    padding: 19px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
}

.appointment-card-content {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.appointment-card-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    color: var(--primary-color);
    font-size: 20px;
}

.appointment-card-info h3 {
    margin: 0 0 5px;
}

.appointment-card-info p {
    margin: 6px 0;
}

.appointment-date {
    display: flex;
    align-items: center;
    gap: 8px;
}

.appointment-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.appointment-card-actions .btn {
    white-space: nowrap;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 7px;
    margin-top: 15px;
}

.day {
    padding: 9px 4px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
    text-align: center;
}

.day.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.slots {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.slot {
    padding: 9px 13px;
    border: 1px solid #cbd4d6;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--primary-color);
}

.slot:hover {
    background: var(--surface-muted);
}

.slot.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* 12. FORMULAIRES GÉNÉRAUX
   ---------------------------------------------------------- */

.field {
    margin: 14px 0;
}

.field label,
.form-group label,
.status-select-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cfd7d8;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-color);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cfd7d8;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-color);
    font-size: 14px;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group label i {
    margin-right: 6px;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.form-divider {
    height: 1px;
    margin: 28px 0;
    background: var(--border-color);
}

.form-help {
    margin-top: 8px;
    color: var(--muted-color);
    font-size: 13px;
}

.form-help i {
    margin-right: 5px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.appointment-form-card {
    margin-top: 20px;
}

.appointment-form-card h2 {
    margin-bottom: 20px;
}

.appointment-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

.appointment-form label {
    font-weight: 600;
}

.appointment-form input,
.appointment-form select,
.appointment-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cfd7d8;
    border-radius: var(--radius-sm);
    background: #fff;
    font-family: inherit;
    font-size: 15px;
}

.appointment-form input:focus,
.appointment-form select:focus,
.appointment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.appointment-form textarea {
    min-height: 100px;
    resize: vertical;
}

.appointment-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.appointment-form-actions button {
    cursor: pointer;
}

/* 13. AUTHENTIFICATION ET MOT DE PASSE
   ---------------------------------------------------------- */

.login-page,
.auth-page {
    min-height: calc(100vh - 150px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.login-card,
.auth-card {
    width: 100%;
    max-width: 450px;
}

.password-field {
    position: relative;
}

.password-field input {
    width: 100%;
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    padding: 5px;
    border: none;
    background: transparent;
    color: var(--muted-color);
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    color: var(--primary-dark);
}

.forgot-password-container {
    margin-bottom: 20px;
    text-align: left;
}

.forgot-password-link {
    color: var(--accent-color);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition);
}

.forgot-password-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}



.progress {
    height: 8px;
    overflow: hidden;
    border-radius: 8px;
    background: #e5e8e4;
}

.progress span {
    display: block;
    height: 100%;
    background: var(--success-color);
}

.bar {
    margin: 15px 0;
}

.bar-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

/* 14. PROFIL
   ---------------------------------------------------------- */

.profile {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.profile-role {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 10px 0 0;
    padding: 6px 11px;
    border: 1px solid #d7dfe0;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 13px;
}

/* Modification du profil */

.profile-edit-page {
    max-width: 1100px;
}

.profile-edit-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.profile-edit-header h1 {
    margin: 0 0 8px;
}

.profile-edit-card {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.profile-edit-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 23px 27px;
    border-bottom: 1px solid var(--border-color);
}

.profile-edit-card-header h2 {
    margin: 0 0 5px;
    font-size: 18px;
}

.profile-edit-card-header p {
    margin: 0;
    color: var(--muted-color);
    font-size: 13px;
}

.profile-edit-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    color: var(--primary-color);
    font-size: 18px;
}

.profile-edit-form {
    padding: 27px;
}

.profile-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 20px;
}

.profile-edit-form .form-group {
    margin-bottom: 0;
}

.profile-edit-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 700;
}

.profile-edit-form input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #cfd7d8;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-color);
    font-size: 14px;
    transition: border-color var(--transition);
}

.profile-edit-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.profile-edit-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 13px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    color: var(--muted-color);
    font-size: 12px;
}

.profile-edit-info i {
    color: var(--primary-color);
}

.profile-edit-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border-color);
}

/* 15. SIDEBAR ET ESPACE AGENT
   ---------------------------------------------------------- */

.sidebar-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
}

.side {
    padding: 15px;
    border: 1px solid #354e5d;
    border-radius: var(--radius-md);
    background: var(--primary-dark);
    color: #fff;
}

.side a {
    display: block;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    color: #fff;
    text-decoration: none;
    transition: background var(--transition);
}

.side a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.agent-section {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.agent-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.agent-section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.agent-section-header p {
    margin-top: 8px;
}

.agent-procedure-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.agent-procedure-actions .btn {
    white-space: nowrap;
}

.agent-edit-card {
    max-width: 900px;
    margin: 0 auto;
}

.form-section-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 25px;
}

.form-section-title>i {
    margin-top: 3px;
    color: var(--primary-color);
    font-size: 20px;
}

.form-section-title h2 {
    margin: 0 0 5px;
    font-size: 20px;
}

.form-section-title p {
    margin: 0;
}

/* 16. TABLEAUX D'ADMINISTRATION
   ---------------------------------------------------------- */

#adminUsersContainer {
    max-width: 100%;
    min-width: 0;
}

#adminUsersContainer th,
#adminUsersContainer td {
    padding: 13px 10px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

#adminUsersContainer th {
    color: var(--muted-color);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

#adminUsersContainer td {
    color: var(--text-color);
    font-size: 14px;
}

#adminUsersContainer select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 8px;
    border: 1px solid #cfd7d8;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-color);
    font-size: 13px;
}

#adminUsersContainer select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 17. NOTIFICATIONS ET MESSAGES
   ---------------------------------------------------------- */

.notification {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.notification .round {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--primary-color);
}

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    max-width: min(420px, calc(100vw - 32px));
    padding: 13px 18px;
    border: 1px solid #415967;
    border-radius: var(--radius-sm);
    background: var(--primary-dark);
    color: #fff;
    box-shadow: var(--shadow-md);
    display: none;
}

.toast.show {
    display: block;
}

.empty {
    padding: 45px 20px;
    color: var(--muted-color);
    text-align: center;
}

/* 18. SATISFACTION
   ---------------------------------------------------------- */

.satisfaction-panel {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
}

.satisfaction-heading,
.satisfaction-panel .satisfaction-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.satisfaction-heading h3,
.satisfaction-panel .satisfaction-heading h3 {
    margin: 0 0 6px;
    color: var(--primary-dark);
}

.satisfaction-heading p,
.satisfaction-panel .satisfaction-heading p {
    margin: 0;
    color: var(--muted-color);
    line-height: 1.6;
}

.satisfaction-icon,
.satisfaction-panel .satisfaction-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #e8dfc7;
    border-radius: var(--radius-md);
    background: #f8f3e8;
    color: #8a6a2f;
    font-size: 21px;
}

.satisfaction-info {
    margin-bottom: 24px;
    padding: 12px 14px;
    border: 1px solid #d7e3d9;
    border-radius: var(--radius-sm);
    background: var(--success-light);
    color: #42624d;
    line-height: 1.6;
}

.satisfaction-info i {
    margin-right: 6px;
}

.satisfaction-rating {
    margin: 0 0 25px;
    padding: 0;
    border: 0;
}

.satisfaction-rating legend {
    margin-bottom: 14px;
    font-weight: 600;
}

.satisfaction-stars,
.satisfaction-panel .satisfaction-stars {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.satisfaction-star-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #cbd0d0;
    font-size: 36px;
    line-height: 1.2;
    cursor: pointer;
}

.satisfaction-star-label input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.satisfaction-star-label span {
    display: inline-block;
    transition: color var(--transition), transform var(--transition);
}

.satisfaction-star-label.selected,
.satisfaction-star-label.preview {
    color: #c99a32;
}

.satisfaction-star-label:hover span {
    transform: scale(1.08);
}

.satisfaction-star-label input:focus-visible+span {
    outline: 2px solid var(--info-color);
    outline-offset: 4px;
    border-radius: 4px;
}

.satisfaction-panel .satisfaction-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.satisfaction-panel .satisfaction-star {
    display: inline-block;
    color: #cbd0d0;
    font-size: 40px;
    line-height: 1.2;
    cursor: pointer;
    transition: color var(--transition), transform var(--transition);
}

.satisfaction-panel .satisfaction-star:hover {
    transform: scale(1.08);
}

.satisfaction-panel .satisfaction-radio:checked+.satisfaction-star {
    color: #c99a32;
}

.satisfaction-panel .satisfaction-radio:focus-visible+.satisfaction-star {
    outline: 2px solid var(--info-color);
    outline-offset: 3px;
    border-radius: 4px;
}

.satisfaction-note-texte,
.satisfaction-panel .satisfaction-note-texte {
    margin: 8px 0 0;
    color: var(--muted-color);
    font-size: 14px;
    font-weight: 600;
}

.satisfaction-commentaire {
    margin-bottom: 22px;
}

.satisfaction-commentaire label,
.satisfaction-panel form>label {
    display: block;
    margin: 16px 0 9px;
    font-weight: 600;
}

.satisfaction-commentaire textarea,
.satisfaction-panel .satisfaction-textarea {
    display: block;
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #cfd7d8;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-color);
    line-height: 1.6;
    resize: vertical;
}

.satisfaction-aide {
    margin: 8px 0 0;
    color: var(--muted-color);
    font-size: 13px;
}

.satisfaction-panel .satisfaction-select {
    width: 100%;
    min-height: 44px;
    padding: 10px;
    border: 1px solid #cfd7d8;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-color);
}

.satisfaction-panel .satisfaction-separator {
    margin: 24px 0;
    border: 0;
    border-top: 1px solid var(--border-color);
}

.satisfaction-panel .satisfaction-optional {
    color: var(--muted-color);
    font-size: 0.9em;
    font-weight: 400;
}

.satisfaction-panel .satisfaction-select:focus,
.satisfaction-panel .satisfaction-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.satisfaction-submit,
.satisfaction-panel .satisfaction-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    margin-top: 18px;
    padding: 11px 19px;
    border-radius: var(--radius-sm);
}

.satisfaction-deja-envoye {
    margin: 14px 0 0;
    color: var(--success-color);
    font-size: 14px;
    line-height: 1.6;
}

/* 19. PIED DE PAGE
   ---------------------------------------------------------- */

footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 27px 5%;
    border-top: 1px solid #3c5260;
    background: var(--primary-dark);
    color: #fff;
    font-size: 13px;
}

footer span {
    color: #d0d9dd;
}


/* Centrage de la page de réinitialisation du mot de passe */
#page > .container.reset-password-page {
    width: 100%;
    max-width: none;
    min-height: 70vh;
    margin: 0;
    padding: 24px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

#page > .container.reset-password-page > .auth-card {
    flex: 0 1 520px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    box-sizing: border-box;
}

#page > .container.reset-password-page .password-field {
    width: 100%;
    min-width: 0;
}

#page > .container.reset-password-page .password-field input {
    box-sizing: border-box;
}

@media (max-width: 360px) {
    #page > .container.reset-password-page {
        padding: 16px 10px;
    }
}


/* 20. RESPONSIVE : TABLETTES
   ---------------------------------------------------------- */

@media (max-width: 1100px) {
    .navbar {
        gap: 16px;
    }

    .brand {
        min-width: auto;
    }

    .navbar nav {
        gap: 14px;
    }

    .navbar nav a {
        font-size: 12px;
    }

    .container {
        padding-right: 3%;
        padding-left: 3%;
    }
}

@media (max-width: 900px) {
    .navbar {
        min-height: 70px;
        padding: 0 4%;
        gap: 12px;
    }

    .navbar nav {
        display: none;
    }

    .navbar nav.open {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 4% 14px;
        border-bottom: 1px solid var(--border-color);
        background: #fff;
        box-shadow: var(--shadow-md);
    }

    .navbar nav.open a {
        padding: 12px;
        border: 0;
        border-radius: var(--radius-sm);
        font-size: 14px;
    }

    .navbar nav.open a:hover,
    .navbar nav.open a.active {
        background: var(--surface-muted);
    }

    .menu-btn {
        display: block;
    }

    .nav-actions {
        margin-left: auto;
    }

    /* Profil compact sur tablette et téléphone */
    .profile-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        flex-shrink: 0;
        width: auto;
        max-width: 150px;
        min-width: 0;
        padding: 6px 8px;
        margin: 0;
        font-size: 12px;
        border-radius: 8px;
    }

    /* Avatar du profil */
    .profile-btn .avatar,
    .profile-btn .profile-avatar {
        width: 30px;
        height: 30px;
        min-width: 30px;
        flex-shrink: 0;
    }

    /* Espacement entre les actions de navigation */
    .nav-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        margin-left: auto;
        flex-shrink: 0;
    }

    /* Bouton hamburger distinct */
    .menu-btn {
        display: block;
        flex-shrink: 0;
        width: 38px;
        height: 38px;
        margin-left: 4px;
    }

    /* Très petits écrans */
    @media (max-width: 380px) {
        .profile-btn {
            max-width: 110px;
            padding: 5px;
            gap: 4px;
        }

        .profile-btn .avatar,
        .profile-btn .profile-avatar {
            width: 26px;
            height: 26px;
            min-width: 26px;
        }

        .nav-actions {
            gap: 4px;
        }

        .menu-btn {
            width: 34px;
            height: 34px;
            margin-left: 2px;
        }
    }

    .grid,
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats,
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .layout-two,
    .calendar,
    .profile,
    .sidebar-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero {
        padding: 30px 25px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero:after {
        display: none;
    }
}

/* 21. RESPONSIVE : TÉLÉPHONES
   ---------------------------------------------------------- */

@media (max-width: 600px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 25px;
    }

    h2,
    .section-head h2,
    .section-header h2 {
        font-size: 20px;
    }

    .container {
        padding: 20px 4% 35px;
    }

    .brand strong {
        font-size: 18px;
    }

    .brand-icon {
        font-size: 26px;
    }

    .brand small {
        font-size: 10px;
    }

    .grid,
    .services-grid,
    .stats,
    .dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .card,
    .agent-section {
        padding: 18px;
    }

    .hero {
        min-height: auto;
        padding: 25px 20px;
    }

    .hero h1 {
        font-size: 29px;
    }

    .hero p {
        font-size: 14px;
    }

    .search,
    .search-box {
        flex-direction: column;
        padding: 8px;
    }

    .search input,
    .search-box input {
        width: 100%;
    }

    .search button,
    .search-box button {
        width: 100%;
    }

    .section-head,
    .section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        margin-top: 28px;
    }

    .request,
    .request-card,
    .appointment-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .request-card-content,
    .appointment-card-content {
        width: 100%;
    }

    .request-card-actions,
    .appointment-card-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .request-card-actions .btn,
    .appointment-card-actions .btn {
        white-space: normal;
    }

    .chat-box {
        min-height: 360px;
        padding: 15px;
    }

    .bubble {
        max-width: 88%;
        padding: 10px 12px;
    }

    .chat-input {
        align-items: stretch;
    }

    .chat-input input {
        width: 100%;
    }

    .form-row,
    .profile-form-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .profile-edit-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-edit-card-header,
    .profile-edit-form {
        padding: 18px;
    }

    .profile-edit-actions,
    .appointment-form-actions,
    .dashboard-actions {
        flex-direction: column;
    }

    .profile-edit-actions .btn,
    .appointment-form-actions .btn,
    .appointment-form-actions button,
    .dashboard-actions .btn {
        width: 100%;
    }

    .agent-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .agent-procedure-actions {
        flex-direction: column;
    }

    .agent-procedure-actions .btn {
        width: 100%;
        white-space: normal;
    }

    .actions {
        flex-direction: column;
    }

    .actions .btn {
        width: 100%;
    }

    .days {
        gap: 4px;
    }

    .day {
        padding: 8px 2px;
        font-size: 12px;
    }

    footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 23px 5%;
    }

    .toast {
        right: 12px;
        bottom: 12px;
    }

    .satisfaction-panel {
        padding: 16px;
    }

    .satisfaction-heading,
    .satisfaction-panel .satisfaction-heading {
        align-items: flex-start;
        gap: 10px;
    }

    .satisfaction-icon,
    .satisfaction-panel .satisfaction-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .satisfaction-stars,
    .satisfaction-panel .satisfaction-stars {
        gap: 5px;
    }

    .satisfaction-star-label,
    .satisfaction-panel .satisfaction-star {
        font-size: 32px;
    }

    .satisfaction-submit,
    .satisfaction-panel .satisfaction-submit {
        width: 100%;
    }
}

/* 22. PETITS ÉCRANS
   ---------------------------------------------------------- */

@media (max-width: 380px) {
    .navbar {
        padding-right: 3%;
        padding-left: 3%;
    }

    .brand {
        gap: 6px;
    }

    .brand strong {
        font-size: 16px;
    }

    .nav-actions {
        gap: 4px;
    }

    .icon-btn,
    .menu-btn {
        width: 36px;
        height: 36px;
    }

    .container {
        padding-right: 3%;
        padding-left: 3%;
    }

    .hero h1 {
        font-size: 25px;
    }

    .days {
        gap: 2px;
    }

    .day {
        font-size: 11px;
    }
}

/* =========================================================
   ADMIN-GUIDE : THÈME CLAIR, MODERNE ET PROFESSIONNEL
   À placer à la fin du fichier CSS existant
   ========================================================= */

:root {
    --primary-color: #2878D0;
    --primary-hover: #1F65B3;
    --primary-light: #E5F1FF;

    --background-color: #F4F7FB;
    --card-bg: #FFFFFF;

    --text-color: #263548;
    --muted-color: #65758B;

    --border-color: #DCE4EE;

    --success-color: #27845B;
    --success-bg: #E8F6EE;

    --warning-color: #A86608;
    --warning-bg: #FFF4DB;

    --danger-color: #C44747;
    --danger-bg: #FDECEC;

    --info-color: #2878D0;
    --info-bg: #E5F1FF;

    --shadow-soft: 0 2px 8px rgba(38, 53, 72, 0.06);
    --shadow-card: 0 4px 16px rgba(38, 53, 72, 0.07);

    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 16px;
}

/* Fond et textes */

html {
    background: var(--background-color);
}

body {
    background: var(--background-color);
    color: var(--text-color);
}

p,
label,
.field,
.form-help,
.request-date,
.appointment-date,
.satisfaction-note-texte {
    color: var(--text-color);
}

small,
.muted,
.eyebrow,
.form-help {
    color: var(--muted-color);
}

/* Navigation */

.navbar {
    background: #FFFFFF;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(38, 53, 72, 0.04);
}

.navbar a,
.navbar button,
.navbar .brand,
.navbar .nav-link {
    color: var(--text-color);
}

.navbar a:hover,
.navbar .nav-link:hover {
    color: var(--primary-color);
}

.navbar .active,
.navbar .nav-link.active {
    color: var(--primary-color);
}

.avatar,
.profile-avatar {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* Conteneurs et titres */

.container,
.hero,
.hero-content,
.layout-two,
.sidebar-layout {
    color: var(--text-color);
}

.hero {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-soft);
}

.eyebrow {
    color: var(--primary-color);
}

h1,
h2,
h3,
h4,
h5 {
    color: #263548;
}

/* Cartes */

.card,
.dashboard-card,
.request-card,
.appointment-card,
.appointment-form-card,
.profile-card,
.profile-edit-card,
.satisfaction-panel,
.service-card,
.stat-card,
.auth-card,
.login-card {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-soft);
}

.card:hover,
.service-card:hover,
.dashboard-card:hover {
    box-shadow: var(--shadow-card);
}

.request-card-icon {
    background: var(--primary-light);
    color: var(--primary-color);
}

.profile-card-header,
.agent-section-header {
    border-bottom: 1px solid var(--border-color);
}

/* Boutons */

.btn,
button.btn,
button[type="submit"],
.satisfaction-submit {
    background: var(--primary-color);
    color: #FFFFFF;
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-small);
    box-shadow: none;
    transition: background-color 0.18s ease,
        border-color 0.18s ease;
}

.btn:hover,
button.btn:hover,
button[type="submit"]:hover,
.satisfaction-submit:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #FFFFFF;
}

.btn.secondary,
.btn-secondary {
    background: #FFFFFF;
    color: var(--primary-color);
    border: 1px solid #B9D2EF;
}

.btn.secondary:hover,
.btn-secondary:hover {
    background: var(--primary-light);
    color: var(--primary-hover);
}

.btn.danger {
    background: var(--danger-color);
    color: #FFFFFF;
    border-color: var(--danger-color);
}

.btn.danger:hover {
    background: #AA3636;
    border-color: #AA3636;
}

a {
    color: var(--primary-color);
}

a:hover {
    color: var(--primary-hover);
}

/* Champs et formulaires */

input,
select,
textarea,
.field input,
.field select,
.field textarea,
.form-group input,
.form-group select,
.form-group textarea,
.password-field input,
.satisfaction-select,
.satisfaction-textarea,
.status-select {
    background-color: #FFFFFF;
    color: var(--text-color);
    border: 1px solid #C9D5E3;
    border-radius: var(--radius-small);
}

input::placeholder,
textarea::placeholder {
    color: #8996A8;
    opacity: 1;
}

input:focus,
select:focus,
textarea:focus,
.status-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(40, 120, 208, 0.13);
}

.form-section-title,
.profile-card-header {
    color: var(--text-color);
}

/* Services et statistiques */

.services-grid .service-card,
.service-card {
    background: #FFFFFF;
}

.service-icon,
.stat-icon {
    background: var(--primary-light);
    color: var(--primary-color);
}

.stat-card .stat-value,
.stat-card .stat-number {
    color: var(--primary-color);
}

/* Tableau de bord et navigation latérale */

.dashboard-grid,
.dashboard-actions {
    color: var(--text-color);
}

.side {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
}

.side a,
.side button {
    color: var(--text-color);
}

.side a:hover,
.side button:hover,
.side .active {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* Chat et recommandations */

.chat,
.chat-box {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
}

.msg .bubble {
    background: #F0F4F9;
    color: var(--text-color);
    border-radius: var(--radius-medium);
}

.msg.user .bubble,
.msg.user .bubble p {
    background: var(--primary-color);
    color: #FFFFFF;
}

.bot-icon {
    background: var(--primary-light);
    color: var(--primary-color);
}

.recommendation {
    background: #F0F7FF;
    border: 1px solid #D4E6FA;
    color: var(--text-color);
    border-radius: var(--radius-medium);
}

.chat-input {
    background: #FFFFFF;
    border-top: 1px solid var(--border-color);
}

/* Statuts des demandes et rendez-vous */

.status,
.status.pending,
.status.ok,
.status.refused,
.status.done {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    font-weight: 600;
}

.status.pending {
    background: var(--warning-bg);
    color: var(--warning-color);
}

.status.ok {
    background: var(--success-bg);
    color: var(--success-color);
}

.status.refused {
    background: var(--danger-bg);
    color: var(--danger-color);
}

.status.done {
    background: #E8EEF5;
    color: #46566B;
}

/* Tableaux d'administration */

#adminUsersContainer {
    background: #FFFFFF;
    border-radius: var(--radius-medium);
}

#adminUsersContainer table {
    background: #FFFFFF;
    color: var(--text-color);
    border-collapse: collapse;
}

#adminUsersContainer th {
    background: #EDF3FA;
    color: #34465C;
    border-bottom: 1px solid var(--border-color);
}

#adminUsersContainer td {
    color: var(--text-color);
    border-bottom: 1px solid #E8EDF3;
}

#adminUsersContainer tr:hover td {
    background: #F6F9FD;
}

#adminUsersContainer select,
.admin-rendezvous-status,
.admin-demande-status {
    background: #FFFFFF;
    color: var(--text-color);
    border: 1px solid #C9D5E3;
}

/* Sélecteurs de statut */

.custom-select-wrapper,
.status-select-group {
    color: var(--text-color);
}

.select-arrow {
    color: var(--muted-color);
}

/* Calendrier et choix de créneaux */

.calendar,
.days,
.slots {
    color: var(--text-color);
}

.day,
.slot {
    background: #FFFFFF;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
}

.day:hover,
.slot:hover {
    background: var(--primary-light);
    border-color: #B9D2EF;
    color: var(--primary-color);
}

.day.selected,
.slot.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #FFFFFF;
}

/* Profil et authentification */

.profile,
.profile-edit-page,
.profile-info {
    color: var(--text-color);
}

.profile-role {
    background: var(--primary-light);
    color: var(--primary-color);
}

.forgot-password-link {
    color: var(--primary-color);
}

/* Satisfaction */

.satisfaction-heading,
.satisfaction-info {
    color: var(--text-color);
}

.satisfaction-icon {
    background: var(--primary-light);
    color: var(--primary-color);
}

.satisfaction-rating {
    color: #D18A19;
}

.satisfaction-star-label,
.satisfaction-star {
    color: #D18A19;
}

.satisfaction-star-label:hover,
.satisfaction-star:hover {
    color: #A96B0C;
}

.satisfaction-radio {
    accent-color: var(--primary-color);
}

.satisfaction-deja-envoye {
    background: var(--success-bg);
    color: var(--success-color);
    border: 1px solid #C9E8D5;
    border-radius: var(--radius-medium);
}

/* Notifications et messages */

.notification {
    background: #FFFFFF;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.toast {
    background: #263548;
    color: #FFFFFF;
    border-radius: var(--radius-small);
    box-shadow: var(--shadow-card);
}

.empty {
    background: #FFFFFF;
    color: var(--muted-color);
    border: 1px dashed #C9D5E3;
    border-radius: var(--radius-medium);
}

.round {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* Pied de page */

footer {
    color: var(--muted-color);
}

/* Accessibilité : garder une indication visible au clavier */

button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(40, 120, 208, 0.45);
    outline-offset: 3px;
}

/* Respect des préférences de réduction des animations */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Correction du tableau Admin sur les petits écrans */

#adminUsersContainer {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* Autoriser le défilement horizontal du tableau */
#adminUsersContainer {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Conserver une largeur suffisante pour les colonnes */
#adminUsersContainer table {
    width: 100%;
    min-width: 850px;
    table-layout: auto;
    border-collapse: collapse;
}


/* Centrage de la page de vérification */
.container.verification-email-page {
    width: 100%;
    max-width: none;
    min-height: 70vh;
    margin: 0;
    padding: 24px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.container.verification-email-page > .auth-card {
    flex: 0 1 520px;
    width: 100%;
    max-width: 520px;
    margin: 0;
    box-sizing: border-box;
}

.container.verification-email-page .btn {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 360px) {
    .container.verification-email-page {
        padding: 16px 10px;
    }

    .container.verification-email-page .btn {
        width: 100%;
    }
}


/* Empêcher les mots et identifiants de se couper lettre par lettre */
#adminUsersContainer th,
#adminUsersContainer td {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    min-width: 60px;
    padding: 10px 12px;
    vertical-align: middle;
}

/* Garder les champs de sélection lisibles */
#adminUsersContainer td select {
    max-width: 100%;
    min-width: 110px;
}

/* Ne pas laisser le tableau dépasser de son conteneur */
@media (max-width: 600px) {
    #adminUsersContainer {
        display: block;
    }

    #adminUsersContainer table {
        min-width: 850px;
    }
}

/* Correction responsive de la carte Assistant IA */
@media (max-width: 600px) {
    .hero-card {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 20px;
        position: relative;
        left: 0;
    }

    .hero-card * {
        max-width: 100%;
        overflow-wrap: break-word;
    }
}


/* Correction ciblée du centrage de la vérification e-mail */
#page > .container.verification-email-page {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 24px 16px !important;
    box-sizing: border-box !important;
}

#page > .container.verification-email-page > .auth-card {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    float: none !important;
    width: 100% !important;
    max-width: 520px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

@media (max-width: 360px) {
    #page > .container.verification-email-page {
        padding: 16px 10px !important;
    }
}


@media screen and (max-width: 380px) {
    header.navbar {
        gap: 4px;
        padding-left: 6px;
        padding-right: 6px;
    }

    header.navbar > .brand {
        gap: 4px;
    }

    header.navbar > .brand strong {
        font-size: 16px;
    }

    header.navbar > .brand small {
        font-size: 9px;
    }

    header.navbar .profile-name,
    header.navbar .profile-btn .fa-chevron-down {
        display: none;
    }

    header.navbar > .nav-actions {
        gap: 2px;
    }
}

@media screen and (max-width: 380px) {
    header.navbar > .nav-actions {
        flex-basis: 110px;
        width: 110px;
        max-width: 40%;
    }

    header.navbar .profile-name {
        display: none;
    }

    header.navbar > #menuBtn.menu-btn {
        flex-basis: 34px;
        width: 34px;
        min-width: 34px;
        max-width: 34px;
        height: 34px;
    }
}

/* ADMIN-GUIDE : navigation mobile sur une seule ligne */
@media screen and (max-width: 600px) {
    header.navbar {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 4px;
        padding: 8px 6px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    header.navbar > .brand {
        display: flex;
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        gap: 4px;
        overflow: hidden;
    }

    header.navbar > .brand strong,
    header.navbar > .brand small {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    header.navbar > nav {
        display: none;
    }

    header.navbar > .nav-actions {
        display: flex;
        flex: 0 1 auto;
        width: auto;
        min-width: 0;
        max-width: 65%;
        gap: 2px;
        margin-left: auto;
        align-items: center;
        justify-content: flex-end;
    }

    header.navbar .icon-btn {
        flex: 0 0 32px;
        width: 32px;
        min-width: 32px;
        height: 32px;
    }

    header.navbar .profile-btn {
        display: flex;
        flex: 0 1 auto;
        min-width: 0;
        max-width: 100%;
        gap: 3px;
        padding: 3px;
        overflow: hidden;
    }

    header.navbar .profile-name {
        display: inline-block;
        min-width: 0;
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    header.navbar > #menuBtn.menu-btn {
        display: flex;
        flex: 0 0 32px;
        width: 32px;
        min-width: 32px;
        max-width: 32px;
        height: 32px;
        margin: 0;
        padding: 0;
        position: static;
        transform: none;
        align-items: center;
        justify-content: center;
    }
}

@media screen and (max-width: 380px) {
    header.navbar #menuBtn {
        flex-basis: 34px;
        width: 34px;
        min-width: 34px;
        max-width: 34px;
        height: 34px;
    }
}

