/* ============================================================
   HELVETICA / FADED DENIM THEME
   Gris schiste, bleu jean délavé, toile lavée
   ============================================================ */

/* --- Palette ---
   Fond:      #f4f6f8 (toile blanchie), #edf1f5 (wash glacé)
   Gris:      #dde4ea (gris lin), #b8c8d4 (gris schiste), #7a8fa0 (acier)
   Bleu:      #4a7a96 (denim principal), #6a96b0 (denim doux), #dce8f0 (lavé)
   Ardoise:   #2d5570 (schiste profond), #1a2d3a (nuit denim)
   Vert:      #4a7a64 (sauge), #62917a (sauge doux)
   Terracotta:#9e5048 (accent chaud), #b86a62 (doux)
   Texte:     #1a2430 (encre schiste), #2e4050 (ardoise), #5a7080 (estompé)
*/

:root {
    /* -- fonds : toile de coton lavé, teinté mousse-schiste -- */
    --helv-white: #f5f8f3;
    --helv-ice: #eaeeea;
    --helv-grey-light: #dfe8dd;
    --helv-grey: #cdd6ce;
    --helv-grey-mid: #a4bab8;
    --helv-steel: #7a8fa0;
    /* -- bleu denim / schiste -- */
    --helv-blue: #4a7a96;
    --helv-blue-soft: #6a96b0;
    --helv-blue-wash: #d8e8e4;
    --helv-blue-dark: #2d5570;
    /* -- mousse & sauge -- */
    --helv-moss: #6e8c6a;
    --helv-moss-soft: #9ab890;
    --helv-moss-wash: #e2ece0;
    --helv-sun: #c8b870;          /* reflet soleil sur schiste */
    --helv-sun-soft: #e0d49a;
    /* -- verts & accents -- */
    --helv-green: #4a7a64;
    --helv-green-soft: #62917a;
    --helv-red: #9e5048;
    --helv-red-soft: #b86a62;
    /* -- texte encre schiste -- */
    --helv-text: #1a2430;
    --helv-text-medium: #2e4050;
    --helv-text-muted: #5a7080;
    --helv-border: rgba(148, 178, 168, 0.50);
    --helv-border-light: rgba(148, 178, 168, 0.28);
    --helv-shadow: 0 1px 8px rgba(26, 45, 40, 0.07);
    --helv-shadow-lg: 0 4px 24px rgba(26, 45, 40, 0.11);
    --helv-radius: 8px;
    --helv-radius-sm: 6px;
    /* -- iridescence : spectre mousse-schiste-soleil -- */
    --iris-1: rgba(90, 148, 130, 0.22);   /* teal mousse */
    --iris-2: rgba(195, 188, 92, 0.16);   /* soleil doré */
    --iris-3: rgba(78, 128, 160, 0.20);   /* schiste bleu */
    --iris-4: rgba(138, 178, 118, 0.15);  /* lichen vert */
}

/* --- Global --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--helv-text);
    /* clairière : lumière solaire rasante en haut-centre, ombre fraîche en bas */
    background-color: var(--helv-ice);
    background-image:
        radial-gradient(ellipse 75% 45% at 60% 12%,
            rgba(212, 205, 148, 0.10) 0%, transparent 65%),   /* tache soleil */
        radial-gradient(ellipse 55% 55% at 10% 90%,
            rgba(74, 118, 140, 0.07) 0%, transparent 55%),    /* ombre schiste */
        radial-gradient(ellipse 90% 70% at 50% 50%,
            rgba(148, 185, 148, 0.05) 0%, transparent 75%);   /* sous-bois mousse */
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6,
.card-title {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--helv-text);
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }

a {
    color: var(--helv-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--helv-blue-dark);
}

/* --- Navbar --- */
.navbar-horta {
    background: var(--helv-white);
    border-bottom: 1px solid var(--helv-grey);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    padding: 0;
    position: relative;
    z-index: 1050;
    margin-left: 18vw;
}

.navbar-horta::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--helv-blue) 0%, var(--helv-blue-soft) 60%, transparent 100%);
    opacity: 0.35;
}

