/* =========================================================
   APP.CSS — Gestion de créances HEAJ
   Version : refonte UI responsive progressive — v8 header/nav stabilisés

   INDEX
   01. Variables globales
   02. Reset et base HTML
   03. Layout global
   04. Header
   05. Navigation desktop, dropdown et hamburger
   06. Footer
   07. Typographie et textes
   08. Cards, containers et grilles
   09. Boutons et actions
   10. Messages et alertes
   11. Tableaux
   12. Badges et statuts
   13. Formulaires
   14. Profil utilisateur
   15. Page d’accueil
   16. Page création déclaration
   17. Utilitaires
   18. Responsive tablette
   19. Responsive mobile
   20. Page liste des déclarations utilisateur
   21. Page détail d’une déclaration
   22. Correctifs UI — création déclaration
   23. Responsive création déclaration
   24. Admin — dashboard tuiles
   25. Admin — pages de gestion
   26. Admin demandes — filtres et tableau ergonomiques
   27. Admin demandes — état interactif
   28. Correctifs responsive — header, mobile et admin demandes
   29. Correctifs mobile — débordements et footer
========================================================= */


/* =========================================================
   01. VARIABLES GLOBALES
   Couleurs, espacements et constantes visuelles du portail.
========================================================= */

:root {
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #d1d5db;

    --primary: #1d4ed8;
    --primary-hover: #1e40af;

    --danger: #b91c1c;
    --danger-hover: #991b1b;

    --success: #15803d;
    --success-hover: #166534;

    --success-bg: #dcfce7;
    --success-text: #166534;
    --error-bg: #fee2e2;
    --error-text: #991b1b;
    --warning-bg: #fef3c7;
    --warning-text: #92400e;

    --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.06);
    --radius: 14px;
    --radius-lg: 20px;

    --header-border: #e5e7eb;
    --header-link-hover: #eff6ff;

    --draft-bg: #f3f4f6;
    --draft-text: #374151;
    --sent-bg: #dbeafe;
    --sent-text: #1d4ed8;
    --paid-bg: #dcfce7;
    --paid-text: #166534;
    --refused-bg: #fee2e2;
    --refused-text: #991b1b;
    --default-status-bg: #e5e7eb;
    --default-status-text: #374151;

    --container-xl: 1600px;
    --container-lg: 980px;
}


/* =========================================================
   02. RESET ET BASE HTML
   Base simple, volontairement sans framework CSS.
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    font-size: 16px;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #fff8f9;
    color: var(--text);
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-hover);
}

button,
input,
select,
textarea {
    font: inherit;
}

button:disabled,
.btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

:focus-visible {
    outline: 3px solid rgba(29, 78, 216, 0.32);
    outline-offset: 3px;
}


/* =========================================================
   03. LAYOUT GLOBAL
   Conteneurs principaux utilisés par les pages publiques/admin.
========================================================= */

.page {
    width: 100%;
    max-width: var(--container-xl);
    margin: 24px auto;
    padding: 0 16px 32px;
    flex: 1;
}

@media (min-width: 1200px) {
    .page {
        margin: 28px auto;
        padding: 0 20px 40px;
    }
}

.page-narrow {
    max-width: var(--container-lg);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}

.topbar-title h1 {
    margin: 0 0 8px;
    font-size: 2rem;
}

.topbar-title p {
    margin: 0;
}


/* =========================================================
   04. HEADER
   Header partagé du portail.

   Organisation desktop actuelle :
   - ligne 1 : logo à gauche, informations utilisateur à droite ;
   - ligne 2 : navigation complète, alignée à droite ;
   - le bouton hamburger reste masqué sur desktop.

   Important sécurité :
   - l’affichage ou le masquage d’un lien n’est qu’un confort UI ;
   - les droits réels restent gérés côté PHP, contrôleurs ou middlewares.
========================================================= */

.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--header-border);
}

@media (min-width: 769px) {
    .app-header {
        backdrop-filter: blur(8px);
    }
}

.app-header-inner {
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 12px 16px;

    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "brand user"
        "nav nav";
    align-items: center;
    gap: 12px 18px;
}

@media (min-width: 1024px) {
    .app-header-inner {
        padding: 14px 20px;
        gap: 14px 22px;
    }
}

.app-brand {
    grid-area: brand;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
}

.app-logo {
    height: 44px;
    width: auto;
    flex: 0 0 auto;
    object-fit: contain;
}

.app-brand-text {
    min-width: 0;
}

.app-brand-title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.2;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-brand-subtitle {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header-user {
    grid-area: user;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.app-user-pill {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: bold;
}

.app-user-role {
    white-space: nowrap;
}

.app-user-email {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   05. NAVIGATION DESKTOP, DROPDOWN ET HAMBURGER

   La navigation est volontairement séparée du bloc utilisateur.
   Sur desktop, elle occupe toute la seconde ligne du header et
   ses liens sont alignés à droite.

   Sur mobile, les règles de la section responsive conservent le
   comportement hamburger existant.
========================================================= */

.app-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--text);
    font-weight: bold;
    cursor: pointer;
}

.app-menu-icon {
    width: 20px;
    height: 2px;
    background: currentColor;
    position: relative;
    display: inline-block;
}

.app-menu-icon::before,
.app-menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: currentColor;
}

.app-menu-icon::before {
    top: -6px;
}

.app-menu-icon::after {
    top: 6px;
}

.app-nav {
    grid-area: nav;
    justify-self: stretch;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.app-nav-link,
.app-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.app-nav-link:hover,
.app-dropdown-toggle:hover {
    background: var(--header-link-hover);
    color: var(--primary);
}

.app-nav-link.is-active,
.app-dropdown-toggle.is-active {
    background: #dbeafe;
    color: var(--primary);
}

.app-nav-link-danger {
    color: var(--danger);
}

.app-nav-link-danger:hover {
    background: #fee2e2;
    color: var(--danger-hover);
}

.app-nav-dropdown {
    position: relative;
}

.app-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 260px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    background: #ffffff;
    border: 1px solid var(--header-border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.app-nav-dropdown.is-open .app-dropdown-menu {
    display: flex;
}

.app-dropdown-link {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 11px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
}

.app-dropdown-link:hover {
    background: #f3f7ff;
    color: var(--text);
}

.app-dropdown-link strong {
    color: var(--primary);
    font-size: 0.98rem;
}

.app-dropdown-link span {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.35;
}

/* =========================================================
   06. FOOTER
   Styles déplacés depuis footer.php pour centraliser le CSS.
========================================================= */

.app-footer {
    width: 100%;
    margin-top: auto;
    background: #ffffff;
    border-top: 1px solid var(--header-border);
}

.app-footer-inner {
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 22px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.app-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 240px;
}

.app-footer-brand strong {
    color: var(--text);
}

.app-footer-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    width: auto;
    max-width: 900px;
    text-align: center;
}

.app-footer-columns > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
    max-width: 220px;
}

