/*
 * Landaya - thème du frontend (public, promoteur, authentification).
 * Chargé après main.css : il harmonise la présentation sans toucher au balisage des pages.
 * Identité conservée : bleu-vert Landaya (#007481), couleurs du drapeau (rouge, jaune, vert).
 */

:root {
    --primary: #007481;
    --primary-dark: #005b66;
    --primary-soft: #e6f4f5;
    --accent: #f5b800;
    --flag-red: #ce1126;
    --flag-yellow: #fcd116;
    --flag-green: #009460;
    --ink: #1c2b33;
    --muted: #5f6f78;
    --line: #e3e9ec;
    --surface: #ffffff;
    --page: #f4f7f8;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(16, 42, 51, .06), 0 1px 3px rgba(16, 42, 51, .08);
    --shadow: 0 8px 24px rgba(16, 42, 51, .08);
    --header-h: 68px;

    --bs-primary: #007481;
    --bs-primary-rgb: 0, 116, 129;
    --bs-link-color: #007481;
    --bs-link-color-rgb: 0, 116, 129;
    --bs-link-hover-color: #005b66;
    --bs-border-radius: 8px;
    --bs-body-color: #1c2b33;
}

/* ---------- Base ---------- */

* { font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif; }

body {
    background-color: var(--page) !important;
    color: var(--ink);
    padding-top: var(--header-h) !important;
    -webkit-font-smoothing: antialiased;
}

main { min-height: calc(100vh - var(--header-h)); }

h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 600; letter-spacing: -.01em; }

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

.text-muted { color: var(--muted) !important; }

::selection { background: var(--primary); color: #fff; }

:focus-visible { outline: 3px solid rgba(0, 116, 129, .35); outline-offset: 2px; }

/* ---------- En-tête ---------- */

#header {
    background: var(--surface);
    border-bottom: 0 !important;
    box-shadow: 0 1px 0 var(--line), 0 4px 16px rgba(16, 42, 51, .05);
}

#header::after {
    /* filet aux couleurs du drapeau */
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--flag-red) 0 33.3%, var(--flag-yellow) 33.3% 66.6%, var(--flag-green) 66.6% 100%);
}

.navbar,
.navbar.scrolled {
    /* Barre opaque et toujours dans l'en-tête fixe : main.css la rendait « position: fixed »
       et transparente au défilement (classe .scrolled ajoutée par main.js). */
    position: relative !important;
    background: var(--surface) !important;
    border: 0 !important;
    min-height: var(--header-h);
    padding-top: .5rem;
    padding-bottom: .5rem;
}

/* Ombre un peu plus marquée une fois la page défilée */
#header:has(.navbar.scrolled) { box-shadow: 0 1px 0 var(--line), 0 6px 20px rgba(16, 42, 51, .10); }

.navbar .navbar-brand img { background: transparent !important; padding: 0 !important; }
.navbar .bg-secondary { background: transparent !important; }

.navbar .nav-link {
    color: var(--ink) !important;
    font-weight: 500;
    font-size: .95rem;
    padding: .5rem .85rem !important;
    border-radius: 999px;
    transition: background-color .2s ease, color .2s ease;
}

.navbar .nav-link:hover {
    color: var(--primary) !important;
    background-color: var(--primary-soft) !important;
}

.navbar .nav-link.active {
    color: #fff !important;
    background-color: var(--primary) !important;
}

.navbar .dropdown-menu {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow);
    padding: .4rem;
    min-width: 290px;
}

.navbar .dropdown-menu a,
.navbar .dropdown-menu .dropdown-item {
    color: var(--ink) !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: var(--radius-sm);
    padding: .45rem .75rem;
    font-size: .92rem;
}

.navbar .dropdown-menu a:hover,
.navbar .dropdown-menu .dropdown-item:hover {
    color: var(--primary) !important;
    background-color: var(--primary-soft) !important;
}

.navbar .profile .dropdown-menu li.bg-primary {
    background: var(--primary-soft) !important;
    color: var(--primary) !important;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: .45rem .75rem !important;
    margin-bottom: .25rem;
}

/* Sélecteur de langue FR | EN (partial frontend.partials.language-switcher) */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f4f7f8;
}

.lang-option {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.2;
    color: var(--muted) !important;
    text-decoration: none;
    border: 0 !important;
    margin: 0 !important;
    transition: background-color .2s ease, color .2s ease;
}

