/* ============================================================
   HERGÉ / TINTIN THEME
   Ligne claire, aplats nets, contours encre — Esprit aventure
   ============================================================ */

/* --- Palette --- PASTEL / ligne claire douce
   Bleu pastel:  #4a6fa5 (deep), #6b8fc4 (medium), #a3c1e0 (sky)
   Pêche:        #e8956a (warm peach), #d47b52 (dark peach), #f2bb9a (light peach)
   Crème:        #f0dca0 (cream), #e6cf8a (dark cream), #f7ecc8 (light cream)
   Fond:         #fdf9f0 (warm ivory), #f5efe2 (aged linen), #ede5d4 (deep linen)
   Texte:        #3a3632 (soft ink), #5a5550 (medium ink), #8a857e (light ink)
   Rose:         #d4686a (soft rose), #bb5355 (dark rose)
   Vert:         #6aab7a (sage green), #508860 (dark sage)
   Encre:        #3a3632 (ligne claire soft black)
*/

:root {
    --herge-blue-deep: #4a6fa5;
    --herge-blue: #6b8fc4;
    --herge-blue-sky: #a3c1e0;
    --herge-orange: #e8956a;
    --herge-orange-dark: #d47b52;
    --herge-orange-light: #f2bb9a;
    --herge-sand: #f0dca0;
    --herge-sand-dark: #e6cf8a;
    --herge-sand-light: #f7ecc8;
    --herge-paper: #fdf9f0;
    --herge-paper-aged: #f5efe2;
    --herge-paper-deep: #ede5d4;
    --herge-ink: #3a3632;
    --herge-ink-medium: #5a5550;
    --herge-ink-light: #8a857e;
    --herge-red: #d4686a;
    --herge-red-dark: #bb5355;
    --herge-green: #6aab7a;
    --herge-green-dark: #508860;
    --herge-border: 2px solid var(--herge-ink);
    --herge-border-light: 1px solid rgba(58, 54, 50, 0.15);
    --herge-shadow: 3px 3px 0 rgba(58, 54, 50, 0.10);
    --herge-shadow-lg: 5px 5px 0 rgba(58, 54, 50, 0.12);
    --herge-radius: 6px;
    --herge-radius-sm: 4px;
}

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

body {
    font-family: 'Quicksand', 'Segoe UI', Tahoma, sans-serif;
    color: var(--herge-ink);
    background-color: var(--herge-paper);
    background-image:
        url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='0.5' fill='%233a3632' opacity='0.03'/%3E%3C/svg%3E");
    font-size: 15px;
    line-height: 1.65;
    font-weight: 500;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6,
.card-title {
    font-family: 'Fredoka One', 'Impact', sans-serif;
    color: var(--herge-ink);
    font-weight: 400;
    letter-spacing: 0.02em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }

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

a:hover {
    color: var(--herge-orange);
}

/* --- Navbar --- */
.navbar-horta {
    background: var(--herge-blue-deep);
    border-bottom: 2px solid var(--herge-ink);
    box-shadow: 0 2px 0 var(--herge-orange);
    padding: 0;
    position: relative;
    z-index: 1050;
    margin-left: 18vw;
}

.navbar-horta::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--herge-orange);
}

.navbar-horta .navbar-brand {
    font-family: 'Fredoka One', 'Impact', sans-serif;
    color: #fff !important;
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    padding: 10px 20px;
    position: relative;
}

/* SVG rocket icon for brand */
.navbar-horta .navbar-brand::before {
    content: '';
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-right: 8px;
    vertical-align: middle;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0dca0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z'/%3E%3Cpath d='m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z'/%3E%3Cpath d='M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0'/%3E%3Cpath d='M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5'/%3E%3C/svg%3E") no-repeat center / contain;
}

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

.navbar-horta .nav-link {
    color: rgba(255, 255, 255, 0.88) !important;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 14px 16px !important;
    transition: all 0.15s ease;
    position: relative;
    text-transform: uppercase;
}

.navbar-horta .nav-link:hover,
.navbar-horta .nav-link.active {
    color: var(--herge-sand) !important;
    background: rgba(255, 255, 255, 0.08);
}

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

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