.app-footer-label {
    font-weight: bold;
    color: var(--text);
}


/* =========================================================
   07. TYPOGRAPHIE ET TEXTES
========================================================= */

.section-intro {
    margin-bottom: 18px;
}

@media (min-width: 1024px) {
    .section-intro {
        margin-bottom: 22px;
    }
}

.section-intro h1 {
    margin: 0 0 8px;
    font-size: 2rem;
}

.section-intro p,
.subtitle,
.text-muted {
    color: var(--muted);
}

.clean-list {
    margin: 0;
    padding-left: 20px;
    line-height: 1.7;
}

.soft-separator {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}


/* =========================================================
   08. CARDS, CONTAINERS ET GRILLES
========================================================= */

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

@media (min-width: 769px) {
    .card {
        padding: 24px;
    }
}

@media (max-width: 430px) {
    .card {
        padding: 16px;
    }
}

.card-spacious {
    padding: 40px;
}

.dashboard-grid,
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 1200px) {
    .dashboard-grid,
    .feature-grid {
        gap: 14px;
    }
}

@media (max-width: 900px) {
    .dashboard-grid,
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .dashboard-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-card,
.feature-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f9fafb;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-soft);
}

@media (min-width: 1024px) {
    .dashboard-card,
    .feature-card {
        padding: 16px;
    }
}

@media (min-width: 1200px) {
    .dashboard-card,
    .feature-card {
        padding: 18px;
    }
}

a.dashboard-card:hover,
a.feature-card:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: var(--text);
    transform: translateY(-1px);
}

.dashboard-card strong,
.feature-card strong {
    color: var(--primary);
    font-size: 1.1rem;
}

.dashboard-card span,
.feature-card span {
    color: var(--muted);
    line-height: 1.45;
}

.feature-card-disabled {
    opacity: 0.75;
    background: #f3f4f6;
    border-style: dashed;
}

.feature-card-disabled strong {
    color: #4b5563;
}


/* =========================================================
   09. BOUTONS ET ACTIONS
========================================================= */

.actions,
.profile-actions {
    margin-top: 20px;
}

.actions-row,
.profile-actions,
.inline-actions,
.table-actions,
.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.actions-row-spaced {
    margin-top: 24px;
}

.form-actions {
    justify-content: flex-end;
    padding-top: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #ffffff;
}

.btn-secondary {
    background: #e5e7eb;
    color: var(--text);
}

.btn-secondary:hover {
    background: #d1d5db;
    color: var(--text);
}

.btn-success {
    background: var(--success);
    color: #ffffff;
}

.btn-success:hover {
    background: var(--success-hover);
    color: #ffffff;
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background: var(--danger-hover);
    color: #ffffff;
}


/* =========================================================
   10. MESSAGES ET ALERTES
========================================================= */

.message {
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-weight: bold;
}

.message.success {
    background: var(--success-bg);
    color: var(--success-text);
}

.message.error {
    background: var(--error-bg);
    color: var(--error-text);
}

.message.warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.error-summary {
    border: 1px solid var(--danger);
    border-radius: 14px;
    background: var(--error-bg);
    color: var(--error-text);
    padding: 16px 18px;
    margin-bottom: 22px;
    line-height: 1.5;
}

.error-summary[hidden] {
    display: none;
}

.error-summary strong {
    display: block;
    margin-bottom: 8px;
}

.error-summary ul {
    margin: 0;
    padding-left: 22px;
}

.client-field-error {
    border-color: var(--danger) !important;
    background: #fff7f7 !important;
}

.app-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(238, 252, 244, 0.88);
    backdrop-filter: blur(5px);
}

.app-loading-box {
    width: min(520px, 100%);
    border: 1px solid #8bd7ad;
    border-radius: 16px;
    background: #f2fff7;
    box-shadow: 0 24px 70px rgba(16, 82, 45, 0.18);
    padding: 28px;
    text-align: center;
    color: #16412a;
}

.app-loading-spinner {
    width: 52px;
    height: 52px;
    margin: 0 auto 18px;
    border: 5px solid #c7f0d8;
    border-top-color: #1f9d55;
    border-radius: 50%;
    animation: app-loading-spin 0.9s linear infinite;
}

.app-loading-title {
    margin-bottom: 8px;
    font-size: 1.35rem;
    font-weight: 800;
}

.app-loading-text,
.app-loading-hint {
    line-height: 1.5;
    color: #28563c;
}

.app-loading-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 22px 0 16px;
}

.app-loading-steps span {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #d9f8e7;
    color: #17663a;
    font-size: 0.86rem;
    font-weight: 700;
}

.app-loading-steps span:nth-child(1) {
    animation: app-loading-pulse 1.6s ease-in-out infinite;
}

.app-loading-steps span:nth-child(2) {
    animation: app-loading-pulse 1.6s ease-in-out 0.25s infinite;
}

.app-loading-steps span:nth-child(3) {
    animation: app-loading-pulse 1.6s ease-in-out 0.5s infinite;
}

.app-loading-steps span:nth-child(4) {
    animation: app-loading-pulse 1.6s ease-in-out 0.75s infinite;
}

