/*
 * Identité visuelle de l'établissement : café et marron.
 * Chargé après skin_color.css et mystyles.css pour remplacer le bleu du template.
 * Les règles des composants du template recolorées se trouvent dans sukuli-brand-generated.css.
 */
@import url("sukuli-brand-generated.css");

:root {
    --brand-ink: #3b2618;
    --brand-muted: #806b5d;
    --brand-primary: #7a4b2a;
    --brand-primary-dark: #58351f;
    --brand-accent: #c8955f;
    --brand-line: #e8dccf;
    --brand-cream: #f8f3ec;
    --brand-cream-strong: #f3eadf;
}

/* ---------- Application (layout principal) ---------- */

body.theme-primary.layout-top-nav {
    color: var(--brand-ink);
}

.theme-primary .content-wrapper {
    background: var(--brand-cream);
}

.theme-primary .content-wrapper a:not(.btn):not(.nav-link):not(.page-link):not(.dropdown-item) {
    color: var(--brand-primary);
}

.theme-primary .content-wrapper a:not(.btn):not(.nav-link):not(.page-link):not(.dropdown-item):hover {
    color: var(--brand-primary-dark);
}

.theme-primary .text-primary,
.theme-primary a.text-primary:hover {
    color: var(--brand-primary) !important;
    font-weight: 700 !important;
}

.theme-primary .text-primary-dark {
    color: var(--brand-primary-dark) !important;
}

.theme-primary .bg-primary {
    background-color: var(--brand-primary) !important;
}

.theme-primary .bg-primary-light {
    background-color: var(--brand-cream-strong) !important;
}

.theme-primary .main-header {
    border-bottom: 1px solid var(--brand-line);
    box-shadow: 0 4px 18px rgba(75, 48, 29, 0.06);
}

.theme-primary .main-footer {
    border-top: 1px solid var(--brand-line);
    color: var(--brand-muted);
}

.theme-primary .main-footer a {
    color: var(--brand-primary);
    font-weight: 600;
}

.theme-primary .breadcrumb-item a,
.theme-primary .breadcrumb-item.active {
    color: var(--brand-primary);
}

.theme-primary .box {
    border: 1px solid var(--brand-line);
    border-radius: 12px;
    box-shadow: 0 8px 26px rgba(75, 48, 29, 0.06);
}

.theme-primary .box-header.with-border,
.theme-primary .box-footer {
    border-color: var(--brand-line);
}

.theme-primary .box-title {
    color: var(--brand-ink);
}

.theme-primary hr {
    border-color: var(--brand-line);
}

/* ---------- Boutons ---------- */

.theme-primary .btn-primary {
    border-radius: 8px;
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

.theme-primary .btn-primary:hover,
.theme-primary .btn-primary:focus,
.theme-primary .btn-primary:active {
    background-color: var(--brand-primary-dark);
    border-color: var(--brand-primary-dark);
    color: #fff;
}

.theme-primary .btn-primary-light {
    border-radius: 8px;
    background-color: var(--brand-cream-strong);
    border-color: var(--brand-cream-strong);
    color: var(--brand-primary-dark) !important;
}

.theme-primary .btn-primary-light:hover,
.theme-primary .btn-primary-light:focus,
.theme-primary .btn-primary-light:active {
    background-color: #ead9c6;
    border-color: #ead9c6;
}

.theme-primary .btn:focus-visible,
.theme-primary a:focus-visible {
    outline: 3px solid rgba(122, 75, 42, 0.35);
    outline-offset: 2px;
}

/* ---------- Formulaires ---------- */

.theme-primary .form-label {
    color: #4a3527;
    font-weight: 600;
}

.theme-primary .form-control,
.theme-primary .form-select,
.theme-primary .select2-container--default .select2-selection--single,
.theme-primary .select2-container--default .select2-selection--multiple {
    border-color: var(--brand-line);
    color: var(--brand-ink);
}

.theme-primary .form-control:focus,
.theme-primary .form-select:focus,
.theme-primary .select2-container--default.select2-container--open .select2-selection--single,
.theme-primary .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(122, 75, 42, 0.12);
}

.theme-primary .form-control:disabled,
.theme-primary .form-control[readonly] {
    background-color: var(--brand-cream);
}

.theme-primary .input-group-text {
    border-color: var(--brand-line);
    background-color: #fbf8f4;
    color: var(--brand-muted);
}