.lang-option img { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; opacity: .75; }
a.lang-option:hover { color: var(--primary) !important; background: #fff; }
a.lang-option:hover img { opacity: 1; }
.lang-option.active { background: #fff; color: var(--ink) !important; box-shadow: var(--shadow-sm); }
.lang-option.active img { opacity: 1; }

/* Variante sur fond sombre (pied de page) */
.lang-switch-dark { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }
.lang-switch-dark .lang-option { color: #b9cacf !important; }
.lang-switch-dark a.lang-option:hover { background: rgba(255, 255, 255, .1); color: #fff !important; }
.lang-switch-dark .lang-option.active { background: #fff; color: var(--ink) !important; }

/* Boutons de connexion / inscription / profil */
.navbar .btn-outline-warning {
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
    background: transparent;
    border-radius: 999px;
    font-weight: 500;
    padding: .4rem 1rem;
}

.navbar .btn-outline-warning:hover,
.navbar .btn-outline-warning.active {
    color: #fff !important;
    background: var(--primary) !important;
}

.navbar .profile .btn-outline-warning { padding: .35rem .55rem; }

.navbar-toggler {
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-sm);
    padding: .35rem .55rem;
}

.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(0, 116, 129, .2); }

@media (max-width: 991.98px) {
    .navbar .navbar-nav { margin-top: .75rem; gap: .15rem; }

    .navbar-collapse {
        background: var(--surface) !important;
        border: 1px solid var(--line) !important;
        border-radius: var(--radius) !important;
        box-shadow: var(--shadow);
        padding: .75rem !important;
        margin-top: .75rem;
        max-height: calc(100vh - var(--header-h) - 1rem);
        overflow-y: auto;
    }

    .navbar a { border: 0 !important; margin-bottom: 0 !important; text-align: left; }
    .navbar-collapse .nav-link { background: transparent !important; }
    .navbar .dropdown-menu { box-shadow: none; border: 0 !important; padding-left: .5rem; }
    .navbar .lang-switch { margin: .5rem 0 0 .35rem; }
    .navbar .d-flex.justify-content-center.gap-2 { justify-content: flex-start !important; padding-top: .5rem; }
    .profile.dropdown { text-align: left; }
}

/* ---------- Titres de section ---------- */

.page-title {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 2.5rem 0 1.5rem !important;
    justify-content: center !important;
    gap: .9rem;
}

.page-title > .d-flex { gap: 3px; }
.page-title > .d-flex > div { width: 6px; height: 6px; padding: 0 !important; border-radius: 50%; }

.page-title > .text-center {
    color: var(--ink) !important;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: -.01em;
}

/* ---------- Cartes, blocs, accordéons ---------- */

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card.shadow-lg { box-shadow: var(--shadow) !important; }

.card-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    border-top-left-radius: var(--radius) !important;
    border-top-right-radius: var(--radius) !important;
    padding: 1rem 1.25rem;
}

.bg-tertiary { background-color: var(--surface) !important; }
.rounded.border.bg-tertiary,
.rounded.p-2.bg-tertiary { border-color: var(--line) !important; border-radius: var(--radius) !important; box-shadow: var(--shadow-sm); }

.accordion-item {
    border: 1px solid var(--line) !important;
    border-radius: var(--radius) !important;
    overflow: hidden;
}

.accordion-button { font-weight: 500; }
.accordion-button:not(.collapsed) { color: var(--primary); background-color: var(--primary-soft); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 3px rgba(0, 116, 129, .2); }

/* ---------- Boutons ---------- */

.btn { border-radius: var(--radius-sm); font-weight: 500; }

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus { background-color: var(--primary-dark) !important; border-color: var(--primary-dark) !important; }

.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.btn-warning { background-color: var(--accent); border-color: var(--accent); color: var(--ink); }

/* ---------- Formulaires ---------- */

.form-control,
.form-select {
    border-color: #d5dee2;
    border-radius: var(--radius-sm);
    padding: .6rem .8rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 116, 129, .15);
}

.input-group-text {
    background: #f7fafb;
    border-color: #d5dee2;
    color: var(--primary);
}

.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) { border-top-left-radius: 0; border-bottom-left-radius: 0; }

.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

label, .form-label { font-weight: 500; color: var(--ink); }

/* ---------- Tableaux ---------- */

.table { --bs-table-bg: var(--surface); margin-bottom: 0; }

.table > thead th,
.table > tfoot th,
.table-success > th,
thead.table-success th,
tfoot.table-success th {
    background: #f1f6f7 !important;
    color: var(--muted) !important;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-color: var(--line) !important;
    white-space: nowrap;
}

.table > tbody td { vertical-align: middle; border-color: var(--line); }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: var(--primary-soft); }

.table-responsive,
#table {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* ---------- Pagination, alertes, badges ---------- */

.pagination .page-link { color: var(--primary); border-color: var(--line); }
.pagination .page-item.active .page-link { background-color: var(--primary); border-color: var(--primary); color: #fff; }

.alert { border-radius: var(--radius); border-width: 1px; }

.badge { font-weight: 500; border-radius: 999px; }

/* ---------- Héros de la page d'accueil ---------- */

#hero-section { position: relative; }

/* ---------- Pied de page ---------- */

.site-footer {
    /* Dégradé vert : du vert profond au vert de la marque (#007481), avec une touche du vert du drapeau */
    background:
        radial-gradient(circle at 85% 10%, rgba(0, 148, 96, .35), transparent 45%),
        radial-gradient(circle at 10% 90%, rgba(252, 209, 22, .06), transparent 40%),
        linear-gradient(160deg, #00474f 0%, #005b66 35%, #007481 75%, #00806b 100%);
    color: rgba(255, 255, 255, .82);
    margin-top: 4rem;
    font-size: .95rem;
}

.site-footer::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--flag-red) 0 33.3%, var(--flag-yellow) 33.3% 66.6%, var(--flag-green) 66.6% 100%);
}