@keyframes app-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes app-loading-pulse {
    0%,
    100% {
        opacity: 0.58;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

@media (max-width: 520px) {
    .app-loading-box {
        padding: 22px;
    }

    .app-loading-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   11. TABLEAUX
========================================================= */

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
}

table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
    background: #ffffff;
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

th {
    background: #f9fafb;
    font-size: 0.95rem;
    white-space: nowrap;
}

tbody tr:hover td {
    background: #f8fafc;
}


/* =========================================================
   12. BADGES ET STATUTS
========================================================= */

.status-badge,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
}

.status-draft {
    background: var(--draft-bg);
    color: var(--draft-text);
}

.status-sent {
    background: var(--sent-bg);
    color: var(--sent-text);
}

.status-paid {
    background: var(--paid-bg);
    color: var(--paid-text);
}

.status-refused {
    background: var(--refused-bg);
    color: var(--refused-text);
}

.status-default {
    background: var(--default-status-bg);
    color: var(--default-status-text);
}

.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-muted {
    background: #f3f4f6;
    color: #374151;
}

.status-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.status-danger {
    background: var(--error-bg);
    color: var(--error-text);
}

.status-pending {
    background: var(--warning-bg);
    color: var(--warning-text);
}


/* =========================================================
   13. FORMULAIRES
========================================================= */

.form-grid,
.create-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

@media (min-width: 1024px) {
    .form-grid,
    .create-grid {
        gap: 16px;
    }
}

.form-group,
.create-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    position: relative;
}

.form-group.full,
.create-field.full {
    grid-column: 1 / -1;
}

.form-group label,
.create-field label {
    font-weight: bold;
}

.required {
    color: var(--danger);
}

.form-group input,
.form-group select,
.form-group textarea,
.create-field input,
.create-field select,
.create-field textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 1rem;
    background: #ffffff;
    color: var(--text);
}

.form-group input:disabled,
.create-field input:disabled {
    background: #f3f4f6;
    color: var(--muted);
}

.form-group small,
.create-field small {
    color: var(--muted);
}

.address-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 60;
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 0;
    padding: 5px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.create-field.has-address-suggestions {
    z-index: 80;
}

.address-suggestions[hidden],
.address-suggestions:empty {
    display: none;
}

.address-suggestion-item {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 9px 10px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.94rem;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
}

.address-suggestion-item:hover,
.address-suggestion-item:focus {
    background: #eef6ff;
    border-color: #bfdbfe;
    color: #0f4c81;
    outline: none;
}


/* =========================================================
   14. PROFIL UTILISATEUR
========================================================= */

.profile-card {
    border-radius: var(--radius-lg);
    padding: 32px;
}

.profile-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.profile-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--primary);
    font-weight: bold;
}

.profile-hero h1 {
    margin: 0 0 8px;
    font-size: 2.1rem;
}

.profile-hero p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.form-section {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
}

.form-section h2 {
    margin: 0 0 18px;
    font-size: 1.25rem;
}

.user-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}


/* =========================================================
   15. PAGE D’ACCUEIL
========================================================= */

.home-section {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.home-login-intro,
.home-login-actions {
    text-align: center;
}

.home-feature-block {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
}

.home-feature-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.home-feature-header h2 {
    margin: 0 0 6px;
    font-size: 1.35rem;
}

.home-feature-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}


/* =========================================================
   16. PAGE CRÉATION DÉCLARATION
   Styles retirés du <style> local de create.php.
========================================================= */

.create-hero,
.lines-header,
.line-card-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.create-hero {
    margin-bottom: 22px;
}

.create-hero h1 {
    margin: 0 0 8px;
}

.create-hero p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.create-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.create-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.create-fieldset legend {
    margin-bottom: 12px;
    font-weight: bold;
    font-size: 1.2rem;
}

.line-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f9fafb;
    padding: 20px;
    margin-bottom: 18px;
    overflow: visible;
}

.line-card-title {
    margin: 0;
    font-size: 1.2rem;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 1024px) {
    .upload-grid {
        gap: 14px;
    }
}

@media (max-width: 900px) {
    .upload-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .upload-grid {
        grid-template-columns: 1fr;
    }
}

.upload-box {
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 16px;
    background: #eff6ff;
}

.upload-box.optional {
    border-color: var(--border);
    background: #f9fafb;
}

.upload-box label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #1e3a8a;
}

.upload-box.optional label {
    color: #374151;
}

.upload-help {
    margin: 8px 0 0;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.4;
}


/* =========================================================
   17. UTILITAIRES
========================================================= */

.is-hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-24 {
    margin-top: 24px;
}

.mb-22 {
    margin-bottom: 22px;
}


/* =========================================================
   18. RESPONSIVE TABLETTE
========================================================= */

