:root {
    --blue: #154194;
    --blue-dark: #0f2f6d;
    --orange: #f28c28;
    --orange-dark: #d96f18;
    --red: #d94141;
    --green: #1f9d55;
    --yellow: #f5b942;

    --bg: #eef2f6;
    --card: #ffffff;
    --text: #142033;
    --muted: #667085;
    --border: #d8dee8;

    --radius: 18px;
    --shadow: 0 10px 24px rgba(15, 47, 109, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(242, 140, 40, 0.12), transparent 30%),
        linear-gradient(180deg, #f7f9fc 0%, var(--bg) 100%);
    color: var(--text);
}

.container {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 28px 18px 50px;
}

/* =========================================================
   HEADER / NAV
========================================================= */

.topbar {
    background: linear-gradient(135deg, var(--blue-dark), var(--blue));
    color: #fff;
    box-shadow: 0 6px 22px rgba(15, 47, 109, 0.22);
}

.topbar-inner {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 22px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 0.2px;
}

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

.nav a {
    color: #fff;
    text-decoration: none;
    padding: 9px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.95rem;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* =========================================================
   CARTES / TITRES
========================================================= */

.card {
    background: var(--card);
    border: 1px solid rgba(216, 222, 232, 0.9);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.card h1,
.card h2,
.card h3 {
    margin: 0 0 16px;
    color: #0f172a;
}

.card h1 {
    font-size: 2rem;
}

.card h2 {
    font-size: 1.65rem;
}

.card p {
    margin: 8px 0;
}

.section-card {
    margin-top: 18px;
}

/* =========================================================
   BOUTONS
========================================================= */

button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    padding: 9px 15px;
    font-size: 0.92rem;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    background: var(--orange);
    color: #fff;
}

button:hover,
.btn:hover {
    background: var(--orange-dark);
    text-decoration: none;
}

.btn-secondary,
.btn-grey {
    background: var(--blue);
    color: #fff;
}

.btn-secondary:hover,
.btn-grey:hover {
    background: var(--blue-dark);
}

.btn-orange {
    background: var(--orange);
    color: #fff;
}

.btn-disabled {
    background: #d0d5dd;
    color: #667085;
    cursor: not-allowed;
    border-radius: 999px;
    padding: 9px 15px;
    font-weight: 900;
    display: inline-flex;
    white-space: nowrap;
}

/* =========================================================
   FORMULAIRES
========================================================= */

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: 900;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(242, 140, 40, 0.22);
    border-color: var(--orange);
}

.grid {
    display: grid;
    gap: 16px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.form-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: end;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.form-check input[type="checkbox"] {
    width: auto;
}

/* =========================================================
   ALERTES / BADGES / STATUTS
========================================================= */

.alert,
.alert-danger {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.alert-error,
.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #ecfdf3;
    color: #067647;
    border: 1px solid #abefc6;
}

.badge,
.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 900;
}

.badge-success,
.status-ok {
    background: #dcfae6;
    color: #067647;
}

.badge-danger,
.status-danger {
    background: #fee4e2;
    color: #b42318;
}

.badge-warning,
.status-warning {
    background: #fef0c7;
    color: #93370d;
}

.status-past,
.status-muted {
    background: #e5e7eb;
    color: #4b5563;
}

/* =========================================================
   TABLEAUX
========================================================= */

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
}

th,
td {
    padding: 13px;
    border-bottom: 1px solid #eef1f5;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f2f5fa;
    color: #344054;
}

/* =========================================================
   DASHBOARD
========================================================= */

.grid-dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