.navbar-horta .navbar-toggler {
    border: 2px solid var(--herge-sand);
    padding: 4px 8px;
}

/* SVG hamburger icon */
.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='%23f0dca0' stroke-linecap='round' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* --- Navbar separator between sections --- */
.nav-separator {
    border-left: 1px solid rgba(240, 220, 160, 0.3);
    margin: 8px 4px;
}

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

.dropdown-menu-horta .dropdown-item {
    color: var(--herge-ink);
    font-family: 'Quicksand', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 7px 16px;
    letter-spacing: 0.3px;
    transition: background 0.1s ease, color 0.1s ease;
}

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

.dropdown-menu-horta .dropdown-item:hover,
.dropdown-menu-horta .dropdown-item:focus {
    background: var(--herge-sand-light);
    color: var(--herge-blue-deep);
}

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

.dropdown-menu-horta .dropdown-divider {
    border-top: 1px solid rgba(26, 26, 26, 0.12);
    margin: 4px 12px;
}

.navbar-horta .dropdown-toggle::after {
    border-top-color: var(--herge-sand);
    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: rgba(74, 111, 165, 0.92);
        border: none;
        box-shadow: none;
        padding-left: 12px;
        margin-top: 0;
    }

    .dropdown-menu-horta .dropdown-item {
        color: rgba(255, 255, 255, 0.85);
        padding: 6px 12px;
    }

    .dropdown-menu-horta .dropdown-item i {
        color: var(--herge-sand);
    }
}

/* --- Cards --- ligne claire: solid borders, flat fills, sharp shadows */
.card {
    background: var(--herge-paper);
    border: 2px solid var(--herge-ink);
    border-radius: var(--herge-radius);
    box-shadow: var(--herge-shadow);
    overflow: hidden;
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.card:hover {
    box-shadow: var(--herge-shadow-lg);
    transform: translate(-1px, -1px);
}

.card-header {
    background: var(--herge-blue-deep) !important;
    color: #fff !important;
    border-bottom: 2px solid var(--herge-ink) !important;
    padding: 12px 20px;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--herge-orange-light);
}

.card-header h5,
.card-header h4,
.card-header .mb-0 {
    color: #fff !important;
    font-family: 'Fredoka One', 'Impact', sans-serif;
    margin: 0;
}

.card-body {
    padding: 20px;
}

/* --- Buttons --- ligne claire: flat, solid borders */
.btn {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: var(--herge-radius-sm);
    border-width: 2px;
    transition: all 0.12s ease;
    position: relative;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--herge-blue);
    border-color: var(--herge-ink);
    color: #fff;
    box-shadow: 2px 2px 0 var(--herge-ink);
}

.btn-primary:hover {
    background: var(--herge-blue-deep);
    border-color: var(--herge-ink);
    color: #fff;
    box-shadow: 1px 1px 0 var(--herge-ink);
    transform: translate(1px, 1px);
}

.btn-success {
    background: var(--herge-green);
    border-color: var(--herge-ink);
    color: #fff;
    box-shadow: 2px 2px 0 var(--herge-ink);
}

.btn-success:hover {
    background: var(--herge-green-dark);
    border-color: var(--herge-ink);
    box-shadow: 1px 1px 0 var(--herge-ink);
    transform: translate(1px, 1px);
}

.btn-warning {
    background: var(--herge-sand);
    border-color: var(--herge-ink);
    color: var(--herge-ink);
    box-shadow: 2px 2px 0 var(--herge-ink);
}

.btn-warning:hover {
    background: var(--herge-sand-dark);
    border-color: var(--herge-ink);
    color: var(--herge-ink);
    box-shadow: 1px 1px 0 var(--herge-ink);
    transform: translate(1px, 1px);
}

.btn-danger {
    background: var(--herge-red);
    border-color: var(--herge-ink);
    color: #fff;
    box-shadow: 2px 2px 0 var(--herge-ink);
}

.btn-danger:hover {
    background: var(--herge-red-dark);
    border-color: var(--herge-ink);
    box-shadow: 1px 1px 0 var(--herge-ink);
    transform: translate(1px, 1px);
}