.site-footer .footer-main { padding-top: 3.5rem; padding-bottom: 2rem; }

.site-footer .footer-brand {
    display: inline-block;
    background: #fff;
    border-radius: var(--radius);
    padding: .65rem .9rem;
}

.site-footer .footer-about { color: rgba(255, 255, 255, .8); line-height: 1.6; margin: 1.1rem 0 1.25rem; max-width: 380px; }

.site-footer .footer-ministry { display: flex; align-items: center; gap: .75rem; }
.site-footer .footer-ministry img { flex: 0 0 auto; object-fit: contain; }
.site-footer .footer-ministry strong { display: block; color: #fff; font-weight: 600; line-height: 1.3; }
.site-footer .footer-ministry span { display: block; color: rgba(255, 255, 255, .65); font-size: .85rem; }

.site-footer h2 {
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 1.25rem;
    padding-bottom: .6rem;
    position: relative;
}

.site-footer h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 28px;
    height: 3px;
    border-radius: 3px;
    background: var(--flag-yellow);
}

.site-footer nav a { display: inline-block; transition: color .2s ease, transform .2s ease; }
.site-footer nav a:hover { transform: translateX(3px); }

/* Bande d'appel à l'action en haut du pied de page */
.site-footer .footer-cta {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 3rem;
    padding: 1.75rem 2rem;
    border-radius: 16px;
    background:
        radial-gradient(circle at 100% 0, rgba(252, 209, 22, .2), transparent 45%),
        linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(4px);
    box-shadow: 0 12px 30px rgba(0, 40, 45, .25);
}

.site-footer .footer-cta h2 {
    font-size: 1.35rem;
    text-transform: none;
    letter-spacing: -.01em;
    margin: 0 0 .35rem;
    padding: 0;
}