@media (min-width: 900px) {
    .grid-dashboard {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.patrouilles-card {
    border-left: 7px solid var(--blue);
}

.aide-card {
    border-left: 7px solid var(--orange);
}

.reunion-card {
    border-left: 7px solid var(--red);
}

.infos-card {
    border-left: 7px solid var(--yellow);
}

.ligne {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid #eef1f5;
}

.ligne:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ligne > div:first-child {
    line-height: 1.35;
}

.small,
.help-text,
small {
    color: var(--muted);
    font-size: 0.92rem;
}

/* =========================================================
   CALENDRIER COMMUN
========================================================= */

.calendar-card {
    margin-top: 22px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-nav h2 {
    margin: 0;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    font-size: 0.9rem;
    color: var(--muted);
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-right: 6px;
    vertical-align: middle;
    border: 1px solid #d0d5dd;
}

.dot-meeting { background: var(--red); }
.dot-complete { background: var(--green); }
.dot-incomplete { background: var(--orange); }
.dot-empty { background: #d0d5dd; }

.mini-calendar {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 9px;
}

.mini-calendar-dayname {
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--muted);
    text-align: center;
    padding-bottom: 4px;
}

.mini-calendar-cell {
    min-height: 98px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #f8fafc;
    padding: 7px;
    display: flex;
    flex-direction: column;
}

.mini-calendar-cell.empty-cell {
    background: transparent;
    border: none;
}

.mini-calendar-cell.complete {
    background: #ecfdf3;
    border-color: #abefc6;
}

.mini-calendar-cell.incomplete {
    background: #fff7ed;
    border-color: #fdba74;
}

.mini-calendar-cell.meeting {
    background: #fef2f2;
    border-color: #fca5a5;
}

.mini-calendar-cell.today {
    box-shadow: inset 0 0 0 3px var(--blue);
}

.day-number {
    font-weight: 900;
    color: #111827;
    text-align: right;
    margin-bottom: 5px;
}

.day-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.day-item {
    font-size: 0.72rem;
    line-height: 1.2;
    padding: 3px 5px;
    border-radius: 7px;
    display: flex;
    justify-content: space-between;
    gap: 5px;
}

.day-item.complete {
    background: #dcfae6;
    color: #067647;
}

.day-item.incomplete {
    background: #ffead5;
    color: #9c4a00;
}

.day-item.meeting {
    background: #fee4e2;
    color: #b42318;
}

.item-time {
    font-weight: 900;
    flex: 0 0 auto;
}

.item-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.day-more {
    font-size: 0.68rem;
    color: var(--muted);
    margin-top: 2px;
    text-align: right;
}

/* =========================================================
   PLANNING
========================================================= */

.planning-page {
    display: grid;
    grid-template-columns: 32% 68%;
    gap: 22px;
    align-items: start;
}

.planning-mini-calendar .calendar-card {
    margin-top: 0;
    position: sticky;
    top: 22px;
    padding: 18px;
}

.planning-mini-calendar .mini-calendar {
    gap: 6px;
}

.planning-mini-calendar .mini-calendar-cell {
    min-height: 58px;
    padding: 5px;
    border-radius: 12px;
}

.planning-mini-calendar .item-label {
    display: none;
}

.planning-title-card {
    margin-bottom: 22px;
}

.planning-title-card > div,
.members-header-top,
.dispo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.planning-title-card h1 {
    margin-bottom: 8px;
}

.planning-filters,
.member-filters,
.dispo-filters {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.planning-filters a,
.member-filter,
.dispo-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid #d7dee8;
    background: #f8fafc;
    color: #0f172a;
    text-decoration: none;
    font-weight: 900;
    font-size: 0.92rem;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.06);
}

.planning-filters a:hover,
.member-filter:hover,
.dispo-filter:hover {
    background: #eef4ff;
    text-decoration: none;
}

.planning-filters a.active,
.member-filter.active,
.dispo-filter.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

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

.planning-card {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 7px solid var(--orange);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.planning-card.complete {
    border-left-color: var(--green);
}

.planning-card.incomplete {
    border-left-color: var(--orange);
}

.planning-card.past {
    border-left-color: #98a2b3;
    opacity: 0.72;
}

.reunion-planning-card {
    border-left-color: var(--red);
}

.planning-card-left {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.planning-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #f2f5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex: 0 0 auto;
}

.planning-date {
    font-size: 1.2rem;
    font-weight: 900;
    color: #0f172a;
}

.planning-type {
    margin-top: 3px;
    color: var(--muted);
    font-weight: 800;
}

.planning-members {
    margin-top: 8px;
    line-height: 1.35;
}

.planning-empty-members {
    display: inline-block;
    color: #9c4a00;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 999px;
    padding: 4px 9px;
    font-weight: 900;
}

.planning-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.planning-card-right .actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.planning-comment {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 12px;
}

.planning-past-compact {
    display: block;
    padding: 0;
    overflow: hidden;
}

.past-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    cursor: pointer;
}

.past-summary::-webkit-details-marker {
    display: none;
}

.past-toggle {
    color: var(--muted);
    font-weight: 900;
}

.past-toggle::before {
    content: "Afficher";
}

.planning-past-compact[open] .past-toggle::before {
    content: "Masquer";
}

.planning-past-details {
    padding: 0 16px 16px 72px;
}

/* Planning edit */

.planning-member-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eef1f5;
}

.planning-member-choice:last-child {
    border-bottom: none;
}

.planning-member-label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-weight: 900;
}