.btn-secondary {
    background: var(--herge-paper-deep);
    border-color: var(--herge-ink);
    color: var(--herge-ink-medium);
    box-shadow: 2px 2px 0 rgba(58, 54, 50, 0.08);
}

.btn-secondary:hover {
    background: var(--herge-paper-aged);
    border-color: var(--herge-ink);
    color: var(--herge-ink);
    box-shadow: 1px 1px 0 rgba(58, 54, 50, 0.08);
    transform: translate(1px, 1px);
}

.btn-info {
    background: var(--herge-orange);
    border-color: var(--herge-ink);
    color: #fff;
    box-shadow: 2px 2px 0 var(--herge-ink);
}

.btn-info:hover {
    background: var(--herge-orange-dark);
    border-color: var(--herge-ink);
    box-shadow: 1px 1px 0 var(--herge-ink);
    transform: translate(1px, 1px);
    color: #fff;
}

.btn-outline-primary {
    border-color: var(--herge-blue);
    color: var(--herge-blue);
    border-width: 2px;
}

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

.btn-outline-secondary {
    border-color: var(--herge-ink-light);
    color: var(--herge-ink-medium);
    border-width: 2px;
}

.btn-outline-secondary:hover {
    background: var(--herge-paper-deep);
    border-color: var(--herge-ink);
    color: var(--herge-ink);
}

.btn-outline-info {
    border-color: var(--herge-orange);
    color: var(--herge-orange);
    border-width: 2px;
}

.btn-outline-info:hover {
    background: var(--herge-orange);
    color: #fff;
}

.btn-outline-warning {
    border-color: var(--herge-sand-dark);
    color: var(--herge-sand-dark);
    border-width: 2px;
}

.btn-outline-warning:hover {
    background: var(--herge-sand);
    color: var(--herge-ink);
}

/* --- Forms --- */
.form-control,
.form-select {
    border: 2px solid var(--herge-ink);
    border-radius: var(--herge-radius-sm);
    background-color: #fff;
    color: var(--herge-ink);
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 12px;
    transition: all 0.15s ease;
    box-shadow: inset 0 1px 3px rgba(26, 26, 26, 0.06);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--herge-blue);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.15), inset 0 1px 3px rgba(26, 26, 26, 0.06);
    background-color: #fff;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--herge-paper-aged);
    color: var(--herge-ink-light);
}

.form-label {
    font-family: 'Fredoka One', sans-serif;
    font-weight: 400;
    font-size: 0.82rem;
    color: var(--herge-ink-medium);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.form-text {
    color: var(--herge-ink-light);
    font-style: italic;
}

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

/* --- Tables --- */
.table {
    font-family: 'Quicksand', sans-serif;
    border-color: rgba(58, 54, 50, 0.10);
}

.table thead th {
    background: var(--herge-blue-deep);
    color: #fff;
    font-family: 'Fredoka One', 'Impact', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--herge-orange-light) !important;
    padding: 10px 16px;
}

.table tbody td {
    padding: 10px 16px;
    border-color: rgba(58, 54, 50, 0.07);
    vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(240, 220, 160, 0.10);
}

.table tbody tr:hover {
    background-color: rgba(240, 220, 160, 0.16) !important;
}

/* --- Badges --- */
.badge {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: var(--herge-radius-sm);
    border: 1.5px solid var(--herge-ink);
    padding: 3px 8px;
    text-transform: uppercase;
    font-size: 0.72rem;
}

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

.badge.bg-secondary {
    background: var(--herge-ink-light) !important;
}

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

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

.badge.bg-warning {
    background: var(--herge-sand) !important;
    color: var(--herge-ink) !important;
}

.badge.bg-info {
    background: var(--herge-orange) !important;
    color: #fff !important;
}

/* --- Alerts --- */
.alert {
    border-radius: var(--herge-radius);
    font-family: 'Quicksand', sans-serif;
    border: 2px solid;
    font-weight: 600;
    position: relative;
}

/* SVG checkmark icon for success alert */
.alert-success {
    background: #f0f8f2;
    border-color: var(--herge-green);
    color: var(--herge-green-dark);
}

.alert-success::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23508860' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* SVG warning triangle for danger alert */
.alert-danger {
    background: #fdf0f0;
    border-color: var(--herge-red);
    color: var(--herge-red-dark);
}