.navbar-horta .navbar-brand {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    color: var(--helv-blue-dark) !important;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    padding: 12px 20px;
}

.navbar-horta .navbar-brand::after {
    content: '';
}

.navbar-horta .nav-link {
    color: var(--helv-text-medium) !important;
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0;
    padding: 14px 14px !important;
    transition: all 0.2s ease;
    position: relative;
}

.navbar-horta .nav-link:hover,
.navbar-horta .nav-link.active {
    color: var(--helv-blue) !important;
    background: var(--helv-blue-wash);
}

.navbar-horta .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--helv-blue);
    transition: all 0.2s ease;
    transform: translateX(-50%);
}

.navbar-horta .nav-link:hover::after {
    width: 100%;
}

.navbar-horta .navbar-toggler {
    border-color: var(--helv-grey-mid);
    padding: 4px 8px;
}

.navbar-horta .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(26,31,36,0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --- Navbar separator --- */
.nav-separator {
    border-left: 1px solid var(--helv-grey);
    margin: 8px 4px;
}

/* --- Admin dropdown menus --- */
.dropdown-menu-horta {
    background: var(--helv-white);
    border: 1px solid var(--helv-grey);
    border-radius: var(--helv-radius);
    box-shadow: var(--helv-shadow-lg);
    padding: 4px 0;
    min-width: 190px;
    margin-top: 2px;
}

.dropdown-menu-horta .dropdown-item {
    color: var(--helv-text-medium);
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 0.87rem;
    padding: 8px 16px;
    transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-menu-horta .dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
    color: var(--helv-blue-soft);
}

.dropdown-menu-horta .dropdown-item:hover,
.dropdown-menu-horta .dropdown-item:focus {
    background: var(--helv-blue-wash);
    color: var(--helv-blue);
}

.dropdown-menu-horta .dropdown-item:hover i,
.dropdown-menu-horta .dropdown-item:focus i {
    color: var(--helv-blue);
}

.dropdown-menu-horta .dropdown-divider {
    border-top-color: var(--helv-grey);
    margin: 4px 12px;
}

.navbar-horta .dropdown-toggle::after {
    border-top-color: var(--helv-steel);
    vertical-align: 0.15em;
    margin-left: 4px;
}

/* Mobile: dropdowns render inline */
@media (max-width: 991.98px) {
    .dropdown-menu-horta.show {
        position: static !important;
        float: none;
        background: var(--helv-grey-light);
        border: none;
        box-shadow: none;
        padding-left: 12px;
        margin-top: 0;
    }

    .dropdown-menu-horta .dropdown-item {
        padding: 6px 12px;
    }
}

/* --- Cards --- */
.card {
    background: var(--helv-white);
    border: 1px solid var(--helv-border);
    border-radius: var(--helv-radius);
    box-shadow: var(--helv-shadow);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--helv-shadow-lg);
}

.card-header {
    background: var(--helv-grey-light) !important;
    color: var(--helv-text) !important;
    border-bottom: 1px solid var(--helv-grey) !important;
    padding: 14px 20px;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20px;
    right: 20px;
    height: 0;
}

.card-header h5,
.card-header h4,
.card-header .mb-0 {
    color: var(--helv-text) !important;
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    font-weight: 700;
    margin: 0;
}

.card-body {
    padding: 20px;
}

/* --- Buttons --- */
.btn {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0;
    border-radius: var(--helv-radius-sm);
    transition: all 0.2s ease;
    position: relative;
}

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

.btn-primary:hover {
    background: var(--helv-blue-dark);
    border-color: var(--helv-blue-dark);
    color: #fff;
    box-shadow: 0 2px 8px rgba(45, 85, 112, 0.28);
}

.btn-success {
    background: var(--helv-green);
    border-color: var(--helv-green);
    color: #fff;
}

.btn-success:hover {
    background: #3a6652;
    border-color: #3a6652;
    box-shadow: 0 2px 8px rgba(74, 122, 100, 0.25);
}

.btn-warning {
    background: #b8864a;
    border-color: #b8864a;
    color: #fff;
}