.planning-member-phone {
    color: var(--muted);
    font-weight: 700;
}

.member-unavailable {
    background: #fff7f7;
    margin-inline: -8px;
    padding-inline: 8px;
    border-radius: 12px;
}

/* =========================================================
   MEMBRES
========================================================= */

.members-header-card {
    display: block;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.member-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}

.member-card-me {
    border-color: rgba(242, 140, 40, 0.55);
}

.member-main {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex: 0 0 auto;
}

.member-card h2 {
    margin: 0 0 6px;
    font-size: 1.2rem;
}

.member-function {
    font-weight: 800;
    margin-bottom: 6px;
}

.member-phone,
.member-email,
.member-types,
.member-formations,
.member-card-info {
    margin: 5px 0;
    color: var(--muted);
    font-weight: 700;
}

.member-phone a {
    font-weight: 900;
}

.member-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.member-admin-info {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eef1f5;
}

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

/* =========================================================
   MES INDISPOS
========================================================= */

.indispo-card {
    margin-top: 20px;
}

.indispo-calendar {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 9px;
}

.indispo-form {
    margin: 0;
}

.indispo-cell {
    width: 100%;
    min-height: 92px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--text);
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    cursor: pointer;
    box-shadow: none;
}

.indispo-cell:hover {
    background: #eef4ff;
}

.indispo-cell.is-indispo {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b42318;
}

.indispo-cell.today {
    box-shadow: inset 0 0 0 3px var(--blue);
}

.indispo-label {
    margin-top: auto;
    font-size: 0.78rem;
    font-weight: 900;
}

.indispo-cell.empty-cell {
    background: transparent;
    border: none;
    pointer-events: none;
}

/* =========================================================
   DISPONIBILITES ADMIN
========================================================= */

.dispo-legend {
    margin-top: 14px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--muted);
    font-weight: 800;
}

.legend-box {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
}

.legend-box.available {
    background: #f8fafc;
    border: 1px solid #d7dee8;
}

.legend-box.unavailable {
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

.legend-box.patrol-day {
    background: #fff7ed;
    border: 1px solid #fdba74;
}

.availability-scroll {
    overflow-x: auto;
    padding-bottom: 8px;
}

.availability-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.availability-table th,
.availability-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 8px;
    text-align: center;
    min-width: 42px;
}

.availability-table th {
    color: var(--muted);
    font-size: 0.8rem;
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 2;
}

.availability-table th span {
    display: block;
    font-size: 0.72rem;
}

.availability-table th strong {
    display: block;
    color: var(--text);
    font-size: 0.95rem;
}

.availability-table .member-col {
    min-width: 230px;
    max-width: 260px;
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fff;
    box-shadow: 6px 0 10px rgba(15, 23, 42, 0.04);
}

.availability-table th.member-col {
    background: #f8fafc;
    z-index: 4;
}

.availability-table .member-col small {
    display: block;
    color: var(--muted);
    font-weight: 700;
    margin-top: 3px;
}

.availability-table td.is-available {
    color: #94a3b8;
}

.availability-table td.is-unavailable {
    background: #fee2e2;
    color: #b42318;
    font-weight: 900;
}

.availability-table th.has-patrol,
.availability-table td.has-patrol {
    background-color: #fff7ed;
}

.availability-table td.has-patrol.is-unavailable {
    background: #fecaca;
}

/* =========================================================
   LOGIN
========================================================= */

.login-wrapper {
    min-height: calc(100vh - 90px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 900px) {
    .planning-page {
        grid-template-columns: 1fr;
    }

    .planning-mini-calendar .calendar-card {
        position: static;
    }

    .planning-card {
        flex-direction: column;
    }

    .planning-card-right {
        align-items: flex-start;
    }

    .planning-card-right .actions {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        width: 100%;
    }

    .nav a {
        background: rgba(255, 255, 255, 0.10);
    }

    .ligne {
        align-items: flex-start;
        flex-direction: column;
    }

    .mini-calendar {
        gap: 5px;
    }

    .mini-calendar-cell {
        min-height: 76px;
        padding: 5px;
    }

    .calendar-legend {
        font-size: 0.8rem;
    }

    .indispo-calendar {
        gap: 5px;
    }

    .indispo-cell {
        min-height: 66px;
        padding: 5px;
    }

    .indispo-label {
        font-size: 0.65rem;
    }
}


/* =========================================================
   DASHBOARD SIMPLIFIÉ
========================================================= */

.dashboard-page {
    display: block;
}

.dashboard-main-card {
    padding: 24px;
}

.dashboard-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.dashboard-toolbar h1 {
    margin-bottom: 8px;
}

.dashboard-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-fire-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 13px;
    border-radius: 999px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-weight: 900;
    text-decoration: none;
}