.alert-danger::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bb5355' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") no-repeat center / contain;
}

.alert-warning {
    background: #fdf6e8;
    border-color: var(--herge-sand-dark);
    color: var(--herge-ink-medium);
}

/* SVG info circle for info alert */
.alert-info {
    background: #eef4fa;
    border-color: var(--herge-blue);
    color: var(--herge-blue-deep);
}

.alert-info::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a6fa5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* --- Modals --- */
.modal-content {
    background: var(--herge-paper);
    border: 2px solid var(--herge-ink);
    border-radius: var(--herge-radius);
    box-shadow: 5px 5px 0 rgba(58, 54, 50, 0.14);
}

.modal-header {
    background: var(--herge-blue-deep);
    color: #fff;
    border-bottom: 2px solid var(--herge-ink);
    border-radius: 2px 2px 0 0;
    padding: 12px 20px;
}

.modal-header .modal-title {
    font-family: 'Fredoka One', 'Impact', sans-serif;
    color: #fff;
}

.modal-footer {
    border-top: 1px solid rgba(58, 54, 50, 0.10);
    background: var(--herge-paper-aged);
}

/* --- Progress bars --- */
.progress {
    border-radius: var(--herge-radius);
    background-color: var(--herge-paper-deep);
    border: 2px solid var(--herge-ink);
}

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

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

.progress-bar.bg-warning {
    background: var(--herge-sand) !important;
}

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

/* --- List groups --- */
.list-group-item {
    background: transparent;
    border-color: rgba(26, 26, 26, 0.1);
    color: var(--herge-ink);
    transition: background 0.1s ease;
}

.list-group-item:hover {
    background: var(--herge-sand-light);
}

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

.nav-tabs .nav-link {
    font-family: 'Fredoka One', sans-serif;
    color: var(--herge-ink-medium);
    border: 2px solid transparent;
    border-bottom: none;
    margin-bottom: -2px;
    padding: 10px 18px;
    transition: all 0.15s ease;
    letter-spacing: 0.03em;
    border-radius: var(--herge-radius) var(--herge-radius) 0 0;
}

.nav-tabs .nav-link:hover {
    background: var(--herge-sand-light);
    color: var(--herge-blue);
    border-color: rgba(58, 54, 50, 0.12);
    border-bottom-color: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--herge-ink);
    background: var(--herge-paper);
    border-color: var(--herge-ink);
    border-bottom-color: var(--herge-paper);
}

.nav-pills .nav-link {
    font-family: 'Quicksand', sans-serif;
    color: var(--herge-ink-medium);
    border-radius: var(--herge-radius-sm);
    padding: 8px 16px;
    transition: all 0.15s ease;
    font-weight: 700;
    border: 2px solid transparent;
}

.nav-pills .nav-link.active {
    background: var(--herge-blue);
    color: #fff;
    border-color: var(--herge-ink);
    box-shadow: 2px 2px 0 var(--herge-ink);
}

/* --- Identity pages (Login, Register, etc.) --- */
.horta-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='1' fill='%233a3632' opacity='0.02'/%3E%3C/svg%3E"),
        linear-gradient(180deg, var(--herge-paper) 0%, var(--herge-paper-aged) 100%);
    padding: 40px 20px;
}

.horta-auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--herge-paper);
    border: 2px solid var(--herge-ink);
    border-radius: var(--herge-radius);
    box-shadow: 5px 5px 0 rgba(58, 54, 50, 0.12);
    overflow: hidden;
    position: relative;
}

.horta-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
}

.horta-auth-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
}

.horta-auth-header {
    background: var(--herge-blue-deep);
    padding: 24px 30px;
    text-align: center;
    position: relative;
    border-bottom: 2px solid var(--herge-ink);
}