.btn-warning:hover {
    background: #9e7038;
    border-color: #9e7038;
    color: #fff;
    box-shadow: 0 2px 8px rgba(184, 134, 74, 0.28);
}

.btn-danger {
    background: var(--helv-red);
    border-color: var(--helv-red);
    color: #fff;
}

.btn-danger:hover {
    background: #843c36;
    border-color: #843c36;
    box-shadow: 0 2px 8px rgba(158, 80, 72, 0.28);
}

.btn-secondary {
    background: var(--helv-grey-light);
    border-color: var(--helv-grey-mid);
    color: var(--helv-text-medium);
}

.btn-secondary:hover {
    background: var(--helv-grey);
    border-color: var(--helv-steel);
    color: var(--helv-text);
}

.btn-info {
    background: #4a8aa8;
    border-color: #4a8aa8;
    color: #fff;
}

.btn-info:hover {
    background: #3a7090;
    border-color: #3a7090;
    box-shadow: 0 2px 8px rgba(74, 138, 168, 0.28);
    color: #fff;
}

.btn-outline-primary {
    border-color: var(--helv-blue);
    color: var(--helv-blue);
}

.btn-outline-primary:hover {
    background: var(--helv-blue);
    border-color: var(--helv-blue);
    color: #fff;
}

.btn-outline-secondary {
    border-color: var(--helv-grey-mid);
    color: var(--helv-text-medium);
}

.btn-outline-secondary:hover {
    background: var(--helv-grey-light);
    border-color: var(--helv-steel);
    color: var(--helv-text);
}

.btn-outline-info {
    border-color: #4a8aa8;
    color: #4a8aa8;
}

.btn-outline-info:hover {
    background: #4a8aa8;
    color: #fff;
}

.btn-outline-warning {
    border-color: #b8864a;
    color: #9e7038;
}

.btn-outline-warning:hover {
    background: #b8864a;
    color: #fff;
}

/* --- Forms --- */
.form-control,
.form-select {
    border: 1px solid var(--helv-grey-mid);
    border-radius: var(--helv-radius-sm);
    background-color: var(--helv-white);
    color: var(--helv-text);
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 0.9rem;
    padding: 9px 12px;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--helv-blue);
    box-shadow: 0 0 0 3px rgba(74, 122, 150, 0.14);
    background-color: var(--helv-white);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--helv-grey-light);
    color: var(--helv-text-muted);
}

.form-label {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--helv-text-medium);
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.form-text {
    color: var(--helv-text-muted);
    font-size: 0.82rem;
}

.form-check-input:checked {
    background-color: var(--helv-blue);
    border-color: var(--helv-blue);
}

/* --- Tables --- */
.table {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    border-color: var(--helv-border-light);
    font-size: 0.9rem;
}

.table thead th {
    background: var(--helv-grey-light);
    color: var(--helv-text);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--helv-grey) !important;
    padding: 10px 14px;
}

.table tbody td {
    padding: 10px 14px;
    border-color: var(--helv-border-light);
    vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(74, 122, 150, 0.025);
}

.table tbody tr:hover {
    background-color: var(--helv-blue-wash) !important;
}

/* --- Badges --- */
.badge {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    border-radius: 4px;
    padding: 4px 8px;
}

.badge.bg-success {
    background: var(--helv-green) !important;
}

.badge.bg-secondary {
    background: var(--helv-steel) !important;
}

.badge.bg-primary {
    background: var(--helv-blue) !important;
}

.badge.bg-danger {
    background: var(--helv-red) !important;
}

.badge.bg-warning {
    background: #b8864a !important;
    color: #fff !important;
}

.badge.bg-info {
    background: #4a8aa8 !important;
    color: #fff !important;
}

/* --- Alerts --- */
.alert {
    border-radius: var(--helv-radius-sm);
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    border-width: 1px;
    border-left-width: 4px;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(74, 122, 100, 0.06);
    border-color: var(--helv-green);
    color: #3a6652;
}