@media (min-width: 769px) and (max-width: 1024px) {
    .app-header-inner {
        grid-template-columns: 1fr auto;
    }

    .app-nav {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .dashboard-grid,
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .upload-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   19. RESPONSIVE MOBILE
========================================================= */

@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    .app-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1100;
        max-width: 100%;
    }

    .page {
        width: 100%;
        margin: 0 auto;
        padding: 0 14px 32px;
        margin-top: 100px;
    }

    .card,
    .profile-card {
        padding: 18px;
    }

    .card-spacious {
        padding: 22px;
    }

    .app-header-inner {
        grid-template-columns: 1fr auto;
        padding: 12px 14px;
    }

    .app-logo {
        height: 36px;
    }

    .app-brand-title {
        font-size: 1rem;
    }

    .app-brand-subtitle {
        font-size: 0.82rem;
    }

    .app-menu-toggle {
        display: inline-flex;
    }

    .app-nav {
        grid-column: 1 / -1;
        display: none;
        width: 100%;
        padding-top: 10px;
        align-items: stretch;
        justify-content: stretch;
    }

    .app-header.is-menu-open .app-nav {
        display: flex;
        flex-direction: column;
    }

    .app-nav-link,
    .app-dropdown-toggle {
        width: 100%;
        justify-content: flex-start;
    }

    .app-nav-dropdown {
        width: 100%;
    }

    .app-dropdown-menu {
        position: static;
        min-width: 0;
        width: 100%;
        margin-top: 6px;
        box-shadow: none;
    }

    .app-header-user {
        grid-column: 1 / -1;
        justify-content: flex-start;
        width: 100%;
    }

    .app-user-email {
        display: none;
    }

    .topbar {
        gap: 12px;
    }

    .topbar,
    .home-feature-header,
    .create-hero,
    .lines-header,
    .line-card-header,
    .profile-hero,
    .app-footer-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .section-intro h1,
    .topbar-title h1,
    .profile-hero h1 {
        font-size: 1.55rem;
    }

    .dashboard-grid,
    .feature-grid,
    .form-grid,
    .create-grid,
    .upload-grid {
        grid-template-columns: 1fr;
    }

    .create-field.full,
    .form-group.full {
        grid-column: auto;
    }

    .btn {
        width: 100%;
        min-height: 48px;
        padding: 14px 16px;
    }

    .actions-row,
    .table-actions,
    .profile-actions,
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    table {
        min-width: 700px;
    }

    .app-footer-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .app-brand {
        gap: 10px;
    }

    .app-footer-columns {
        grid-template-columns: 1fr;
    }

    .app-user-pill {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}


/* =========================================================
   20. PAGE LISTE DES DÉCLARATIONS
   Styles spécifiques à la page utilisateur :
   public/pages/demande/index.php
========================================================= */

.declarations-summary-grid {
    margin-bottom: 22px;
}

.declarations-table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.inline-delete-form {
    margin: 0;
}

.action-pill,
.link-button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.action-pill-view {
    color: var(--primary);
    background: #eff6ff;
    border-color: #bfdbfe;
}

.action-pill-view:hover {
    color: #1d4ed8;
    background: #dbeafe;
}

.action-pill-duplicate {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.action-pill-duplicate:hover {
    color: #065f46;
    background: #d1fae5;
}

.link-button-danger {
    color: var(--danger);
    background: #fef2f2;
    border-color: #fecaca;
    font: inherit;
}

.link-button-danger:hover {
    color: var(--danger-hover);
    background: #fee2e2;
}

.empty-state {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: #f9fafb;
    padding: 22px;
    color: var(--muted);
    line-height: 1.6;
}

/* =========================================================
   21. PAGE DÉTAIL D'UNE DÉCLARATION
   Styles spécifiques à la page :
   public/pages/demande/detail.php
========================================================= */

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.info-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: #fafafa;
}

.info-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.info-value {
    font-size: 15px;
    word-break: break-word;
}

.section-box {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    margin-top: 18px;
    background: #fafafa;
}

.line-list {
    margin: 0;
    padding-left: 20px;
    line-height: 1.7;
}

.line-note {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
}

.inline-form {
    display: inline;
}

.recap-box {
    margin-top: 22px;
    padding: 16px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
}

.document-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
}

.action-button.html {
    background: var(--primary);
}

.action-button.html:hover {
    background: var(--primary-hover);
    color: #ffffff;
}

.action-button.pdf {
    background: #15803d;
}

.action-button.pdf:hover {
    background: #166534;
    color: #ffffff;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.documents-note {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
}

.facture-documents {
    background: #f8fafc;
}

.facture-documents-intro {
    margin: 14px 0 18px;
    padding: 14px 16px;
    border-left: 4px solid var(--primary);
    border-radius: 0 10px 10px 0;
    background: #eff6ff;
    color: #1e3a8a;
    line-height: 1.55;
}

.facture-document-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.facture-document-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.facture-document-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.facture-document-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: bold;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.facture-document-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.facture-document-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.facture-document-meta div {
    min-width: 0;
}

.facture-document-meta dt {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: bold;
    text-transform: uppercase;
}

.facture-document-meta dd {
    margin: 0;
    color: var(--text);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.facture-document-download {
    align-self: flex-start;
    margin-top: auto;
}

.facture-global-document {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.facture-global-document p {
    margin: 4px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.facture-technical-error {
    margin-top: 14px;
    color: var(--error-text);
    font-size: 0.9rem;
}

.facture-technical-error summary {
    cursor: pointer;
    font-weight: bold;
}

.facture-technical-error p {
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

.locked-note {
    margin: 0;
    color: var(--muted);
    font-weight: bold;
}

.line-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
    margin-bottom: 12px;
}

.line-title-row h4 {
    margin: 0;
}

.line-completeness {
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: bold;
    white-space: nowrap;
}

.line-completeness.complete {
    border: 1px solid #bbf7d0;
    background: var(--success-bg);
    color: var(--success-text);
}

.line-completeness.incomplete {
    border: 1px solid #fecaca;
    background: var(--error-bg);
    color: var(--error-text);
}

.line-missing-box,
.demande-readiness-box {
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: var(--error-bg);
    color: var(--error-text);
}

.line-missing-box {
    margin: 12px 0 0;
    padding: 12px 14px;
    font-size: 0.95rem;
}

.line-missing-box strong {
    display: block;
    margin-bottom: 6px;
}

.line-missing-box ul,
.demande-readiness-box ul {
    padding-left: 22px;
}

.line-missing-box ul {
    margin: 0;
}

.demande-readiness-box {
    margin-top: 22px;
    padding: 14px 16px;
    font-weight: bold;
}

.demande-readiness-box ul {
    margin: 8px 0 0;
    font-weight: normal;
}

.send-help-text {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.justificatifs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.justificatif-column {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    padding: 14px;
}

.justificatif-column h5 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.justificatif-empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.justificatif-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.justificatif-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f9fafb;
}

.justificatif-file-name {
    font-weight: bold;
    word-break: break-word;
}

.justificatif-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.upload-hint {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.92rem;
    line-height: 1.45;
}

.upload-hint.error {
    border-color: #fecaca;
    background: var(--error-bg);
    color: var(--error-text);
}

.upload-hint.success {
    border-color: #bbf7d0;
    background: var(--success-bg);
    color: var(--success-text);
}

.detail-section-title {
    margin-top: 30px;
}

.upload-section-title {
    margin-top: 18px;
}

.detail-upload-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 540px;
}

.detail-upload-form-categorized {
    max-width: none;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #ffffff;
}

.detail-upload-form-categorized .upload-box {
    min-width: 0;
}

.upload-box.has-document {
    border-style: solid;
    border-color: #86efac;
    background: #f0fdf4;
}

.upload-box.has-document label {
    color: #166534;
}

.upload-state {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
}

.upload-state.success {
    color: var(--success-text);
}

@media (max-width: 768px) {
    .facture-document-grid,
    .facture-document-meta {
        grid-template-columns: 1fr;
    }

    .facture-document-header,
    .facture-global-document {
        flex-direction: column;
        align-items: stretch;
    }

    .facture-document-download,
    .facture-global-document .btn {
        width: 100%;
        text-align: center;
    }

    .document-actions,
    .declarations-table-actions,
    .justificatif-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .action-button,
    .detail-upload-form button,
    .justificatif-actions button {
        width: 100%;
        text-align: center;
    }

    .section-box {
        padding: 14px;
    }

    .detail-upload-form-categorized {
        padding: 12px;
    }
}


/* =========================================================
   22. CORRECTIFS UI — CRÉATION DÉCLARATION
   Compléments nécessaires après retrait du CSS local de create.php.
========================================================= */

.create-section {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    background: #f9fafb;
    overflow: visible;
}

.create-section legend {
    padding: 0 10px;
    font-weight: bold;
    font-size: 1.15rem;
    color: var(--text);
}

.create-section-intro {
    margin: 0 0 20px;
    color: var(--muted);
    line-height: 1.6;
}

.create-field textarea {
    min-height: 96px;
    resize: vertical;
}

.create-field input::placeholder,
.create-field textarea::placeholder {
    color: #9ca3af;
}

.create-field.field-error input,
.create-field.field-error select,
.create-field.field-error textarea {
    border-color: var(--danger);
    background: #fff7f7;
}

.line-card + .line-card {
    margin-top: 18px;
}

.line-card-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.line-card.is-collapsed {
    background: #ffffff;
}

.line-card.is-collapsed .line-card-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.line-card.is-collapsed .line-card-body {
    display: none;
}

.line-card-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.35;
}

.line-window-btn {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 1.15rem;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.line-window-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--primary);
    transform: translateY(-1px);
}

