/* ==========================================================================
   REDEVANCES — thème violet + doré, aligné sur le profil adhérent (18/11/2026).
   Mêmes composants que le thème Adhésion (adhesion-theme.css) : cartes à liseré, en-têtes, tableaux,
   onglets, badges, champs ; seule la couleur change. Appliqué par content.blade.php aux pages /redevances.
   Les vues utilisent les variables --rv-* à la place des couleurs écrites en ligne.
   ========================================================================== */

.content-wrapper.redevances-theme {
    --rv-violet: #5b4b8a; --rv-violet-fonce: #3f3366; --rv-violet-clair: #7a6aa8;
    --rv-violet-pale: #f5f3f9; --rv-violet-bord: #dcd7e8;
    --rv-or: #c9a227; --rv-or-fonce: #96791a;
    --rv-bord: #e4e7ec; --rv-ligne: #eaecf0; --rv-gris: #f8f9fa; --rv-texte: #1d2939; --rv-muted: #667085;
}

/* ---------- Couleurs ---------- */
.content-wrapper.redevances-theme .btn-primary,
.content-wrapper.redevances-theme .btn-info { background: var(--rv-violet) !important; border-color: var(--rv-violet) !important; color: #fff !important; }
.content-wrapper.redevances-theme .btn-primary:hover,
.content-wrapper.redevances-theme .btn-info:hover { background: var(--rv-violet-fonce) !important; border-color: var(--rv-violet-fonce) !important; color: #fff !important; }
.content-wrapper.redevances-theme .btn-outline-primary,
.content-wrapper.redevances-theme .btn-outline-info { color: var(--rv-violet) !important; border-color: var(--rv-violet) !important; background: transparent !important; }
.content-wrapper.redevances-theme .btn-outline-primary:hover,
.content-wrapper.redevances-theme .btn-outline-info:hover { background: var(--rv-violet) !important; color: #fff !important; }
.content-wrapper.redevances-theme .bg-primary:not([class*="bg-opacity-"]),
.content-wrapper.redevances-theme .bg-info:not([class*="bg-opacity-"]),
.content-wrapper.redevances-theme .badge-primary,
.content-wrapper.redevances-theme .badge-info { background-color: var(--rv-violet) !important; color: #fff !important; }
.content-wrapper.redevances-theme .bg-light-info,
.content-wrapper.redevances-theme .bg-light-blue,
.content-wrapper.redevances-theme .bg-light-primary { background-color: var(--rv-violet-pale) !important; }
.content-wrapper.redevances-theme .text-primary,
.content-wrapper.redevances-theme .text-info { color: var(--rv-violet) !important; }
.content-wrapper.redevances-theme .border-primary,
.content-wrapper.redevances-theme .border-info { border-color: var(--rv-violet) !important; }
.content-wrapper.redevances-theme .alert-info { background: var(--rv-violet-pale) !important; border-color: var(--rv-violet-bord) !important; color: var(--rv-violet-fonce) !important; }
.content-wrapper.redevances-theme .page-item.active .page-link { background: var(--rv-violet) !important; border-color: var(--rv-violet) !important; color: #fff !important; }
.content-wrapper.redevances-theme .page-link { color: var(--rv-violet); }
/* Couleurs par défaut des balises : enveloppées dans :where() pour n'avoir que la spécificité de la balise.
   Une classe de composant (onglet actif, bouton, pastille…) l'emporte donc toujours : jamais de texte de la
   couleur de son propre fond (ex. onglet actif vert d'eau dont le lien restait vert d'eau). */
:where(.content-wrapper.redevances-theme) a:where(:not(.btn):not(.nav-link):not(.page-link):not(.dropdown-item):not(.profil-btn):not(.kbtn):not(.pcard__btn)) { color: var(--rv-violet); }
:where(.content-wrapper.redevances-theme) a:where(:not(.btn):not(.nav-link):not(.page-link):not(.dropdown-item):not(.profil-btn):not(.kbtn):not(.pcard__btn)):hover { color: var(--rv-violet-fonce, #3f3366); }
.content-wrapper.redevances-theme .form-control:focus,
.content-wrapper.redevances-theme .form-select:focus,
.content-wrapper.redevances-theme .custom-select:focus { border-color: var(--rv-violet-clair) !important; box-shadow: 0 0 0 3px rgba(106, 90, 156, .15) !important; }
.content-wrapper.redevances-theme .custom-control-input:checked ~ .custom-control-label::before { background-color: var(--rv-violet) !important; border-color: var(--rv-violet) !important; }
.content-wrapper.redevances-theme .form-check-input:checked { background-color: var(--rv-violet) !important; border-color: var(--rv-violet) !important; }

/* ---------- Structure (pages Cotisations et Référentiel) ---------- */
.content-wrapper.redevances-theme { font-size: .88rem; color: var(--rv-texte); }
.content-wrapper.redevances-theme .card { border: 1px solid var(--rv-bord); border-left: 4px solid var(--rv-violet); border-radius: 12px;
    box-shadow: 0 2px 4px rgba(91, 75, 138, .10); overflow: hidden; }
.content-wrapper.redevances-theme .card .card { border-left-width: 1px; box-shadow: none; }
.content-wrapper.redevances-theme .card-outline, .content-wrapper.redevances-theme .card-primary.card-outline,
.content-wrapper.redevances-theme .card-info.card-outline { border-top: 1px solid var(--rv-bord) !important; }
.content-wrapper.redevances-theme .card > .card-header { background: #fff !important; color: var(--rv-texte) !important; border-bottom: 1px solid var(--rv-ligne); }
.content-wrapper.redevances-theme .card-primary:not(.card-outline) > .card-header,
.content-wrapper.redevances-theme .card-info:not(.card-outline) > .card-header { background: #fff !important; color: var(--rv-violet) !important; }
.content-wrapper.redevances-theme .card-title, .content-wrapper.redevances-theme .card-header h3,
.content-wrapper.redevances-theme .card-header h4, .content-wrapper.redevances-theme .card-header h5 { font-size: .95rem; font-weight: 600; color: var(--rv-violet); }
.content-wrapper.redevances-theme .card-header .card-title i, .content-wrapper.redevances-theme .card-header h5 i { color: var(--rv-or-fonce); }

/* Titres de page */
:where(.content-wrapper.redevances-theme) :where(h1, .h1) { font-size: 1.15rem; font-weight: 600; color: var(--rv-violet); }
:where(.content-wrapper.redevances-theme) :where(h2, .h2) { font-size: 1.05rem; font-weight: 600; color: var(--rv-violet); }
.content-wrapper.redevances-theme h3, .content-wrapper.redevances-theme .h3 { font-size: .98rem; }

/* Tableaux */
.content-wrapper.redevances-theme .table { font-size: .84rem; color: var(--rv-texte); }
.content-wrapper.redevances-theme .table thead th { background: var(--rv-gris) !important; color: #495057 !important; font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .4px; border-top: 0; border-bottom: 2px solid var(--rv-violet) !important; vertical-align: bottom; }
.content-wrapper.redevances-theme .table td { border-color: #f1f3f5; vertical-align: middle; }
.content-wrapper.redevances-theme .table-striped tbody tr:nth-of-type(odd) { background: #fbfcfd; }
.content-wrapper.redevances-theme .table-hover tbody tr:hover { background: #faf7ff !important; }
.content-wrapper.redevances-theme .thead-dark th, .content-wrapper.redevances-theme .table-dark th { background: var(--rv-violet) !important; color: #fff !important; border-color: var(--rv-violet) !important; }

/* Onglets */
.content-wrapper.redevances-theme .nav-tabs { border-bottom: 1px solid var(--rv-ligne); }
.content-wrapper.redevances-theme .nav-tabs .nav-link { color: var(--rv-muted); border: 0; border-bottom: 2px solid transparent; font-size: .84rem; font-weight: 500; }
.content-wrapper.redevances-theme .nav-tabs .nav-link:hover { color: var(--rv-texte); }
.content-wrapper.redevances-theme .nav-tabs .nav-link.active { color: var(--rv-violet) !important; font-weight: 600; background: transparent !important; border-bottom-color: var(--rv-or) !important; }
.content-wrapper.redevances-theme .nav-pills .nav-link.active { background: var(--rv-violet) !important; color: #fff !important; }

/* Champs et boutons */
.content-wrapper.redevances-theme .form-control, .content-wrapper.redevances-theme .form-select,
.content-wrapper.redevances-theme .custom-select { font-size: .85rem; border-color: #d0d5dd; border-radius: .45rem; }
:where(.content-wrapper.redevances-theme) label { font-size: .78rem; font-weight: 600; color: var(--rv-muted); }
.content-wrapper.redevances-theme .btn { font-size: .82rem; font-weight: 500; border-radius: .5rem; }
.content-wrapper.redevances-theme .badge { font-weight: 500; border-radius: .4rem; }

/* Indicateurs AdminLTE (small-box / info-box) */
.content-wrapper.redevances-theme .small-box, .content-wrapper.redevances-theme .info-box { border-radius: 12px; box-shadow: 0 2px 4px rgba(91, 75, 138, .10); }
.content-wrapper.redevances-theme .info-box .info-box-icon.bg-info,
.content-wrapper.redevances-theme .info-box .info-box-icon.bg-primary { background: linear-gradient(140deg, var(--rv-violet) 0%, var(--rv-violet-clair) 100%) !important; }

/* Contrastes lisibles (≥ 4,5:1 sur blanc) : le jaune et le vert Bootstrap sont illisibles en texte sur fond clair. */
.content-wrapper.redevances-theme .text-warning { color: #b54708 !important; }
.content-wrapper.redevances-theme .text-success { color: #067647 !important; }
.content-wrapper.redevances-theme .btn-outline-warning { color: #b54708 !important; border-color: #f79009 !important; }
.content-wrapper.redevances-theme .btn-outline-warning:hover,
.content-wrapper.redevances-theme .btn-outline-warning.active { background: #fef0c7 !important; color: #93370d !important; border-color: #f79009 !important; }
.content-wrapper.redevances-theme .badge.bg-success:not([class*="bg-opacity-"]) { background-color: #067647 !important; color: #fff !important; }
.content-wrapper.redevances-theme .btn-success { background-color: #067647 !important; border-color: #067647 !important; color: #fff !important; }
.content-wrapper.redevances-theme .btn-success:hover { background-color: #05603a !important; border-color: #05603a !important; }

/* ---------- Spécifique Redevances ---------- */
/* En-tête de page (composant x-redevances.entete) : comme la barre du profil */
.content-wrapper.redevances-theme .rv-entete { position: relative; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; background: #fff;
    border: 1px solid var(--rv-ligne); border-radius: 14px; padding: .9rem 1.1rem .8rem; margin-bottom: 1.1rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -12px rgba(76, 29, 149, .22); overflow: hidden; }
.content-wrapper.redevances-theme .rv-entete::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--rv-violet-fonce), var(--rv-violet-clair) 60%, var(--rv-or)); }
.content-wrapper.redevances-theme .rv-entete__icone { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 1rem; flex-shrink: 0;
    background: linear-gradient(140deg, var(--rv-violet) 0%, var(--rv-violet-clair) 100%); box-shadow: 0 6px 14px -6px rgba(91, 75, 138, .6); }
.content-wrapper.redevances-theme .rv-entete h1 { font-size: 1.1rem; font-weight: 600; color: var(--rv-violet-fonce); margin: 0; line-height: 1.25; }
.content-wrapper.redevances-theme .rv-entete p { font-size: .78rem; color: var(--rv-muted); margin: .1rem 0 0; }
.content-wrapper.redevances-theme .rv-entete__texte { flex: 1; min-width: 0; }
.content-wrapper.redevances-theme .rv-entete__actions { display: flex; flex-wrap: wrap; gap: .4rem; }

/* Cartes : les styles écrits en ligne (rayon, ombre) cèdent au style du profil */
.content-wrapper.redevances-theme .card { border-radius: 12px !important; box-shadow: 0 2px 4px rgba(91, 75, 138, .08) !important; }
.content-wrapper.redevances-theme .card > .card-header { padding: .75rem 1rem; }
.content-wrapper.redevances-theme .card > .card-header h5, .content-wrapper.redevances-theme .card > .card-header h6,
.content-wrapper.redevances-theme .card > .card-header .font-weight-bold { font-weight: 600 !important; }
.content-wrapper.redevances-theme .font-weight-bold { font-weight: 600 !important; }

/* Tableaux : en-tête discret, lignes aérées */
.content-wrapper.redevances-theme .table thead th { border-bottom: 1px solid var(--rv-ligne) !important; color: var(--rv-muted) !important; font-size: .68rem; padding: .55rem .75rem; }
.content-wrapper.redevances-theme .table td { padding: .55rem .75rem; }
.content-wrapper.redevances-theme .table-hover tbody tr:hover td { background: #faf7ff; }

/* Fenêtres (modales) */
.content-wrapper.redevances-theme .modal-content { border: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 48px -12px rgba(16, 24, 40, .3); }
.content-wrapper.redevances-theme .modal-header { background: #fff !important; color: var(--rv-texte) !important; border-bottom: 1px solid var(--rv-ligne); box-shadow: inset 0 3px 0 var(--rv-violet); }
.content-wrapper.redevances-theme .modal-title { font-size: 1rem; font-weight: 600; color: var(--rv-violet-fonce) !important; }
.content-wrapper.redevances-theme .modal-footer { background: var(--rv-gris); border-top: 1px solid var(--rv-ligne); }

/* Champs : focus violet */
.content-wrapper.redevances-theme .form-control:focus, .content-wrapper.redevances-theme select:focus { border-color: var(--rv-violet-clair) !important; box-shadow: 0 0 0 3px rgba(106, 90, 156, .15) !important; }
.content-wrapper.redevances-theme .input-group:focus-within { box-shadow: 0 0 0 3px rgba(106, 90, 156, .15); border-color: var(--rv-violet-clair) !important; }