.dashboard-fire-link:hover {
    background: #ffedd5;
    text-decoration: none;
}

.dashboard-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.dashboard-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.dashboard-day {
    min-height: 122px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #f8fafc;
    padding: 8px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.dashboard-day.empty-cell {
    background: transparent;
    border: none;
}

.dashboard-day.complete {
    background: #ecfdf3;
    border-color: #abefc6;
}

.dashboard-day.incomplete {
    background: #fff7ed;
    border-color: #fdba74;
}

.dashboard-day.meeting {
    background: #fef2f2;
    border-color: #fca5a5;
}

.dashboard-day.has-mine {
    box-shadow: inset 0 0 0 3px var(--blue);
}

.dashboard-day.today {
    outline: 3px solid rgba(21, 65, 148, 0.35);
    outline-offset: 2px;
}

.dashboard-day-number {
    align-self: flex-end;
    font-weight: 900;
    font-size: 1.05rem;
    color: #0f172a;
    text-decoration: none;
}

.dashboard-day-number:hover {
    color: var(--blue);
    text-decoration: none;
}

.dashboard-day-items {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 8px;
}

.dashboard-day-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.2;
    text-decoration: none;
    font-weight: 800;
    min-width: 0;
}

.dashboard-day-item:hover {
    text-decoration: none;
    filter: brightness(0.98);
}

.dashboard-day-item.complete {
    background: #dcfae6;
    color: #067647;
}

.dashboard-day-item.incomplete {
    background: #ffead5;
    color: #9c4a00;
}

.dashboard-day-item.meeting {
    background: #fee4e2;
    color: #b42318;
}

.dashboard-day-item.mine {
    border: 2px solid var(--blue);
}

.dashboard-day-item .item-time {
    flex: 0 0 auto;
    font-weight: 900;
}

.dashboard-day-item .item-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mine-tag {
    margin-left: auto;
    background: var(--blue);
    color: #fff;
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 0.66rem;
    font-weight: 900;
}

.dot-mine {
    background: var(--blue);
}

@media (max-width: 900px) {
    .dashboard-calendar {
        gap: 6px;
    }

    .dashboard-day {
        min-height: 92px;
        padding: 6px;
    }

    .dashboard-day-item {
        font-size: 0.68rem;
        padding: 3px 5px;
    }

    .dashboard-toolbar,
    .dashboard-calendar-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .dashboard-day {
        min-height: 72px;
    }

    .dashboard-day-item .item-label,
    .mine-tag {
        display: none;
    }
}
/* Ajustements dashboard / planning */

.dashboard-day.complete,
.dashboard-day.incomplete,
.dashboard-day.meeting {
    background: #f8fafc;
    border-color: var(--border);
}

.dashboard-day.has-mine {
    box-shadow: none;
}

.dashboard-day-item.mine {
    border: 2px solid var(--blue);
}

.dashboard-day-item .item-label {
    font-weight: 500;
}

.dashboard-day-item {
    font-weight: 700;
}


.planning-empty-members {
    background: #f2f4f7;
    border: 1px solid #d0d5dd;
    color: #101828;
}


/* Ajustements dashboard/planning v3 */

.dashboard-day.complete,
.dashboard-day.incomplete,
.dashboard-day.meeting {
    background: #f8fafc;
    border-color: var(--border);
}

.dashboard-day.has-mine {
    box-shadow: none;
}

.dashboard-day-item.mine {
    border: 2px solid var(--blue);
}

.dashboard-day-item .item-label {
    font-weight: 500;
}

.dashboard-day-item .item-label.libre {
    font-style: italic;
    opacity: 0.70;
    font-weight: 500;
}

.dashboard-day-item {
    font-weight: 700;
}

.planning-comment,
.reunion-comment {
   /* background: #f2f4f7;
    border: 1px solid #d0d5dd;
    color: #101828; */
    font-style: italic;
    font-weight: 400;
}

.planning-empty-members {
    background: #f2f4f7;
    border: 1px solid #d0d5dd;
    color: #101828;
}