.line-window-btn[hidden] {
    display: none;
}

.upload-grid-documents {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.upload-box-invoice {
    border-style: dashed;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.upload-box-payment {
    border-style: dashed;
    background: #ecfdf5;
    border-color: #86efac;
}

.upload-box-payment label {
    color: #166534;
}

.upload-box-full {
    grid-column: 1 / -1;
}

/* =========================================================
   23. RESPONSIVE CRÉATION DÉCLARATION
   Compléments mobiles propres à la page de création.

   Note : les correctifs desktop du header ont été intégrés
   directement dans les sections 04 et 05 pour éviter les
   surcharges contradictoires.
========================================================= */

@media (max-width: 768px) {
    .create-section {
        padding: 18px;
    }

    .upload-grid-documents {
        grid-template-columns: 1fr;
    }

    .upload-box-full {
        grid-column: auto;
    }
}
/* =========================================================
   24. ADMIN — DASHBOARD TUILES
========================================================= */

.admin-dashboard-card,
.admin-dashboard-stack {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.admin-dashboard-hero,
.admin-dashboard-panel {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.admin-dashboard-hero {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 22px;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.admin-dashboard-hero-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #dbeafe;
    font-size: 1.6rem;
}

.admin-dashboard-hero-content h2 {
    margin: 10px 0 6px;
    font-size: 1.45rem;
}

.admin-dashboard-hero-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.admin-dashboard-panel {
    padding: 22px;
}

.admin-stat-tiles {
    display: grid;
    gap: 16px;
}

.admin-stat-tiles-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-stat-tiles-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-dashboard-panel-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

@media (max-width: 1200px) {
    .admin-stat-tiles-five {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .admin-stat-tiles-five,
    .admin-stat-tiles-three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .admin-stat-tiles-five,
    .admin-stat-tiles-three {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-panel-actions {
        justify-content: stretch;
    }

    .admin-dashboard-panel-actions .btn {
        width: 100%;
    }
}

.admin-stat-tile {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.admin-stat-tile:hover,
.admin-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.admin-stat-tile-horizontal {
    min-height: 130px;
    flex-direction: row;
    align-items: center;
}

.admin-stat-icon,
.admin-action-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 1.45rem;
    flex-shrink: 0;
}

.admin-stat-label {
    display: block;
    color: var(--text);
    font-weight: 700;
}

.admin-stat-value {
    display: block;
    margin-top: 2px;
    font-size: 2rem;
    line-height: 1;
}

.admin-stat-help {
    display: block;
    margin-top: auto;
    color: var(--muted);
    font-size: 0.9rem;
}

.tile-blue {
    border-color: #bfdbfe;
}

.tile-blue .admin-stat-icon,
.action-blue .admin-action-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.tile-blue .admin-stat-value,
.action-blue strong {
    color: #1d4ed8;
}

.tile-orange {
    border-color: #fed7aa;
}

.tile-orange .admin-stat-icon,
.action-orange .admin-action-icon {
    background: #ffedd5;
    color: #ea580c;
}

.tile-orange .admin-stat-value,
.action-orange strong {
    color: #ea580c;
}

.tile-indigo {
    border-color: #c7d2fe;
}

.tile-indigo .admin-stat-icon {
    background: #e0e7ff;
    color: #4f46e5;
}

.tile-indigo .admin-stat-value {
    color: #4f46e5;
}

.tile-green {
    border-color: #bbf7d0;
}

.tile-green .admin-stat-icon,
.action-green .admin-action-icon {
    background: #dcfce7;
    color: #15803d;
}

.tile-green .admin-stat-value,
.action-green strong {
    color: #15803d;
}

.tile-red {
    border-color: #fecaca;
}

.tile-red .admin-stat-icon {
    background: #fee2e2;
    color: #dc2626;
}

.tile-red .admin-stat-value {
    color: #dc2626;
}

.admin-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 900px) {
    .admin-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .admin-action-grid {
        grid-template-columns: 1fr;
    }
}

.admin-action-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    min-height: 118px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
    color: var(--text);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.admin-action-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.admin-action-card small {
    display: block;
    color: var(--muted);
    line-height: 1.45;
}

.admin-action-arrow {
    font-size: 1.4rem;
    color: var(--muted);
}

.action-blue {
    border-color: #bfdbfe;
}

.action-purple {
    border-color: #ddd6fe;
}

.action-purple .admin-action-icon {
    background: #ede9fe;
    color: #7c3aed;
}

.action-purple strong {
    color: #7c3aed;
}

.action-cyan {
    border-color: #a5f3fc;
}

.action-cyan .admin-action-icon {
    background: #cffafe;
    color: #0891b2;
}

.action-cyan strong {
    color: #0891b2;
}

.action-green {
    border-color: #bbf7d0;
}

.action-orange {
    border-color: #fed7aa;
}

@media (max-width: 1100px) {
    .admin-stat-tiles-five,
    .admin-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-stat-tiles-three {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-dashboard-hero {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .admin-stat-tiles-five,
    .admin-stat-tiles-three,
    .admin-action-grid {
        grid-template-columns: 1fr;
    }

    .admin-stat-tile,
    .admin-stat-tile-horizontal,
    .admin-action-card {
        min-height: auto;
    }
}
/* =========================================================
   25. ADMIN — PAGES DE GESTION
========================================================= */

.admin-page-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.admin-demandes-hero {
    margin-bottom: 0;
}

.admin-filters-panel {
    margin: 0;
}

.admin-filters-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 0.75fr 0.75fr;
    gap: 12px;
    align-items: end;
}

.admin-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-filter-field label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.admin-filter-field input,
.admin-filter-field select {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
}

.admin-filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.admin-results-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 14px;
}

.admin-results-summary strong {
    color: var(--text);
}

.admin-table-wrap {
    border-radius: 16px;
}

.admin-table th {
    background: #f8fafc;
    color: var(--text);
    font-size: 0.9rem;
}

.admin-table td {
    vertical-align: middle;
}

.demande-user-meta,
.demande-date-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.demande-user-meta {
    min-width: 190px;
}

.demande-user-meta small,
.demande-date-meta small {
    color: var(--muted);
}

.demande-date-meta {
    white-space: nowrap;
}

.demande-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    background: #f3f4f6;
    color: #374151;
}

.demande-status-pill.envoyee {
    background: #dbeafe;
    color: #1d4ed8;
}

.demande-status-pill.brouillon {
    background: #fef3c7;
    color: #92400e;
}

.demande-status-pill.remboursee {
    background: #dcfce7;
    color: #166534;
}

.demande-status-pill.refusee {
    background: #fee2e2;
    color: #991b1b;
}

.demande-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.empty-admin-state {
    margin: 0;
    padding: 18px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    color: var(--muted);
    background: #fafafa;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .admin-filters-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-results-summary {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 700px) {
    .admin-filters-grid {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   26. ADMIN DEMANDES — FILTRES ET TABLEAU ERGONOMIQUES
========================================================= */

.admin-filters-panel-modern {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f8fafc;
    padding: 18px;
}

.admin-filters-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 14px;
}

.admin-filter-search input {
    min-height: 48px;
    font-size: 1rem;
}

.admin-filter-actions-main {
    margin-top: 0;
    white-space: nowrap;
}

.admin-filters-grid-compact {
    display: grid;
    grid-template-columns: 1fr 1.4fr 0.8fr 0.8fr;
    gap: 12px;
    align-items: end;
}

.active-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.active-filter-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.84rem;
    font-weight: 700;
}

.admin-table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
    border-collapse: collapse;
}

.admin-table thead th {
    padding: 14px 14px;
    text-align: left;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.admin-table tbody td {
    padding: 16px 14px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: background 0.15s ease;
}

.admin-table tbody tr:hover {
    background: #f8fafc;
}

.demande-actions-inline {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.demande-actions-inline .small-btn {
    min-width: 0;
    min-height: 38px;
    padding: 8px 12px;
    font-size: 0.85rem;
    border-radius: 10px;
}

.admin-table td:last-child {
    width: auto;
    min-width: 120px;
}

.admin-demandes-table td {
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}


.etat-inline-control {
    flex-wrap: wrap;
    min-width: 0;
}

.etat-select {
    width: 100%;
    max-width: 220px;
}

.demande-user-meta strong {
    font-size: 0.96rem;
    color: var(--text);
}

.demande-user-meta small {
    font-size: 0.82rem;
}

.demande-date-meta span {
    font-size: 0.92rem;
    font-weight: 600;
}

.demande-date-meta small {
    font-size: 0.8rem;
}

.demande-status-pill {
    min-width: 92px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    justify-content: center;
}

.admin-results-summary {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 4px 2px 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #eef2f7;
    color: var(--muted);
    font-size: 0.92rem;
}

.admin-results-summary strong {
    color: var(--text);
    font-size: 1rem;
}

@media (max-width: 1100px) {
    .admin-filters-main,
    .admin-results-summary {
        grid-template-columns: 1fr;
    }

    .admin-filter-actions-main {
        white-space: normal;
    }

    .admin-filters-grid-compact {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .admin-filters-grid-compact {
        grid-template-columns: 1fr;
    }

    .demande-actions-inline {
        flex-direction: column;
        align-items: stretch;
    }
}

/* =========================================================
   27. ADMIN DEMANDES — ÉTAT INTERACTIF
   Select inline permettant à l’administrateur ou à la comptabilité
   de modifier l’état d’une déclaration depuis le tableau.
========================================================= */

.etat-inline-form {
    margin: 0;
}

.etat-inline-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 160px;
}

.etat-select {
    min-height: 38px;
    width: 132px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.etat-submit-btn {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.etat-submit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.etat-select-brouillon {
    border-color: #fde68a;
    background: #fef3c7;
    color: #92400e;
}

.etat-select-envoyee {
    border-color: #bfdbfe;
    background: #dbeafe;
    color: #1d4ed8;
}

.etat-select-remboursee,
.etat-select-validee,
.etat-select-status-paid {
    border-color: #bbf7d0;
    background: #dcfce7;
    color: #166534;
}

.etat-select-refusee,
.etat-select-status-refused {
    border-color: #fecaca;
    background: #fee2e2;
    color: #991b1b;
}

.etat-select-status-draft,
.etat-select-default {
    border-color: #fde68a;
    background: #fef3c7;
    color: #92400e;
}

.etat-select-status-sent {
    border-color: #bfdbfe;
    background: #dbeafe;
    color: #1d4ed8;
}

.admin-demandes-table td:nth-child(4) {
    min-width: 175px;
}

@media (max-width: 700px) {
    .etat-inline-control {
        width: 100%;
    }

    .etat-select {
        width: 100%;
    }
}

/* =========================================================
   28. CORRECTIFS RESPONSIVE — HEADER, MOBILE ET ADMIN DEMANDES
   Ajouts ciblés v7 :
   - stabilise le header mobile ;
   - évite que le menu hamburger pousse trop le contenu ;
   - réduit les débordements des champs ;
   - optimise le tableau admin sur desktop ;
   - bascule les demandes admin en cartes sur mobile.
========================================================= */

body {
    overflow-x: hidden;
}

.page,
.card,
.admin-dashboard-panel,
.admin-filters-panel-modern,
.table-wrap {
    min-width: 0;
}

.app-header,
.app-header * {
    max-width: 100%;
}

.app-brand {
    overflow: hidden;
}

.app-brand-text {
    min-width: 0;
}

.app-brand-title,
.app-brand-subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-menu-toggle[aria-expanded="true"] .app-menu-icon {
    background: transparent;
}

.app-menu-toggle[aria-expanded="true"] .app-menu-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.app-menu-toggle[aria-expanded="true"] .app-menu-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-demandes-table {
    min-width: 980px;
    table-layout: auto;
}

.admin-demandes-table thead th {
    white-space: nowrap;
}

.admin-demandes-table th,
.admin-demandes-table td {
    padding: 12px 10px;
}

.admin-demandes-table th:nth-child(1),
.admin-demandes-table td:nth-child(1) { width: 92px; }
.admin-demandes-table th:nth-child(5),
.admin-demandes-table td:nth-child(5) { min-width: 92px; width: 92px; }
.admin-demandes-table th:nth-child(7),
.admin-demandes-table td:nth-child(7) { min-width: 100px; width: 100px; }
.admin-demandes-table th:nth-child(8),
.admin-demandes-table td:nth-child(8) { min-width: 140px; width: 140px; }

.admin-demandes-table td,
.demande-user-meta,
.demande-date-meta {
    overflow-wrap: anywhere;
    word-break: normal;
}

.admin-demandes-table .badge,
.admin-demandes-table .etat-select,
.admin-demandes-table .small-btn {
    max-width: 100%;
}

.admin-deplacements-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.admin-deplacements-table th,
.admin-deplacements-table td {
    padding: 12px 8px;
}

.admin-deplacements-table th:nth-child(1),
.admin-deplacements-table td:nth-child(1) { width: 5%; }
.admin-deplacements-table th:nth-child(2),
.admin-deplacements-table td:nth-child(2) { width: 18%; }
.admin-deplacements-table th:nth-child(3),
.admin-deplacements-table td:nth-child(3) { width: 10%; }
.admin-deplacements-table th:nth-child(4),
.admin-deplacements-table td:nth-child(4) { width: 15%; }
.admin-deplacements-table th:nth-child(5),
.admin-deplacements-table td:nth-child(5) { width: 9%; white-space: nowrap; }
.admin-deplacements-table th:nth-child(6),
.admin-deplacements-table td:nth-child(6) { width: 10%; white-space: nowrap; }
.admin-deplacements-table th:nth-child(7),
.admin-deplacements-table td:nth-child(7) { width: 15%; }
.admin-deplacements-table th:nth-child(8),
.admin-deplacements-table td:nth-child(8) { width: 10%; }
.admin-deplacements-table th:nth-child(9),
.admin-deplacements-table td:nth-child(9) { width: 8%; }

.admin-deplacements-table td,
.admin-deplacements-table .demande-user-meta {
    min-width: 0;
    overflow-wrap: anywhere;
}

.admin-deplacements-table .etat-inline-control,
.admin-deplacements-table .etat-select {
    width: 100%;
    min-width: 0;
}

.admin-deplacements-table .demande-actions-inline {
    gap: 6px;
}

.admin-deplacements-table .small-btn {
    width: 100%;
    padding-inline: 8px;
}


.admin-demandes-mobile-list {
    display: none;
}

.admin-demande-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
    padding: 16px;
    box-shadow: var(--shadow-soft);
}

.admin-demande-card + .admin-demande-card {
    margin-top: 14px;
}

.admin-demande-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eef2f7;
}

.admin-demande-card-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-demande-card-title strong {
    font-size: 1.1rem;
}

.admin-demande-card-title small {
    color: var(--muted);
}

.admin-demande-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.admin-demande-card-field {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 10px;
    align-items: start;
    font-size: 0.95rem;
}

.admin-demande-card-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-demande-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

@media (min-width: 1101px) {
    .admin-table-wrap {
        overflow-x: visible;
    }
}

@media (max-width: 1100px) {
    .admin-demandes-table {
        min-width: auto;
    }

    .admin-table-wrap {
        display: none !important;
    }

    .admin-demandes-mobile-list {
        display: block !important;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    body {
        align-items: stretch;
    }

    .app-header {
        position: sticky;
        top: 0;
    }

    .app-header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px 12px;
        padding: 10px 12px;
    }

    /*
     * Sur mobile, la pastille utilisateur remplace visuellement la marque.
     * Sans ce masquage explicite, les deux éléments occupent la première
     * ligne de la grille et quelques pixels du logo dépassent de la pastille.
     */
    .app-brand {
        display: none;
    }

    .app-logo {
        height: 34px;
        flex: 0 0 auto;
    }

    .app-brand-title {
        font-size: 0.98rem;
        line-height: 1.15;
        white-space: normal;
    }

    .app-brand-subtitle {
        display: none;
    }

    .app-menu-toggle {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-height: 40px;
        padding: 9px 12px;
        flex-shrink: 0;
    }

    .app-header-user {
        grid-area: auto;
        grid-column: 1 / -1;
        grid-row: 1;
        order: 3;
        justify-content: center;
        gap: 6px;
        font-size: 0.86rem;
    }

    .app-user-pill {
        width: 100%;
        max-width: 360px;
        padding: 7px 10px;
        text-align: center;
    }

    .app-user-role {
        display: none;
    }

    .app-nav {
        position: absolute;
        top: 100%;
        left: 12px;
        right: 12px;
        z-index: 1101;
        display: none;
        flex-direction: column;
        gap: 4px;
        max-height: calc(100vh - 140px);
        overflow-y: auto;
        padding: 10px 0;
        background: #ffffff;
        border: 1px solid var(--header-border);
        border-top: none;
        border-radius: 0 0 14px 14px;
        box-shadow: var(--shadow-soft);
    }

    .app-header.is-menu-open .app-nav {
        display: flex !important;
    }

    .app-nav-link,
    .app-dropdown-toggle {
        min-height: 44px;
        padding: 12px 14px;
        margin: 0 8px;
        justify-content: flex-start;
        text-align: left;
        border-radius: 10px;
    }

    .page {
        width: 100%;
        margin: 18px auto;
        padding-left: 12px;
        padding-right: 12px;
    }

    .section-title-row,
    .admin-results-summary {
        text-align: center;
    }

    .admin-dashboard-hero,
    .admin-dashboard-panel {
        border-radius: 18px;
        padding: 16px;
    }

    .admin-dashboard-hero-content,
    .admin-dashboard-hero-content p {
        text-align: center;
    }

    .admin-dashboard-hero-icon {
        margin: 0 auto;
    }

    .admin-filters-panel-modern {
        padding: 14px;
    }

    .admin-filter-actions,
    .admin-filter-actions-main {
        width: 100%;
    }

    .admin-filter-actions .btn,
    .admin-filter-actions-main .btn {
        width: 100%;
    }

    .admin-filter-field input,
    .admin-filter-field select,
    .form-group input,
    .form-group select,
    .form-group textarea,
    .create-field input,
    .create-field select,
    .create-field textarea {
        max-width: 100%;
        min-width: 0;
    }

    .admin-table-wrap {
        display: none;
    }

    .admin-demandes-mobile-list {
        display: block;
    }

    .admin-demande-card-actions {
        flex-direction: column;
    }

    .admin-demande-card-actions .btn,
    .admin-demande-card-actions .small-btn {
        width: 100%;
    }

    .admin-demande-card .etat-inline-control {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 42px;
    }

    .admin-demande-card .etat-select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 430px) {
    .app-header-inner {
        padding-left: 10px;
        padding-right: 10px;
    }

    .app-brand {
        gap: 8px;
    }

    .app-logo {
        height: 30px;
    }

    .app-brand-title {
        font-size: 0.92rem;
    }

    .app-menu-toggle {
        padding: 8px 10px;
    }

    .app-menu-toggle span:not(.app-menu-icon) {
        font-size: 0.92rem;
    }

    .admin-dashboard-panel,
    .admin-dashboard-hero,
    .card {
        padding: 14px;
    }

    .admin-demande-card-field {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}
/* =========================================================
   29. CORRECTIFS MOBILE — DÉBORDEMENTS ET FOOTER
   À garder en fin de fichier pour surcharger les anciens blocs.
========================================================= */

@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .page,
    main.page,
    .card,
    .admin-page-stack,
    .admin-filters-panel,
    .admin-filters-panel-modern,
    .admin-filters-main,
    .admin-filters-grid,
    .admin-filters-grid-compact,
    .admin-filter-field,
    .admin-results-summary,
    .table-wrap,
    .admin-table-wrap {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .admin-filters-panel,
    .admin-filters-panel-modern,
    .card {
        overflow: hidden;
    }

    .deplacement-create-card,
    .create-section,
    .line-card {
        overflow: visible;
    }

    .admin-filter-field input,
    .admin-filter-field select,
    .form-group input,
    .form-group select,
    .form-group textarea,
    .create-field input,
    .create-field select,
    .create-field textarea {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .admin-filter-actions,
    .admin-filter-actions-main,
    .form-actions,
    .actions-row {
        width: 100%;
    }

    .admin-filter-actions .btn,
    .admin-filter-actions-main .btn,
    .form-actions .btn,
    .actions-row .btn {
        width: 100%;
        max-width: 100%;
    }

    .app-footer-inner {
        text-align: center;
        align-items: center;
    }

    .app-footer-brand,
    .app-footer-columns,
    .app-footer-columns div {
        width: 100%;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .app-header-inner,
    .page {
        max-width: 100%;
        overflow-x: hidden;
    }

    .admin-filters-panel-modern,
    .admin-filters-panel,
    .card {
        padding-left: 14px;
        padding-right: 14px;
    }
}


/* =========================================================
   30. Module déplacements — ergonomie formulaire create
   Amélioration des boutons, duplication et case aller-retour.
========================================================= */

.line-card-actions {
    justify-content: flex-end;
    gap: 8px;
}

.btn-compact {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 0.94rem;
}

.btn-duplicate-line {
    appearance: none;
    border: none;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 10px;
    background: var(--success);
    color: #ffffff;
    font-size: 0.94rem;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(21, 128, 61, 0.24);
}

.btn-duplicate-line:hover {
    background: var(--success-hover);
    color: #ffffff;
    transform: translateY(-1px);
}

.return-trip-field {
    align-self: stretch;
}

.return-trip-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 14px 16px;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    background: #f0fdf4;
    color: #14532d;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.return-trip-choice:hover {
    border-color: #86efac;
    background: #ecfdf5;
    box-shadow: 0 8px 18px rgba(21, 128, 61, 0.12);
    transform: translateY(-1px);
}

.return-trip-choice input[type="checkbox"] {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.return-trip-toggle {
    position: relative;
    flex: 0 0 auto;
    width: 54px;
    height: 30px;
    border-radius: 999px;
    background: #d1d5db;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
    transition: background 0.15s ease;
}

.return-trip-toggle::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22);
    transition: transform 0.15s ease;
}

.return-trip-choice input[type="checkbox"]:checked + .return-trip-toggle {
    background: var(--success);
}

.return-trip-choice input[type="checkbox"]:checked + .return-trip-toggle::after {
    transform: translateX(24px);
}

.return-trip-choice input[type="checkbox"]:focus-visible + .return-trip-toggle {
    outline: 3px solid rgba(21, 128, 61, 0.28);
    outline-offset: 3px;
}

.return-trip-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
}

.return-trip-content strong {
    color: #14532d;
}

.return-trip-content small {
    color: #166534;
    font-weight: normal;
}

.deplacement-form-actions {
    margin-top: 4px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.deplacement-form-actions .btn {
    min-width: 190px;
}

.btn-send-main {
    min-width: 230px;
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.18);
}

@media (max-width: 768px) {
    .line-card-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
    }

    .line-card-actions .line-window-btn {
        width: 34px;
        max-width: 34px;
    }

    .line-card-actions .btn {
        width: auto;
    }

    .line-card-actions .btn-compact {
        width: auto;
    }

    .line-card-actions .btn-duplicate-line {
        width: auto;
    }

    .return-trip-choice {
        min-height: 78px;
    }

    .deplacement-form-actions .btn {
        min-width: 0;
    }
}