.site-footer .footer-cta h2::after { display: none; }
.site-footer .footer-cta p { color: rgba(255, 255, 255, .85); margin: 0; max-width: 560px; }
.site-footer .footer-cta .btn-warning { color: var(--ink); font-weight: 600; }
.site-footer .footer-cta .btn-outline-light { border-color: rgba(255, 255, 255, .5); color: #fff; }
.site-footer .footer-cta .btn-outline-light:hover { background: #fff; color: var(--primary); }

@media (min-width: 992px) {
    .site-footer .footer-cta { flex-direction: row; align-items: center; justify-content: space-between; }
}

.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer nav li { margin-bottom: .6rem; }

.site-footer a { color: #e2ecee; text-decoration: none; transition: color .2s ease; }
.site-footer a:hover { color: var(--flag-yellow); }

.site-footer .footer-contact li { display: flex; gap: .75rem; align-items: center; margin-bottom: .8rem; }
.site-footer .footer-contact-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .12);
    color: var(--flag-yellow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.site-footer .footer-link-arrow { display: inline-flex; align-items: center; font-weight: 600; color: var(--flag-yellow); margin-top: .25rem; }
.site-footer .footer-link-arrow:hover { color: #fff; }
.site-footer .footer-link-arrow i { transition: transform .2s ease; }
.site-footer .footer-link-arrow:hover i { transform: translateX(3px); }

.site-footer .btn-outline-light { border-color: rgba(255, 255, 255, .35); color: #fff; border-radius: 999px; padding: .35rem .9rem; }
.site-footer .btn-outline-light:hover { background: #fff; color: var(--primary); }

.site-footer .footer-partners {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, .15);
}

.site-footer .footer-partners > span:first-child {
    color: rgba(255, 255, 255, .65);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.site-footer .partner-chip { display: inline-flex; background: #fff; border-radius: var(--radius-sm); padding: .3rem .6rem; }

.site-footer .footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.site-footer .footer-social a:hover { background: var(--flag-yellow); color: var(--ink); }

.site-footer .footer-bottom {
    background: rgba(0, 35, 40, .35);
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .85rem;
    color: rgba(255, 255, 255, .72);
}

@media (max-width: 767.98px) {
    .site-footer .footer-main { padding-top: 2.5rem; }
    .site-footer .footer-bottom .container { text-align: center; }
}

/* ---------- Bouton « remonter » ---------- */

#topBtn {
    border: 0 !important;
    background: var(--primary) !important;
    color: #fff !important;
    opacity: .9 !important;
    width: 44px;
    height: 44px;
    padding: 0 !important;
    font-size: 18px !important;
    box-shadow: var(--shadow);
    right: 16px !important;
    bottom: 16px !important;
}

/* ---------- Pages d'authentification ---------- */

.auth-page {
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: stretch;
    background: var(--page);
}

.auth-aside {
    position: relative;
    color: #fff;
    background:
        linear-gradient(160deg, rgba(0, 91, 102, .94), rgba(0, 116, 129, .86)),
        url('../images/backgrounds/auth-background.png') center/cover;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-aside::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--flag-red) 0 33.3%, var(--flag-yellow) 33.3% 66.6%, var(--flag-green) 66.6% 100%);
}

.auth-aside .auth-logo {
    display: inline-block;
    background: #fff;
    border-radius: var(--radius);
    padding: .6rem .9rem;
}

.auth-aside h1 { color: #fff; font-size: 2rem; font-weight: 700; line-height: 1.2; margin: 2.5rem 0 1rem; }
.auth-aside p { color: rgba(255, 255, 255, .85); font-size: 1.05rem; }

.auth-aside ul { list-style: none; padding: 0; margin: 2rem 0 0; }
.auth-aside li { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1rem; color: rgba(255, 255, 255, .92); }
.auth-aside li i {
    flex: 0 0 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--flag-yellow);
}

.auth-aside small { color: rgba(255, 255, 255, .7); }

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.25rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 2.25rem;
}

.auth-card.auth-card-wide { max-width: 760px; }

.auth-card .auth-card-header { margin-bottom: 1.75rem; }
.auth-card .auth-card-header h2 { font-size: 1.5rem; margin-bottom: .2rem; }
.auth-card .auth-card-header p { color: var(--muted); margin: 0; }

.auth-card-title { display: flex; align-items: center; gap: .9rem; }
.auth-card-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    background: linear-gradient(135deg, #009460, var(--primary) 55%, #005b66);
    box-shadow: 0 6px 16px rgba(0, 116, 129, .28);
}

/* Champs : libellé visible, icône à gauche, focus vert, bouton « œil » intégré */
.auth-field { margin-bottom: 1.1rem; }
.auth-field .form-label { font-weight: 500; font-size: .9rem; color: var(--ink); margin-bottom: .35rem; }
.auth-field .input-group-text {
    background: var(--primary-soft);
    border-color: var(--line);
    color: var(--primary);
    min-width: 44px;
    justify-content: center;
}
.auth-field .form-control,
.auth-field .form-select { border-color: var(--line); padding-top: .6rem; padding-bottom: .6rem; }
.auth-field .form-control::placeholder { color: #9aa8ae; }
.auth-field .form-control[readonly] { background: var(--page); color: var(--muted); }
.auth-field .input-group:focus-within .input-group-text,
.auth-field .input-group:focus-within .auth-password-toggle { border-color: var(--primary); }
.auth-field .input-group:focus-within .form-control,
.auth-field .input-group:focus-within .form-select { border-color: var(--primary); box-shadow: none; }
.auth-field .input-group:focus-within { border-radius: var(--bs-border-radius); box-shadow: 0 0 0 .2rem rgba(0, 116, 129, .15); }
.auth-field .is-invalid ~ .auth-password-toggle,
.auth-field .input-group:has(.is-invalid) .input-group-text { border-color: var(--bs-form-invalid-border-color); }

.auth-password-toggle {
    border: 1px solid var(--line);
    border-left: 0;
    background: #fff;
    color: var(--muted);
    min-width: 44px;
}
.auth-password-toggle:hover,
.auth-password-toggle[aria-pressed="true"] { color: var(--primary); background: var(--primary-soft); }
.auth-password-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

.auth-capslock { margin-top: .35rem; font-size: .8rem; color: #9a6b00; }

.auth-link { color: var(--primary); font-weight: 500; text-decoration: none; }
.auth-link:hover { color: var(--primary-dark); text-decoration: underline; }

.auth-help {
    background: var(--primary-soft);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: .75rem 1rem;
    font-size: .9rem;
    color: var(--ink);
    margin-bottom: 1.25rem;
}

.auth-required-note { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }

/* Inscription : sections */
.auth-section { margin-bottom: 1.25rem; padding-bottom: .25rem; }
.auth-section + .auth-section { border-top: 1px dashed var(--line); padding-top: 1.1rem; }
.auth-section legend {
    float: none;
    width: auto;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--primary);
    margin-bottom: .9rem;
}
.auth-section .row > [class*="col"] > .auth-field { margin-bottom: 0; }
.auth-section .iti { width: 100%; }

.auth-mobile-logo {
    text-align: center;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}
.auth-mobile-logo img { display: inline-block; }

/* Boutons des formulaires : couleur unie (pas de dégradé) */
.auth-card .btn-primary {
    padding: .7rem 1rem;
    font-weight: 600;
    background-image: none !important;
}
.auth-card .btn-primary.is-loading { opacity: .85; pointer-events: none; }

.auth-card .auth-switch {
    text-align: center;
    color: var(--muted);
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

@media (max-width: 991.98px) {
    .auth-aside { display: none !important; }
    .auth-card { padding: 1.5rem; }
}

/* ---------- Page d'accueil ---------- */

.home-hero {
    min-height: calc(88vh - var(--header-h));
    display: flex;
    align-items: center;
    padding: 4rem 0 7rem;
    color: #fff;
    background:
        linear-gradient(160deg, rgba(0, 63, 71, .88), rgba(0, 116, 129, .78)),
        url('../images/backgrounds/auth-background.png') center/cover !important;
}

.home-hero .hero-logo {
    width: 240px !important;
    max-width: 70%;
    background: #fff;
    border-radius: var(--radius);
    padding: .6rem 1rem;
    box-shadow: var(--shadow);
    display: block;
    margin: 0 auto;
}

.home-hero .hero-slogan { border-radius: 999px; font-size: .95rem; box-shadow: var(--shadow-sm); }

.home-hero .hero-title {
    color: #fff;
    font-size: clamp(1.75rem, 3.6vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    max-width: 820px;
    margin: 1rem auto .75rem;
}

.home-hero .hero-text {
    color: rgba(255, 255, 255, .88);
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    max-width: 680px;
    margin: 0 auto;
}

.home-hero .btn-light { color: var(--primary); }

/* Chiffres clés : cartes qui chevauchent le bas du héros */
.home-kpis { margin-top: -4rem; position: relative; z-index: 2; }

.kpi-card {
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.25rem 1.1rem;
}

.kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    margin-bottom: .75rem;
}

.kpi-icon-success { background: #e3f5ec; color: var(--flag-green); }
.kpi-icon-warning { background: #fff5d6; color: #b07d00; }
.kpi-icon-dark { background: #e9edf0; color: var(--ink); }

.kpi-value { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; color: var(--ink); line-height: 1.1; }
.kpi-label { color: var(--muted); font-size: .92rem; margin-top: .2rem; }

.home-section { margin-top: 3.5rem; }
.home-section .my-5 { margin-top: 0 !important; margin-bottom: 0 !important; }

/* Panneaux de statistiques */
.stat-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.stat-panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 1rem;
}

.rate-ring {
    --rate: 0;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) calc(var(--rate) * 1%), var(--primary-soft) 0);
    display: grid;
    place-items: center;
}

.rate-ring > div {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.rate-ring strong { font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1; }
.rate-ring span { font-size: .8rem; color: var(--muted); margin-top: .3rem; max-width: 100px; }

.stat-legend { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.stat-legend li {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
}
.stat-legend strong { margin-left: auto; color: var(--ink); font-weight: 600; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.dot-success { background: var(--primary); }
.dot-warning { background: var(--flag-yellow); }
.dot-muted { background: #b8c4c9; }

.direction-card {
    height: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem;
    background: #fbfdfd;
}

.direction-name { font-weight: 700; color: var(--primary); letter-spacing: .02em; }
.direction-rate {
    font-size: .8rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 999px;
    padding: .15rem .55rem;
}
.direction-total { font-size: 1.9rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.direction-caption { color: var(--muted); font-size: .85rem; }

.direction-card .progress { height: 8px; background: var(--primary-soft); border-radius: 999px; }
.direction-card .progress-bar { background: var(--primary); border-radius: 999px; }
.direction-card .small { color: var(--muted); }

.stat-note { color: var(--muted); font-size: .85rem; }

@media (max-width: 767.98px) {
    .home-hero { padding: 3rem 0 6rem; min-height: auto; }
    .kpi-card { padding: 1rem; }
}

/* ---------- En-tête de page (contact, guide, listes) ---------- */

.page-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 2rem 0 1.75rem;
}

.page-header h1 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); font-weight: 700; margin: 0 0 .25rem; }
.page-header p { color: var(--muted); margin: 0; max-width: 640px; }

.page-header-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.page-body { padding-top: 2rem; padding-bottom: 1rem; }

.empty-state {
    text-align: center;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed #cfd9dd;
    border-radius: var(--radius);
    padding: 3rem 1rem;
}

.empty-state i { font-size: 2rem; color: #a9b8bd; display: block; margin-bottom: .75rem; }
.empty-state p { margin: 0; }

/* ---------- Contact ---------- */

.contact-info,
.contact-form-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.contact-info { display: flex; flex-direction: column; gap: 1.25rem; }

.contact-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; }
.contact-list strong { display: block; font-weight: 600; color: var(--ink); }
.contact-list span:not(.contact-icon), .contact-list a { color: var(--muted); }
.contact-list a:hover { color: var(--primary); }

.contact-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.contact-map {
    flex: 1 1 auto;
    min-height: 220px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--line);
}

/* ---------- Guide des procédures ---------- */

.segmented {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .25rem;
}

.segmented a {
    padding: .45rem 1.1rem;
    border-radius: 999px;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.segmented a:hover { background: var(--primary-soft); color: var(--primary); }
.segmented a.active { background: var(--primary); color: #fff; }

.search-field { position: relative; min-width: min(100%, 320px); }
.search-field i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-field .form-control { padding-left: 2.3rem; border-radius: 999px; }

.guide-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.4rem 1.5rem;
}

.guide-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.guide-card h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 .3rem; }
.guide-card h3 { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .6rem; }
.guide-meta { color: var(--muted); font-size: .9rem; }

.guide-badge {
    flex: 0 0 auto;
    background: #fff5d6;
    color: #8a6200;
    border-radius: 999px;
    padding: .3rem .75rem;
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
}

.guide-rich { color: var(--ink); overflow-wrap: anywhere; }
.guide-rich ul { padding-left: 1.1rem; margin-bottom: 0; }
.guide-rich li { margin-bottom: .3rem; }
.guide-rich p:last-child { margin-bottom: 0; }

/* ---------- Listes de demandes ---------- */

.status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: 1rem 0 .25rem;
}

@media (max-width: 767.98px) {
    /* Sur mobile : une seule ligne qui défile horizontalement. */
    .status-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: .5rem; }
}

.status-tabs a {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    white-space: nowrap;
    padding: .4rem .8rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: .88rem;
    text-decoration: none;
}

.status-tabs a:hover { border-color: var(--primary); color: var(--primary); }
.status-tabs a.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.status-tab-count {
    min-width: 1.5rem;
    padding: 0 .4rem;
    border-radius: 999px;
    background: #eef3f4;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 600;
    text-align: center;
}

.status-tabs a.active .status-tab-count { background: rgba(255, 255, 255, .22); color: #fff; }

.status-badge {
    display: inline-block;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.3;
    background: #eef3f4;
    color: var(--ink);
}

/* 1-2 orientation et étude, 3-11 examen et traitement, 4 modification, 5 rejetée,
   6-8 signature et validation, 7 finalisée, 9 paiement, 10 GEDA */
.status-badge.status-1, .status-badge.status-2 { background: #fff5d6; color: #8a6200; }
.status-badge.status-3, .status-badge.status-11 { background: #e2f3fb; color: #0b6a8c; }
.status-badge.status-4 { background: #fbe7f3; color: #a4246f; }
.status-badge.status-5 { background: #fde8ea; color: #b4232f; }
.status-badge.status-6, .status-badge.status-8 { background: #ece9fb; color: #5a3fbf; }
.status-badge.status-7 { background: #e3f5ec; color: #146c43; }
.status-badge.status-9 { background: #fff0e0; color: #a65300; }
.status-badge.status-10 { background: #e6eefb; color: #2350a8; }

.table-empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem !important; }
.table-empty i { display: block; font-size: 1.75rem; color: #a9b8bd; margin-bottom: .5rem; }

.list-pagination { padding: 1rem; }
.list-pagination:empty { display: none; }
.list-pagination nav { display: flex; justify-content: center; }

/* ---------- Cellules des listes de demandes ---------- */

.requests-table { font-size: .92rem; }
.requests-table > :not(caption) > * > * { padding: .85rem .8rem; border-left: 0; border-right: 0; }
.requests-table > tbody > tr:last-child > * { border-bottom: 0; }
.requests-table > thead th { vertical-align: bottom; }

.requests-table .col-index { width: 1%; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.requests-table td.col-index { font-size: .85rem; }

.requests-table td.col-date { min-width: 120px; color: var(--muted); font-size: .86rem; font-variant-numeric: tabular-nums; }

.requests-table td.col-company { min-width: 130px; font-weight: 500; }

.requests-table td.col-title { min-width: 180px; max-width: 260px; font-weight: 600; color: var(--ink); }

.requests-table td.col-type { min-width: 150px; max-width: 220px; color: var(--muted); }

.requests-table td.col-files { min-width: 200px; max-width: 260px; }

.requests-table td.col-text { min-width: 180px; max-width: 280px; color: var(--muted); font-size: .88rem; }
.requests-table td.col-text > *:not(button):not(.btn):not(.modal) {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.requests-table td.col-text p { margin-bottom: .25rem; }

.requests-table .col-amount { text-align: right; white-space: nowrap; }
.requests-table td.col-amount { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }

.requests-table .col-status { min-width: 130px; }
.requests-table .col-direction { white-space: nowrap; }
.requests-table .col-actions { width: 1%; white-space: nowrap; text-align: right; }

.direction-chip {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 6px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
}

/* Documents joints : pastilles avec icône du type de fichier */
.file-chip {
    margin-bottom: .4rem !important;
    max-width: 100%;
}

.file-chip:last-child { margin-bottom: 0 !important; }

.file-chip-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
    max-width: 100%;
    padding: .3rem .6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #f8fbfb;
    color: var(--ink);
    text-decoration: none;
    font-size: .84rem;
}

.file-chip-link:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.file-chip-icon { color: var(--primary); flex: 0 0 auto; }
.file-chip-icon.fa-file-pdf-o { color: #c0392b; }
.file-chip-icon.fa-file-word-o { color: #2b579a; }
.file-chip-icon.fa-file-excel-o { color: #1e7145; }

.file-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.file-chip .btn-outline-danger {
    border-radius: 6px;
    line-height: 1;
    padding: .3rem .4rem !important;
    flex: 0 0 auto;
}

/* Liens de documents propres à certaines listes (renvois, documents délivrés) */
.requests-table td.col-files a:not(.file-chip-link) { overflow-wrap: anywhere; }

.requests-table .status-badge { white-space: nowrap; }

/* Compteur du lien « Mes demandes » dans la barre de navigation */
.navbar .nav-count {
    min-width: 1.4rem;
    padding: .05rem .4rem;
    border-radius: 999px;
    background: var(--flag-red);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.navbar .nav-link.active .nav-count { background: #fff; color: var(--primary); }

/* ---------- Formulaires d'envoi et de modification de demande ---------- */

.form-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.form-section-head { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.25rem; }
.form-section-head h2 { font-size: 1.05rem; font-weight: 700; margin: .15rem 0 .2rem; }
.form-section-head p { color: var(--muted); font-size: .9rem; margin: 0; }
.form-section-head .optional { color: var(--muted); font-weight: 400; font-size: .9rem; }

.form-step {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .9rem;
}

.char-count { font-variant-numeric: tabular-nums; margin-top: .3rem; }

.type-info {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-radius: var(--radius-sm);
    padding: .55rem .8rem;
    font-size: .9rem;
}

.requirements-placeholder {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--muted);
    border: 1px dashed #cfd9dd;
    border-radius: var(--radius-sm);
    padding: 1.1rem 1rem;
    background: #fbfdfd;
}

.requirements-placeholder i { font-size: 1.3rem; color: #a9b8bd; }

.form-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: .75rem;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

@media (min-width: 576px) {
    .form-actions { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Zone d'envoi de fichiers (balisage existant) harmonisée avec le thème */
.request-form .upload-box {
    border: 2px dashed #c7d6da !important;
    border-radius: var(--radius) !important;
    background: #fbfdfd !important;
    transition: border-color .2s ease, background-color .2s ease;
}

.request-form .upload-box:hover,
.request-form .upload-box.dragover { border-color: var(--primary) !important; background: var(--primary-soft) !important; }
.request-form .upload-box .fa-cloud-arrow-up { color: var(--primary); }

/* Panneau d'aide */
.help-panel {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.help-panel h2 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }

.help-steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 1.25rem; }
.help-steps li { position: relative; counter-increment: step; padding: 0 0 1rem 2.4rem; }
.help-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
    font-size: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.help-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 28px;
    bottom: 2px;
    width: 2px;
    background: var(--line);
}
.help-steps strong { display: block; font-weight: 600; }
.help-steps span { color: var(--muted); font-size: .88rem; }

.help-links { display: flex; flex-direction: column; gap: .5rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.help-links a { color: var(--primary); text-decoration: none; font-weight: 500; }
.help-links a:hover { text-decoration: underline; }

/* Modification : motif du renvoi et rappel de la demande */
.return-notice {
    background: #fff8e6;
    border: 1px solid #f3d98b;
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}

.return-notice-head { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: .75rem; }
.return-notice-head i { color: #b07d00; font-size: 1.2rem; margin-top: .2rem; }
.return-notice-head h2 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.return-notice-head span { color: #7a6420; font-size: .85rem; }
.return-notice-body { color: var(--ink); }
.return-notice-body p:last-child { margin-bottom: 0; }
.return-notice-files { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .9rem; }
.return-notice-files > span { color: #7a6420; font-size: .85rem; }

.request-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.request-summary dt { color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.request-summary dd { margin: .2rem 0 0; font-weight: 500; }

/* Laisse la place au bouton flottant « remonter » en bas à droite */
@media (min-width: 768px) {
    .site-footer .footer-bottom .container { padding-right: 4.5rem; }
}

/* Fenêtre « motif » d'une demande renvoyée ou rejetée (partials/reason-modal) */
.reason-modal { text-align: left; }
.reason-modal .modal-content { border: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 18px 48px rgba(0, 63, 71, .18); }
.reason-modal .modal-header { background: #fff; border-bottom: 1px solid #e3ecee; padding: 1rem 1.25rem; }
.reason-modal .modal-title { font-size: 1.05rem; font-weight: 700; margin: 0; color: #b4232f; }
.reason-modal.reason-warning .modal-title { color: #a4246f; }
.reason-modal .modal-body { padding: 1.1rem 1.25rem; }
.reason-context { margin-bottom: .85rem; }
.reason-subject { font-weight: 600; color: #1f2d33; }
.reason-date { font-size: .82rem; color: #5b6b70; margin-top: .15rem; }
.reason-text {
    margin: 0;
    padding: .85rem 1rem;
    border-left: 4px solid #b4232f;
    border-radius: 0 10px 10px 0;
    background: #fde8ea;
    color: #1f2d33;
    font-size: .95rem;
    line-height: 1.55;
    white-space: normal;
    word-break: break-word;
}
.reason-modal.reason-warning .reason-text { border-left-color: #a4246f; background: #fbe7f3; }
.reason-modal .modal-footer { border-top: 0; padding: 0 1.25rem 1.1rem; }

/* Pièces jointes des listes : deux fichiers visibles, « Voir plus / Voir moins » (assets/js/attachments-toggle.js) */
[data-attachments] [hidden] { display: none !important; }
.attachments-toggle {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    border: 0;
    background: none;
    padding: .15rem 0;
    color: #007481;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
}
.attachments-toggle::after { content: "\25BE"; font-size: .75rem; }
.attachments-toggle[aria-expanded="true"]::after { content: "\25B4"; }
.attachments-toggle:hover { text-decoration: underline; }

/* ==========================================================================
   Pièces jointes : même pastille dans toutes les listes (components/file-chip),
   règles identiques dans theme.css et admin-theme.css
   ========================================================================== */
.file-chip { margin-bottom: .4rem !important; max-width: 100%; }
.file-chip:last-of-type { margin-bottom: .25rem !important; }
.file-chip-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
    max-width: 100%;
    padding: .3rem .65rem;
    border: 1px solid #dbe7ea;
    border-radius: 8px;
    background: #f6fafb;
    color: #1f2d33;
    font-size: .83rem;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}
.file-chip-link:hover,
.file-chip-link:focus-visible { border-color: #007481; background: #e6f4f5; color: #007481; }
.file-chip-icon { flex: 0 0 auto; width: 1em; text-align: center; color: #007481; }
.file-chip-icon.fa-file-pdf-o { color: #c0392b; }
.file-chip-icon.fa-file-word-o { color: #2b579a; }
.file-chip-icon.fa-file-excel-o { color: #1e7145; }
.file-chip-icon.fa-file-image-o { color: #8e44ad; }
.file-chip-icon.fa-file-archive-o { color: #a66b00; }
.file-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.file-chip .btn-outline-danger { flex: 0 0 auto; border-radius: 6px; line-height: 1; padding: .3rem .4rem !important; }
td:has(> .file-chip) { min-width: 240px; }

/* Recherche rapide dans la page (assets/js/table-search.js) */
.table-search { position: relative; display: flex; align-items: center; gap: .75rem; margin: 0 0 .75rem; max-width: 460px; }
.table-search .fa-search { position: absolute; left: .7rem; color: #7d8d93; font-size: .85rem; pointer-events: none; }
.table-search input { padding-left: 2rem; border-radius: 999px; }
.table-search-count { flex: 0 0 auto; font-size: .78rem; color: #5f6f78; white-space: nowrap; }
.table tr[hidden] { display: none !important; }
.table-search-empty td { text-align: center; color: #5f6f78; padding: 1.25rem !important; font-style: italic; }

/* ==========================================================================
   Fenêtres (modales Bootstrap et SweetAlert2) : style de la fenêtre « motif »
   (en-tête blanc, titre coloré, coins arrondis, ombre douce)
   ========================================================================== */
.modal-content { border: 0 !important; border-radius: 16px !important; overflow: hidden; box-shadow: 0 18px 48px rgba(0, 63, 71, .18); background: #fff !important; }
.modal-header,
.modal-header.custom-bg-primary,
.modal-header.bg-primary { background: #fff !important; border-bottom: 1px solid #e3ecee !important; padding: 1rem 1.25rem; }
.modal-title,
.modal-header .modal-title.text-white,
.modal-header .modal-title.text-secondary { color: #007481 !important; font-size: 1.05rem !important; font-weight: 700; margin: 0; }
.modal-header .btn-close { filter: none !important; opacity: .55; }
.modal-header .btn-close:hover { opacity: 1; }
.modal-body { padding: 1.1rem 1.25rem; color: #1f2d33; }
.modal-content > .p-4 { padding: 1.1rem 1.25rem !important; }
.modal-footer { border-top: 0 !important; padding: 0 1.25rem 1.1rem; gap: .5rem; }
.modal-backdrop.show { opacity: .45; }

.swal2-popup { border-radius: 16px !important; padding: 1.5rem 1.25rem 1.25rem !important; box-shadow: 0 18px 48px rgba(0, 63, 71, .18); font-family: inherit; }
.swal2-title { color: #1f2d33 !important; font-size: 1.2rem !important; font-weight: 700 !important; }
.swal2-html-container { color: #5f6f78 !important; font-size: .95rem !important; }
.swal2-actions { gap: .5rem; }
.swal2-styled { border-radius: 8px !important; font-weight: 600 !important; padding: .55rem 1.1rem !important; box-shadow: none !important; }
.swal2-styled.swal2-confirm { background: #007481 !important; }
.swal2-styled.swal2-confirm.swal-danger { background: #b4232f !important; }
.swal2-styled.swal2-cancel { background: #eef3f4 !important; color: #1f2d33 !important; }
.swal2-icon.swal2-warning { border-color: #f0b429 !important; color: #c98a00 !important; }

/* Fenêtres « motif » : titre rouge (rejet) ou rose (renvoi), au-dessus du style commun */
.reason-modal .modal-title { color: #b4232f !important; }
.reason-modal.reason-warning .modal-title { color: #a4246f !important; }

/* Page « Mon compte » du promoteur */
.account-card {
    height: 100%;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.account-card-title { font-size: 1.05rem; font-weight: 700; color: var(--primary); margin: 0 0 1.25rem; }
.account-card .form-label { font-weight: 600; font-size: .88rem; color: var(--ink); }
.account-card input[readonly] { background: #f4f7f8; color: var(--muted); }
.account-actions { display: flex; justify-content: flex-end; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
/* Mon compte : sélecteur de pays du téléphone sur toute la largeur */
.account-card .iti { width: 100%; display: block; }

/* ---------- Bouton d'envoi en cours (assets/js/submit-loading.js) ---------- */

.btn.is-loading,
button.is-loading,
input.is-loading { opacity: .85; pointer-events: none; cursor: progress; }
.btn.is-loading .spinner-border { vertical-align: -.15em; }