/* Module patrouille en cours - mobile first */

.patrol-mobile {
    max-width: 760px;
    margin: 0 auto;
}

.patrol-hero {
    border-left: 7px solid var(--blue);
}

.patrol-section {
    margin-top: 18px;
}

.patrol-actions-sticky {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0;
    background: rgba(238, 242, 246, 0.94);
    backdrop-filter: blur(6px);
}

.patrol-actions-sticky .btn {
    flex: 1;
    min-width: max-content;
}

.patrol-note {
    margin-top: 10px;
    padding: 12px;
    border-radius: 14px;
    background: #f2f4f7;
    border: 1px solid #d0d5dd;
    color: #101828;
    font-weight: 700;
}

.patrol-checklist {
    display: grid;
    gap: 8px;
}

.patrol-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    font-weight: 800;
}

.patrol-check input {
    margin-top: 3px;
    flex: 0 0 auto;
}

.patrol-full-btn {
    width: 100%;
    margin-top: 16px;
    padding: 13px 18px;
}

.patrol-observation-list {
    margin-top: 18px;
    display: grid;
    gap: 12px;
}

.patrol-observation,
.report-observation {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
}

.patrol-observation small,
.report-observation small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 700;
}

.patrol-help {
    padding: 12px 0;
    border-bottom: 1px solid #eef1f5;
}

.patrol-help:last-child {
    border-bottom: none;
}

.patrol-help summary {
    cursor: pointer;
    font-weight: 900;
}

.report-card {
    margin-bottom: 18px;
}


/* Recherche + membres inactifs */

.member-search-wrapper {
    margin-top: 16px;
}

.member-search-input {
    width: 100%;
    max-width: 440px;
    padding: 12px 16px;
    border: 1px solid #d7dee8;
    border-radius: 999px;
    font-size: 0.95rem;
    background: #fff;
}

.member-search-input:focus {
    outline: 3px solid rgba(242, 140, 40, 0.22);
    border-color: var(--orange);
}

.member-card-inactive {
    background: #f3f4f6;
    border: 2px dashed #cbd5e1;
    opacity: 0.78;
}

.member-card-inactive .member-avatar {
    background: #667085;
}



.header-brand{
    display:flex;
    align-items:center;
}

.header-brand img{
    height:32px;
    width:auto;
}

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

.header-brand img:first-child{
    height:42px;
}

.header-brand img:nth-child(2){
    height:36px;
}

.header-brand h1{
    font-size:1.8rem;
    margin:0;
}



/* Suppression / documents réunion */

.btn-danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

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

.danger-zone {
    border: 2px dashed #fecaca;
    background: #fff5f5;
}

.reunion-planning-card.past {
    opacity: 0.78;
}

.reunion-planning-card .actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}


.planning-title-row{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
    margin-bottom:18px;
}

.admin-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    justify-content:flex-end;
}

.planning-filters{
    display:block;
    gap:12px;
    flex-wrap:wrap;
}

.planning-filters a{
    text-decoration:none;
    padding:10px 18px;
    border-radius:999px;
    background:#f8fafc;
    border:1px solid #d7dee8;
    font-weight:800;
    color:#06122a;
    box-shadow:0 4px 12px rgba(0,0,0,.06);
}

.planning-filters a.active{
    background:#164694;
    color:white;
    border-color:#164694;
}



/* Terrain / locomotion */
.join-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.locomotion-select {
    min-width: 105px;
    padding: 8px 10px;
    border: 1px solid #d7dee8;
    border-radius: 999px;
    background: #fff;
    font-weight: 700;
}

.member-card-inactive {
    order: 999;
}


/* =========================================================
   MOBILE / NAV PROPRE
   À coller À LA FIN de assets/css/style.css
========================================================= */

.header-brand{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
}

.header-brand img{
    height:42px;
    width:auto;
    object-fit:contain;
    max-width:none;
    flex:0 0 auto;
}

.header-brand img:last-child{
    height:34px;
}

.brand-title{
    display:inline-block;
    white-space:nowrap;
}

.mobile-menu-toggle{
    display:none;
    border:0;
    border-radius:999px;
    padding:10px 15px;
    background:rgba(255,255,255,.16);
    color:#fff;
    font-size:1.5rem;
    font-weight:900;
    line-height:1;
}

/* Les cases du calendrier peuvent être des liens */
a.mini-calendar-cell,
a.dashboard-day{
    text-decoration:none;
    color:inherit;
}