.alert-danger {
    background: rgba(158, 80, 72, 0.06);
    border-color: var(--helv-red);
    color: var(--helv-red);
}

.alert-warning {
    background: rgba(184, 134, 74, 0.07);
    border-color: #b8864a;
    color: #8a6030;
}

.alert-info {
    background: rgba(74, 122, 150, 0.06);
    border-color: var(--helv-blue-soft);
    color: var(--helv-blue);
}

/* --- Modals --- */
.modal-content {
    background: var(--helv-white);
    border: 1px solid var(--helv-border);
    border-radius: var(--helv-radius);
    box-shadow: var(--helv-shadow-lg);
}

.modal-header {
    background: var(--helv-grey-light);
    color: var(--helv-text);
    border-bottom: 1px solid var(--helv-grey);
    border-radius: 8px 8px 0 0;
    padding: 14px 20px;
}

.modal-header .modal-title {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    color: var(--helv-text);
    font-weight: 700;
}

.modal-footer {
    border-top: 1px solid var(--helv-border-light);
    background: var(--helv-ice);
}

/* --- Progress bars --- */
.progress {
    border-radius: 6px;
    background-color: var(--helv-grey);
    border: none;
    height: 8px;
}

.progress-bar {
    border-radius: 6px;
}

.progress-bar.bg-success,
.progress-bar:not([class*="bg-"]) {
    background: var(--helv-green) !important;
}

.progress-bar.bg-warning {
    background: #b8864a !important;
}

.progress-bar.bg-danger {
    background: var(--helv-red) !important;
}

/* --- List groups --- */
.list-group-item {
    background: transparent;
    border-color: var(--helv-border-light);
    color: var(--helv-text);
    transition: background 0.15s ease;
}

.list-group-item:hover {
    background: var(--helv-blue-wash);
}

/* --- Nav tabs & pills --- */
.nav-tabs {
    border-bottom: 2px solid var(--helv-grey);
}

.nav-tabs .nav-link {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    color: var(--helv-text-muted);
    font-weight: 600;
    font-size: 0.88rem;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 10px 16px;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: var(--helv-blue-soft);
    color: var(--helv-blue);
}

.nav-tabs .nav-link.active {
    color: var(--helv-blue);
    border-bottom: 2px solid var(--helv-blue);
    background: transparent;
}

.nav-pills .nav-link {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    color: var(--helv-text-medium);
    border-radius: var(--helv-radius-sm);
    padding: 8px 16px;
    transition: all 0.2s ease;
}

.nav-pills .nav-link.active {
    background: var(--helv-blue);
    color: #fff;
}

/* --- Identity pages (Login, Register, etc.) --- */
.horta-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--helv-ice);
    padding: 40px 20px;
}

.horta-auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--helv-white);
    border: 1px solid var(--helv-grey);
    border-radius: 12px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    position: relative;
}

.horta-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--helv-blue) 0%, var(--helv-blue-soft) 60%, transparent 100%);
    background-size: 60px 3px;
    opacity: 0;
}

.horta-auth-card::after {
    content: '';
}

.horta-auth-header {
    background: var(--helv-white);
    padding: 28px 30px 16px;
    text-align: center;
    border-bottom: 1px solid var(--helv-grey);
}

.horta-auth-header h4 {
    color: var(--helv-text);
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
    margin: 0;
}

.horta-auth-header .auth-ornament {
    color: var(--helv-blue);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    display: block;
    margin-top: 6px;
    opacity: 0.5;
    text-transform: uppercase;
}

.horta-auth-body {
    padding: 28px 30px;
}

.horta-auth-body .form-control {
    background: var(--helv-white);
}

.horta-auth-footer {
    text-align: center;
    padding: 0 30px 24px;
    color: var(--helv-text-muted);
    font-size: 0.88rem;
}

.horta-auth-footer a {
    color: var(--helv-blue);
    font-weight: 600;
}

.horta-auth-footer a:hover {
    color: var(--helv-blue-dark);
}

.horta-auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--helv-text-muted);
    font-size: 0.82rem;
}

.horta-auth-divider::before,
.horta-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--helv-grey);
}