.theme-primary .form-check-input:checked,
.theme-primary .form-check-input[type="checkbox"]:checked,
.theme-primary .form-check-input[type="radio"]:checked {
    border-color: var(--brand-primary);
    background-color: var(--brand-primary);
}

.theme-primary .select2-container--default .select2-results__option--highlighted[aria-selected],
.theme-primary .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--brand-primary);
    color: #fff;
}

.theme-primary .select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: var(--brand-cream-strong);
}

/* ---------- Tableaux, pagination, onglets ---------- */

.theme-primary .table thead th {
    border-color: var(--brand-line);
    color: var(--brand-primary-dark);
}

.theme-primary .table > :not(caption) > * > * {
    border-color: var(--brand-line);
}

.theme-primary .table-hover > tbody > tr:hover > * {
    background-color: var(--brand-cream);
}

.theme-primary .page-item.active .page-link,
.theme-primary .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.theme-primary .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    border-color: var(--brand-primary) !important;
    background: var(--brand-primary) !important;
    color: #fff !important;
}

.theme-primary .page-link {
    color: var(--brand-primary);
}

.theme-primary .nav-tabs .nav-link.active,
.theme-primary .nav-pills .nav-link.active {
    border-color: var(--brand-primary);
    color: #fff;
}

.theme-primary .nav-tabs .nav-link.active {
    background: transparent;
    color: var(--brand-primary);
}

.theme-primary .nav-pills .nav-link.active {
    background: var(--brand-primary);
}

.theme-primary .progress-bar {
    background-color: var(--brand-primary);
}

.theme-primary .badge.bg-primary,
.theme-primary .badge-primary {
    background-color: var(--brand-primary) !important;
    color: #fff;
}

/* ---------- Fenêtres modales et alertes ---------- */

.theme-primary .modal-content {
    border: 1px solid var(--brand-line);
    border-radius: 12px;
}

.theme-primary .modal-header,
.theme-primary .modal-footer {
    border-color: var(--brand-line);
}

.swal2-styled.swal2-confirm {
    background-color: var(--brand-primary) !important;
    border-radius: 8px;
}

.swal2-styled.swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(122, 75, 42, 0.3) !important;
}

.swal2-styled.swal2-cancel {
    border-radius: 8px;
}

/* ---------- Indicateurs de chargement ---------- */

.theme-primary .loader {
    border-top-color: var(--brand-primary);
}

#loader {
    border-top-color: var(--brand-primary);
}

/* ---------- Pages d'authentification autonomes ---------- */

body.parent-auth-page {
    min-height: 100vh;
    margin: 0;
    padding: 32px 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #f8f3ec, #efe2d3);
    color: var(--brand-ink);
    font-family: "Inter", "Segoe UI", sans-serif;
}

.parent-auth-page .auth-container {
    width: 100%;
    max-width: 500px;
    height: auto;
}

.parent-auth-page .auth-container.auth-wide {
    max-width: 540px;
}

.parent-auth-page .auth-row,
.parent-auth-page .auth-column {
    height: auto;
    margin: 0;
}

.parent-auth-page .auth-column {
    width: 100%;
    max-width: none;
    padding: 0;
}

.parent-auth-page .auth-card {
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--brand-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(75, 48, 29, 0.12);
}

.parent-auth-page .auth-header {
    padding: 30px 32px 0;
    text-align: center;
}

.parent-auth-page .auth-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin-bottom: 20px;
    border-radius: 18px;
    background: var(--brand-cream);
}

.parent-auth-page .auth-brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.parent-auth-page .auth-title {
    margin: 0;
    color: var(--brand-ink);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.4;
}

.parent-auth-page .auth-card .box-header {
    border-color: #eee5db;
}

.parent-auth-page .auth-card .box-body {
    padding: 26px 32px 20px;
}

.parent-auth-page .auth-description {
    margin: 0 0 22px;
    color: var(--brand-muted);
    font-size: 14px;
    line-height: 1.7;
}

.parent-auth-page .form-control {
    min-height: 48px;
    border-radius: 0 9px 9px 0;
}

.parent-auth-page .input-group-text:first-child {
    border-radius: 9px 0 0 9px;
}

.parent-auth-page .text-danger {
    display: block;
    min-height: 18px;
    font-size: 13px;
}

.parent-auth-page .auth-alert {
    margin: 0 0 18px;
    padding: 0;
    text-align: center;
}