#planning-list{
    scroll-margin-top:18px;
}

/* =========================================================
   SMARTPHONE
========================================================= */
@media (max-width: 760px){

    .container{
        padding:18px 14px 34px;
    }

    .topbar-inner{
        flex-direction:row;
        align-items:center;
        justify-content:space-between;
        gap:12px;
        padding:18px 16px;
    }

    .header-brand{
        flex:1;
        gap:10px;
    }

    .header-brand img{
        height:34px;
    }

    .header-brand img:last-child{
        height:28px;
    }

    .brand-title{
        white-space:normal;
        font-size:1.45rem;
        line-height:1.05;
    }

    .mobile-menu-toggle{
        display:block;
        flex:0 0 auto;
    }

    .nav{
        display:none;
        width:100%;
        margin-top:14px;
        gap:10px;
    }

    .nav.is-open{
        display:flex;
    }

    .nav a{
        background:rgba(255,255,255,.14);
        padding:10px 14px;
        font-size:1rem;
    }

    .topbar-inner:has(.nav.is-open){
        flex-wrap:wrap;
    }

    .card{
        padding:20px;
        border-radius:20px;
    }

    .card h1{
        font-size:2.25rem;
        line-height:1.05;
    }

    .card h2{
        font-size:1.8rem;
    }

    .dashboard-toolbar,
    .planning-title-card,
    .planning-title-row{
        display:block;
    }

    .dashboard-actions,
    .admin-actions{
        margin-top:16px;
        display:flex;
        gap:10px;
        flex-wrap:wrap;
    }

    .dashboard-fire-link{
        display:inline-flex;
        width:100%;
        justify-content:center;
        text-align:center;
    }

    .dashboard-calendar-header .calendar-nav,
    .calendar-header .calendar-nav{
        justify-content:space-between;
        gap:12px;
    }

    .dashboard-calendar-header .calendar-nav h2,
    .calendar-header .calendar-nav h2{
        font-size:1.85rem;
        text-align:center;
    }

    .calendar-legend{
        gap:12px;
        margin-top:14px;
        justify-content:flex-start;
    }

    .calendar-legend span{
        font-size:.95rem;
    }

    .dashboard-calendar,
    .mini-calendar,
    .indispo-calendar{
        gap:7px;
    }

    .dashboard-day,
    .mini-calendar-cell,
    .indispo-cell{
        min-height:88px;
        border-radius:18px;
        padding:6px 5px;
    }

    .dashboard-day-number,
    .day-number{
        font-size:1.25rem;
        font-weight:900;
    }

    .dashboard-day-item,
    .day-item{
        font-size:.72rem;
        padding:4px 5px;
        border-radius:8px;
        overflow:hidden;
        white-space:nowrap;
        text-overflow:ellipsis;
    }

    .item-label{
        display:none;
    }

    .mine-tag{
        font-size:.65rem;
        padding:1px 4px;
    }

    .planning-page{
        display:block;
    }

    .planning-mini-calendar{
        margin-bottom:18px;
    }

    .planning-title-card{
        margin-bottom:18px;
    }

    .planning-filters{
        display:flex;
        flex-wrap:wrap;
        gap:10px;
        margin-top:16px;
    }

    .planning-filters a{
        padding:9px 14px;
        font-size:.98rem;
    }

    .planning-card{
        flex-direction:column;
        gap:16px;
        padding:20px;
        border-radius:20px;
    }

    .planning-card-left{
        width:100%;
    }

    .planning-card-right{
        width:100%;
        align-items:flex-start;
    }

    .planning-card-right .actions,
    .actions,
    .join-form{
        width:100%;
        display:flex;
        flex-wrap:wrap;
        gap:10px;
    }

    .planning-card-right .btn,
    .join-form .btn{
        flex:1;
        min-width:130px;
        text-align:center;
    }

    .locomotion-select{
        flex:1 1 100%;
        min-height:42px;
    }
}

@media (max-width: 430px){
    .container{
        padding-left:12px;
        padding-right:12px;
    }

    .brand-title{
        font-size:1.25rem;
    }

    .header-brand img{
        height:30px;
    }

    .header-brand img:last-child{
        height:25px;
    }

    .dashboard-day,
    .mini-calendar-cell,
    .indispo-cell{
        min-height:76px;
    }

    .dashboard-day-item,
    .day-item{
        font-size:.66rem;
        padding:3px 4px;
    }
}