.horta-auth-divider span {
    padding: 0 12px;
}

/* --- Main layout --- */
.main-content {
    padding: 24px 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Footer --- */
.horta-footer {
    background: var(--helv-grey-light);
    color: var(--helv-text-muted);
    text-align: center;
    padding: 16px 20px;
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 0.8rem;
    border-top: 1px solid var(--helv-grey);
    position: relative;
    margin-top: 40px;
}

.horta-footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 0;
}

.horta-footer a {
    color: var(--helv-blue);
}

/* --- Ornamental decorations (minimal in Swiss style) --- */
.horta-ornament {
    text-align: center;
    color: var(--helv-grey-mid);
    opacity: 0.4;
    font-size: 0.9rem;
    letter-spacing: 0.5em;
    margin: 12px 0;
    user-select: none;
}

.horta-divider {
    height: 1px;
    background: var(--helv-grey);
    margin: 24px 0;
}

/* --- Page title --- */
.horta-page-title {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    color: var(--helv-text);
    font-size: 1.7rem;
    font-weight: 800;
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 24px;
}

.horta-page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--helv-blue);
    border-radius: 2px;
}

/* --- Selection highlight --- */
.card.border-primary {
    border-color: var(--helv-blue) !important;
}

.card.border-2 {
    border-width: 2px !important;
}

/* --- Scrollbar styling --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--helv-ice);
}

::-webkit-scrollbar-thumb {
    background: var(--helv-grey-mid);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--helv-steel);
}

/* --- Code blocks --- */
code {
    background: var(--helv-blue-wash);
    color: var(--helv-blue-dark);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.88em;
    border: 1px solid rgba(74, 122, 150, 0.14);
}

/* --- Admin index card grid --- */
.admin-card-link {
    text-decoration: none;
    display: block;
    transition: transform 0.15s ease;
}

.admin-card-link:hover {
    transform: translateY(-2px);
}

/* --- Horta Accordion List (mobile admin) --- */
.mobile-accordion { display: none; }

@media (max-width: 991.98px) {
    .desktop-table { display: none !important; }
    .mobile-accordion { display: block; }
}

/* Accordion item */
.horta-acc-item {
    background: var(--helv-white);
    border: 1px solid var(--helv-border);
    border-radius: var(--helv-radius);
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: var(--helv-shadow);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.horta-acc-item.open {
    border-color: var(--helv-blue-soft);
    box-shadow: 0 2px 12px rgba(74, 122, 150, 0.12);
}

/* Header */
.horta-acc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    gap: 8px;
    background: var(--helv-white);
    transition: background 0.15s ease;
}

.horta-acc-header:active {
    background: var(--helv-grey-light);
}

.horta-acc-title {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--helv-text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.horta-acc-chevron {
    color: var(--helv-blue);
    font-size: 1rem;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.horta-acc-item.open .horta-acc-chevron {
    transform: rotate(180deg);
}

/* Body */
.horta-acc-body {
    display: none;
    padding: 0 16px 14px;
    animation: hortaAccSlide 0.2s ease;
}

.horta-acc-item.open .horta-acc-body {
    display: block;
}

@keyframes hortaAccSlide {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Detail row */
.horta-acc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--helv-border-light);
    gap: 8px;
}

.horta-acc-row:last-child {
    border-bottom: none;
}

.horta-acc-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--helv-text-muted);
    flex-shrink: 0;
    min-width: 80px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.horta-acc-value {
    font-size: 0.88rem;
    color: var(--helv-text);
    text-align: right;
    flex: 1;
    min-width: 0;
}

.horta-acc-value .form-select-sm {
    font-size: 0.82rem;
    max-width: 160px;
    margin-left: auto;
}

/* Action buttons row */
.horta-acc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 10px;
    margin-top: 6px;
    border-top: 1px solid var(--helv-grey);
    justify-content: flex-end;
}

.horta-acc-actions .btn {
    font-size: 0.82rem;
    border-radius: var(--helv-radius-sm);
    padding: 5px 12px;
}