.parent-auth-page .auth-alert:empty {
    display: none;
}

.parent-auth-page .auth-links {
    margin: 4px 0 0;
    color: var(--brand-muted);
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
}

.parent-auth-page .auth-links.auth-links-end {
    text-align: right;
}

.parent-auth-page .auth-links a {
    color: var(--brand-primary);
    font-weight: 700;
    text-decoration: none;
}

.parent-auth-page .auth-links a:hover {
    color: var(--brand-primary-dark);
    text-decoration: underline;
}

.parent-auth-page .auth-card .box-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 32px 26px;
    border-color: #eee5db;
}

.parent-auth-page .btn-primary-light {
    border: 1px solid var(--brand-line);
}

.parent-auth-page .auth-submit {
    border: 1px solid var(--brand-primary);
    border-radius: 8px;
    background: var(--brand-primary);
    color: #fff;
}

.parent-auth-page .auth-submit:hover,
.parent-auth-page .auth-submit:focus {
    border-color: var(--brand-primary-dark);
    background: var(--brand-primary-dark);
    color: #fff;
}

.parent-auth-page .auth-submit:disabled {
    cursor: wait;
    opacity: 0.75;
}

.parent-auth-page .g-recaptcha {
    display: flex;
    justify-content: center;
    margin: 18px 0;
}

.parent-auth-page .loader {
    display: none;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin-left: auto;
    border: 3px solid #eadfd3;
    border-radius: 50%;
    border-top-color: var(--brand-primary);
    animation: sukuli-spin 0.8s linear infinite;
}

.parent-auth-page .auth-message {
    text-align: center;
}

.parent-auth-page .auth-success-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--brand-cream-strong);
    color: var(--brand-primary);
    font-size: 28px;
}

.parent-auth-page .auth-message h2 {
    margin: 0 0 12px;
    color: var(--brand-primary-dark);
    font-size: 26px;
    font-weight: 700;
}

.parent-auth-page .auth-message p {
    margin: 0 0 12px;
    color: var(--brand-muted);
    font-size: 15px;
    line-height: 1.7;
    text-align: left;
}

.parent-auth-page .auth-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 12px;
    padding: 0 20px;
    border-radius: 9px;
    background: var(--brand-primary);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease;
}

.parent-auth-page .auth-login-button:hover,
.parent-auth-page .auth-login-button:focus {
    background: var(--brand-primary-dark);
    color: #fff;
}

@keyframes sukuli-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    .parent-auth-page .auth-header {
        padding: 26px 22px 0;
    }

    .parent-auth-page .auth-card .box-body {
        padding: 22px 22px 16px;
    }

    .parent-auth-page .auth-card .box-footer {
        flex-wrap: wrap;
        padding: 16px 22px 22px;
    }

    .parent-auth-page .auth-card .box-footer .btn {
        flex: 1 1 auto;
    }

    .parent-auth-page .loader {
        display: none !important;
    }
}

@media (max-width: 380px) {
    .parent-auth-page .g-recaptcha {
        transform: scale(0.78);
        transform-origin: center top;
        margin-bottom: -10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .parent-auth-page .loader {
        animation: none;
    }
}

/* ---------- Menu principal : fond café, liens blancs ---------- */

.theme-primary .main-nav,
.theme-primary .main-nav .sm-blue {
    background: var(--brand-primary-dark);
}

.theme-primary .main-nav .sm-blue > li > a,
.theme-primary .main-nav .sm-blue > li > a svg,
.theme-primary .main-nav .sm-blue > li > a i {
    color: #fff !important;
}

.theme-primary .main-nav .sm-blue > li > a:hover,
.theme-primary .main-nav .sm-blue > li > a:focus,
.theme-primary .main-nav .sm-blue > li > a.highlighted,
.theme-primary .main-nav .sm-blue > li > a.current {
    background: var(--brand-primary) !important;
    color: #fff !important;
}

.theme-primary .main-nav .sm-blue ul {
    background: #fff;
}

.theme-primary .main-nav .sm-blue ul a {
    color: var(--brand-ink) !important;
}

.theme-primary .main-nav .sm-blue ul a:hover,
.theme-primary .main-nav .sm-blue ul a:focus,
.theme-primary .main-nav .sm-blue ul a.highlighted {
    background: var(--brand-cream-strong) !important;
    color: var(--brand-primary-dark) !important;
}