/* SVG globe/compass icon */
.horta-auth-header::before {
    content: '';
    display: block;
    width: 36px;
    height: 36px;
    margin: 0 auto 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0dca0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.horta-auth-header h4 {
    color: #fff;
    font-family: 'Fredoka One', 'Impact', sans-serif;
    font-weight: 400;
    font-size: 1.5rem;
    letter-spacing: 0.06em;
    margin: 0;
}

.horta-auth-header .auth-ornament {
    color: var(--herge-sand);
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    display: block;
    margin-top: 6px;
    opacity: 0.8;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
}

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

.horta-auth-body .form-control {
    background: #fff;
}

.horta-auth-footer {
    text-align: center;
    padding: 0 30px 24px;
    color: var(--herge-ink-light);
}

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

.horta-auth-footer a:hover {
    color: var(--herge-orange);
}

.horta-auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--herge-ink-light);
    font-size: 0.85rem;
}

.horta-auth-divider::before,
.horta-auth-divider::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--herge-ink);
    opacity: 0.12;
}

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

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

/* --- Footer --- */
.horta-footer {
    background: var(--herge-blue-deep);
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    padding: 16px 20px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    border-top: 2px solid var(--herge-ink);
    position: relative;
    margin-top: 40px;
}

.horta-footer::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--herge-orange-light);
}

.horta-footer a {
    color: var(--herge-sand);
}

/* --- Ornamental decorations --- SVG star pattern */
.horta-ornament {
    text-align: center;
    color: var(--herge-orange);
    opacity: 0.4;
    font-size: 1rem;
    letter-spacing: 0.4em;
    margin: 12px 0;
    user-select: none;
}

.horta-divider {
    height: 2px;
    background: var(--herge-ink);
    margin: 24px 0;
    opacity: 0.12;
    position: relative;
}

/* SVG compass rose on divider */
.horta-divider::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    background:
        var(--herge-paper)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8956a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E") no-repeat center / contain;
    padding: 0 4px;
}

/* --- Page title --- */
.horta-page-title {
    font-family: 'Fredoka One', 'Impact', sans-serif;
    color: var(--herge-ink);
    font-size: 1.9rem;
    position: relative;
    padding-bottom: 14px;
    margin-bottom: 24px;
}

/* SVG underline zigzag */
.horta-page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 6px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6'%3E%3Cpath d='M0 3 L10 0 L20 6 L30 0 L40 6 L50 0 L60 6 L70 0 L80 6 L90 0 L100 3' fill='none' stroke='%23e8956a' stroke-width='2'/%3E%3C/svg%3E") no-repeat left center / contain;
}

/* --- Selection highlight for media library cards --- */
.card.border-primary {
    border-color: var(--herge-blue) !important;
}

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

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

::-webkit-scrollbar-track {
    background: var(--herge-paper-aged);
}

::-webkit-scrollbar-thumb {
    background: var(--herge-ink-light);
    border-radius: 4px;
    border: 1px solid var(--herge-paper-aged);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--herge-orange);
}

/* --- Code blocks --- */
code {
    background: var(--herge-sand-light);
    color: var(--herge-blue-deep);
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.9em;
    border: 1px solid rgba(26, 26, 26, 0.15);
}

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

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

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

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

/* Accordion item — ligne claire */
.horta-acc-item {
    background: var(--herge-paper);
    border: 2px solid var(--herge-ink);
    border-radius: var(--herge-radius);
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 2px 2px 0 rgba(58, 54, 50, 0.06);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.horta-acc-item.open {
    border-color: var(--herge-blue);
    box-shadow: 3px 3px 0 rgba(58, 54, 50, 0.10);
}

/* 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(--herge-paper);
    transition: background 0.1s ease;
}

.horta-acc-header:active {
    background: var(--herge-sand-light);
}

.horta-acc-title {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--herge-ink);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.horta-acc-chevron {
    color: var(--herge-orange);
    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 rgba(58, 54, 50, 0.07);
    gap: 8px;
}

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

.horta-acc-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--herge-ink-medium);
    flex-shrink: 0;
    min-width: 80px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.horta-acc-value {
    font-size: 0.88rem;
    color: var(--herge-ink);
    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: 2px solid rgba(58, 54, 50, 0.08);
    justify-content: flex-end;
}

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

/* Separator in accordion body */
.horta-acc-body::before {
    content: '';
    display: block;
    height: 2px;
    background: var(--herge-ink);
    margin-bottom: 10px;
    opacity: 0.08;
}

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

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

    .horta-auth-card {
        border-radius: var(--herge-radius);
    }
}