/* Separator */
.horta-acc-body::before {
    content: '';
    display: block;
    height: 1px;
    background: var(--helv-grey);
    margin-bottom: 10px;
}

/* ============================================================
   EFFETS IRISÉS — rayon de soleil sur mousse/schiste
   ============================================================ */

@keyframes helv-iris-sweep {
    0%   { background-position: 200% center; opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { background-position: -80% center; opacity: 0; }
}

@keyframes helv-iris-pulse {
    0%, 100% { opacity: 0; }
    50%       { opacity: 1; }
}

/* Dégradé irisé réutilisable */
.helv-iris-bg {
    background: linear-gradient(108deg,
        transparent 12%,
        var(--iris-1) 28%,
        var(--iris-2) 44%,
        var(--iris-3) 58%,
        var(--iris-4) 72%,
        transparent 86%
    );
    background-size: 350% 100%;
}

/* --- Boutons : sweep irisé au hover --- */
.btn {
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(108deg,
        transparent 12%,
        var(--iris-1) 28%,
        var(--iris-2) 44%,
        var(--iris-3) 58%,
        var(--iris-4) 72%,
        transparent 86%
    );
    background-size: 350% 100%;
    background-position: 200% center;
    pointer-events: none;
    border-radius: inherit;
    opacity: 0;
    mix-blend-mode: screen;
}

.btn:hover::before {
    animation: helv-iris-sweep 1.1s ease forwards;
}

/* --- Cartes : lueur irisée douce au hover --- */
.card {
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(130deg,
        transparent 10%,
        rgba(148, 185, 148, 0.07) 30%,
        rgba(195, 188, 92, 0.06) 50%,
        rgba(78, 128, 160, 0.07) 70%,
        transparent 90%
    );
    background-size: 300% 100%;
    background-position: 200% center;
    pointer-events: none;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.card > * {
    position: relative;
    z-index: 1;
}

.card:hover::before {
    opacity: 1;
    animation: helv-iris-sweep 2.0s ease forwards;
}

/* --- Navbar links : reflet soleil au hover --- */
.navbar-horta .nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent 20%,
        var(--iris-1) 40%,
        var(--iris-2) 55%,
        var(--iris-4) 70%,
        transparent 80%
    );
    background-size: 300% 100%;
    background-position: 200% center;
    pointer-events: none;
    opacity: 0;
    border-radius: 4px;
}

.navbar-horta .nav-link:hover::before {
    animation: helv-iris-sweep 0.9s ease forwards;
}

/* --- Liste groups : liseré irisé sur hover --- */
.list-group-item {
    position: relative;
    overflow: hidden;
}

.list-group-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg,
        var(--iris-3) 0%,
        var(--iris-1) 40%,
        var(--iris-2) 70%,
        var(--iris-4) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.list-group-item:hover::before {
    opacity: 0.85;
}

/* --- Focus forms : halo mousse-soleil --- */
.form-control:focus,
.form-select:focus {
    box-shadow:
        0 0 0 3px rgba(74, 122, 150, 0.12),
        0 0 0 5px rgba(110, 160, 120, 0.07),
        0 0 12px rgba(195, 188, 92, 0.08) !important;
}

/* --- Accordion ouvert : bord irisé --- */
.horta-acc-item.open {
    border-image: linear-gradient(180deg,
        var(--helv-blue-soft) 0%,
        var(--helv-moss-soft) 50%,
        var(--helv-sun-soft) 100%
    ) 1;
}

/* --- Page title : soulignement dégradé mousse-schiste --- */
.horta-page-title::after {
    background: linear-gradient(90deg,
        var(--helv-blue) 0%,
        var(--helv-moss) 55%,
        var(--helv-sun) 100%
    );
    width: 60px;
}

/* --- Scrollbar : teinte schiste-mousse --- */
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--helv-grey-mid) 0%, var(--helv-moss-soft) 100%);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--helv-steel) 0%, var(--helv-moss) 100%);
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }

    .navbar-horta .navbar-brand {
        font-size: 1rem;
    }

    .horta-auth-card {
        border-radius: 8px;
    }
}
