/* ============================================
   CRM/ERP UCAPR - Styles personnalisés
   ============================================ */

/* ============================================
   ACCESSIBILITÉ RGAA
   ============================================ */

/* Lien d'accès rapide au contenu (RGAA 12.7) */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: #1b4d1c;
    color: #fff;
    padding: .75rem 1.5rem;
    z-index: 10000;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    font-size: .95rem;
    transition: top .15s ease;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid #8bc34a;
    outline-offset: 0;
    color: #fff;
}

/* Focus visible global (RGAA 10.7) */
*:focus-visible {
    outline: 3px solid #2d6a2e;
    outline-offset: 2px;
    border-radius: 2px;
}
.navbar-dark *:focus-visible,
.public-footer *:focus-visible,
.bg-primary *:focus-visible {
    outline-color: #8bc34a;
}
.btn:focus-visible {
    outline: 3px solid #2d6a2e;
    outline-offset: 2px;
    box-shadow: none;
}
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 3px solid #2d6a2e;
    outline-offset: 0;
    box-shadow: none;
    border-color: var(--ucapr-primary);
}
.btn-close:focus-visible {
    outline: 3px solid #2d6a2e;
    outline-offset: 2px;
    box-shadow: none;
}
/* Supprimer le outline par défaut au profit de focus-visible */
*:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================
   END ACCESSIBILITÉ
   ============================================ */

/* Variables */
:root {
    --ucapr-primary: #2d6a2e;
    --ucapr-primary-dark: #1b4d1c;
    --ucapr-primary-light: #4a8c3f;
    --ucapr-accent: #8bc34a;
    --ucapr-accent-light: #c5e1a5;
    --ucapr-sidebar-width: 0px;
    --ucapr-navbar-height: 56px;
}

/* General */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f0f2f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #1b4d1c 0%, #2d6a2e 40%, #1a3a1b 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 20% 50%, rgba(139, 195, 74, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(45, 106, 46, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 60% 80%, rgba(76, 175, 80, 0.08) 0%, transparent 50%);
    animation: loginBgFloat 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes loginBgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, -1%) rotate(1deg); }
    66% { transform: translate(-1%, 2%) rotate(-1deg); }
}

.login-container {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    animation: loginCardEntry 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes loginCardEntry {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #4a8c3f, #2d6a2e);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.8rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(45, 106, 46, 0.35);
    transition: transform 0.3s ease;
}

.login-logo:hover {
    transform: scale(1.05) rotate(-3deg);
}

.login-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1b4d1c;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.login-header .text-muted {
    font-size: 0.9rem;
    color: #6b7280 !important;
}

.login-card .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}

.login-card .form-control-lg {
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.login-card .form-control-lg:focus {
    border-color: #4a8c3f;
    box-shadow: 0 0 0 4px rgba(45, 106, 46, 0.12);
    background: #fff;
}

.login-card .input-group .btn {
    border-radius: 0 12px 12px 0;
    border: 2px solid #e5e7eb;
    border-left: 0;
    background: #f9fafb;
    color: #6b7280;
    transition: all 0.2s ease;
}

.login-card .input-group .btn:hover {
    color: #2d6a2e;
    background: #f0fdf4;
}

.login-card .input-group .form-control-lg {
    border-radius: 12px 0 0 12px;
}

.login-card .btn-primary.btn-lg {
    border-radius: 12px;
    padding: 0.8rem;
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(135deg, #4a8c3f, #2d6a2e);
    border: none;
    box-shadow: 0 4px 16px rgba(45, 106, 46, 0.3);
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.login-card .btn-primary.btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 106, 46, 0.4);
    background: linear-gradient(135deg, #2d6a2e, #1b4d1c);
}

.login-card .btn-primary.btn-lg:active {
    transform: translateY(0);
}

.login-card .alert {
    border-radius: 12px;
    border: none;
    font-size: 0.9rem;
}

.login-card .alert-danger {
    background: #fef2f2;
    color: #991b1b;
}

.login-card .alert-success {
    background: #f0fdf4;
    color: #166534;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f3f4f6;
}

.login-footer small {
    color: #9ca3af !important;
    font-size: 0.8rem;
}

.login-features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.login-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    text-align: center;
}

.login-feature i {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Navbar */
.navbar {
    z-index: 1030;
}

.navbar.bg-primary {
    background-color: var(--ucapr-primary) !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Admin navbar — compact links */
.navbar .nav-link {
    font-size: .875rem;
    padding: .5rem .65rem;
    white-space: nowrap;
}

.navbar .dropdown-toggle::after {
    margin-left: .25em;
    vertical-align: .2em;
}

/* Hide nav labels below xl for very compact display */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .navbar .nav-label { display: none; }
    .navbar .nav-link { padding: .5rem .55rem; }
    .navbar .nav-link i { font-size: 1.1rem; }
}

@media (min-width: 1400px) {
    .navbar .nav-label { display: inline; }
}

/* Main content */
.main-content {
    margin-top: var(--ucapr-navbar-height);
    flex: 1;
    padding-top: 1rem;
}

/* Cards */
.card {
    border-radius: 12px;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.25rem;
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card .card-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.stat-card .card-subtitle {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Clickable cards */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
}

.card-hover .card-footer small {
    transition: padding-left 0.2s ease;
}

.card-hover:hover .card-footer small {
    padding-left: 4px;
}

/* Table */
.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #6c757d;
    border-bottom-width: 1px;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(45, 106, 46, 0.04);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.75em;
    font-size: 0.78rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.82rem;
}

.btn-primary {
    background-color: var(--ucapr-primary);
    border-color: var(--ucapr-primary);
}

.btn-primary:hover {
    background-color: var(--ucapr-primary-dark);
    border-color: var(--ucapr-primary-dark);
}

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

.btn-outline-primary:hover {
    background-color: var(--ucapr-primary);
    border-color: var(--ucapr-primary);
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border-color: #dee2e6;
    padding: 0.5rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--ucapr-primary);
    box-shadow: 0 0 0 0.2rem rgba(45, 106, 46, 0.15);
}

.form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
}

/* Footer */
.footer {
    margin-top: auto;
}

/* Pagination */
.page-link {
    color: var(--ucapr-primary);
    border-radius: 6px !important;
    margin: 0 2px;
}

.page-item.active .page-link {
    background-color: var(--ucapr-primary);
    border-color: var(--ucapr-primary);
}

/* Dropdown */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border-radius: 10px;
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 1rem;
    margin: 2px 4px;
}

/* List group */
.list-group-item-action:hover {
    background-color: rgba(45, 106, 46, 0.05);
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Responsive */
@media (max-width: 768px) {
    .login-page {
        padding: 1rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .login-features {
        gap: 1rem;
    }

    .stat-card .card-title {
        font-size: 1.3rem;
    }
    
    .main-content {
        padding-top: 0.5rem;
    }
}

/* Print */
@media print {
    .navbar, .footer, .btn, form {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ============================================
   PARTIE PUBLIQUE - Vitrine UCAPR
   ============================================ */

/* Public Hero */
.public-hero {
    background: linear-gradient(135deg, #1b4d1c 0%, #2d6a2e 60%, #4a8c3f 100%);
    color: #fff;
    padding: 4rem 0 3.5rem;
    position: relative;
    overflow: hidden;
}

.public-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.public-hero h1 { font-weight: 800; letter-spacing: -0.02em; }
.public-hero .lead { opacity: .9; }

.public-hero-home {
    padding: 5rem 0 4rem;
}

/* Public Navbar */
.navbar-public {
    background: linear-gradient(90deg, #1b4d1c, #2d6a2e) !important;
}

.navbar-public .nav-link {
    font-weight: 500;
    padding: .6rem 1rem;
    border-radius: 8px;
    transition: background .2s;
}

.navbar-public .nav-link:hover {
    background: rgba(255,255,255,.12);
}

.navbar-public .nav-link.active {
    font-weight: 700;
    background: rgba(255,255,255,.15);
    border-bottom: none;
}

.navbar-public .navbar-brand img {
    height: 36px;
    border-radius: 6px;
}

/* Annuaire Cards */
.card-annuaire {
    transition: transform .25s ease, box-shadow .25s ease;
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.card-annuaire:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,.12) !important;
}

.card-annuaire .card-img-top {
    height: 180px;
    object-fit: contain;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f7e6, #e8f5e9);
}

.card-annuaire .card-img-top.placeholder-img {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-annuaire .card-body { padding: 1.25rem; }

.card-annuaire .card-title {
    font-weight: 700;
    color: #1b4d1c;
}

/* Actualites Cards */
.actu-card {
    transition: transform .25s ease, box-shadow .25s ease;
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.actu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0,0,0,.1) !important;
}

.actu-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Categorie badges */
.categorie-badge {
    font-size: .78rem;
    background: #e8f5e9 !important;
    color: #2d6a2e !important;
    border-radius: 20px;
    padding: .35em .8em;
}

/* Section titles */
.section-title {
    font-weight: 800;
    color: #1b4d1c;
    position: relative;
    padding-bottom: .75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #8bc34a, #4a8c3f);
    border-radius: 2px;
}

.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Stats counter */
.stat-counter {
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
}

.stat-counter .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2d6a2e;
    line-height: 1;
}

.stat-counter .stat-label {
    font-size: .85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: .5rem;
}

/* Filter card */
.filter-card {
    border-radius: 16px;
    border: 2px solid #e8f5e9;
    background: #fafff6;
    padding: 1.25rem 1.5rem;
}

.filter-card .form-control:focus,
.filter-card .form-select:focus {
    border-color: #4a8c3f;
    box-shadow: 0 0 0 3px rgba(45, 106, 46, 0.1);
}

/* Public footer */
.public-footer {
    background: #1b4d1c;
    color: rgba(255,255,255,.85);
}

.public-footer a {
    color: rgba(255,255,255,.85);
    transition: color .2s;
}

.public-footer a:hover {
    color: #8bc34a;
}

.public-footer h6 {
    color: #8bc34a;
    text-transform: uppercase;
    font-size: .8rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

/* Footer accessible text (RGAA 3.2 — contraste 4.5:1) */
.footer-text-muted {
    color: rgba(255,255,255,.75);
}
.footer-cookie-btn {
    color: rgba(255,255,255,.75);
    font-size: inherit;
    vertical-align: baseline;
    line-height: inherit;
    background: none;
}
.footer-cookie-btn:hover,
.footer-cookie-btn:focus-visible {
    color: #8bc34a;
}

/* Article content — Rich HTML from editor */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}
.article-content h2 { font-size: 1.5rem; font-weight: 700; color: #1b4d1c; margin: 1.5rem 0 0.75rem; }
.article-content h3 { font-size: 1.25rem; font-weight: 700; color: #2d6a2e; margin: 1.25rem 0 0.5rem; }
.article-content h4 { font-size: 1.1rem; font-weight: 600; margin: 1rem 0 0.5rem; }
.article-content p { margin-bottom: 1rem; }
.article-content ul, .article-content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.article-content li { margin-bottom: 0.25rem; }
.article-content blockquote {
    border-left: 4px solid var(--ucapr-primary);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: #f8faf8;
    font-style: italic;
    color: #555;
}
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
.article-content table th,
.article-content table td {
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    text-align: left;
}
.article-content table th { background: #f8f9fa; font-weight: 600; }
.article-content a { color: var(--ucapr-primary); }
.article-content hr { margin: 1.5rem 0; border-top: 2px solid #e8f5e9; }
.article-content figure { margin: 1.5rem 0; text-align: center; }
.article-content figcaption { font-size: 0.9rem; color: #666; margin-top: 0.5rem; }

/* Breadcrumb */
.breadcrumb-item a {
    color: #2d6a2e;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #1b4d1c;
    text-decoration: underline;
}

/* Fiche detail */
.fiche-detail h1 {
    color: #1b4d1c;
    font-weight: 800;
}

.fiche-detail .info-label {
    color: #2d6a2e;
    font-weight: 700;
    font-size: .9rem;
}

.fiche-detail .info-label i {
    width: 20px;
}

/* Public responsive */
@media (max-width: 768px) {
    .public-hero { padding: 3rem 0 2.5rem; }
    .public-hero-home { padding: 3.5rem 0 3rem; }
    .stat-counter .stat-number { font-size: 2rem; }
}

/* CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, #2d6a2e 0%, #1b4d1c 100%);
    border-radius: 20px;
    color: #fff;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 300px; height: 300px;
    background: rgba(139, 195, 74, 0.15);
    border-radius: 50%;
    pointer-events: none;
}

.cta-banner .btn-light {
    color: #1b4d1c;
    font-weight: 700;
    padding: .75rem 2rem;
    border-radius: 12px;
}

/* Override Bootstrap primary for entire public site */
.bg-primary-subtle { background-color: #e8f5e9 !important; }
.text-primary { color: #2d6a2e !important; }
.btn-primary { background-color: #2d6a2e; border-color: #2d6a2e; }
.btn-primary:hover { background-color: #1b4d1c; border-color: #1b4d1c; }
.btn-outline-primary { color: #2d6a2e; border-color: #2d6a2e; }
.btn-outline-primary:hover { background-color: #2d6a2e; border-color: #2d6a2e; color: #fff; }

/* Category card hover on homepage */
.card[style*="transition"]:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(45, 106, 46, 0.12) !important;
}

/* Article detail sidebar */
.list-group-item-action:hover img,
.list-group-item-action:hover .rounded {
    transform: scale(1.05);
    transition: transform .2s;
}

/* Stat counter on white bg */
.stat-counter {
    border: 1px solid rgba(45, 106, 46, 0.08);
}

/* Article prev/next hover */
a[style*="background: #f8faf8"]:hover {
    background: #edf5ed !important;
}

/* Featured article card */
.card .badge.bg-primary {
    background-color: #2d6a2e !important;
    font-size: .75rem;
    letter-spacing: .5px;
    text-transform: uppercase;
}

/* Portail sidebar active green */
.offcanvas .nav-link.active,
.sidebar .nav-link.active {
    color: #2d6a2e !important;
    font-weight: 600;
}

/* Portail sidebar green theme fix */
.portail-sidebar .nav-link.active {
    background: #e8f5e9;
    color: #2d6a2e;
    border-left-color: #2d6a2e;
}
.portail-sidebar .nav-link:hover {
    color: #2d6a2e;
}
.member-card {
    background: linear-gradient(135deg, #2d6a2e 0%, #1b4d1c 100%) !important;
}

/* ============================================
   Bannière de consentement cookies
   ============================================ */
#cookie-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    transition: opacity .3s ease;
}
#cookie-banner {
    background: #fff;
    border-top: 3px solid var(--ucapr-primary, #2d6a2e);
    box-shadow: 0 -4px 20px rgba(0,0,0,.15);
    padding: 1.5rem 2rem;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 12px 12px 0 0;
}
#cookie-banner h3 {
    font-size: 1.1rem;
    color: var(--ucapr-primary-dark, #1b4d1c);
    margin-bottom: .5rem;
}
#cookie-banner p {
    font-size: .9rem;
    line-height: 1.5;
    color: #555;
}
.cookie-banner-inner {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.cookie-text { flex: 1; }
.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex-shrink: 0;
}
.btn-cookie { white-space: nowrap; }
.cookie-link {
    color: var(--ucapr-primary, #2d6a2e);
    text-decoration: underline;
}
.cookie-category {
    background: #f8f9fa;
    border-radius: 8px;
    padding: .75rem 1rem;
    margin-bottom: .5rem;
}
#cookie-details-panel hr {
    border-color: #e9ecef;
}
@media (max-width: 768px) {
    .cookie-banner-inner {
        flex-direction: column;
        text-align: center;
    }
    .cookie-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .cookie-actions .btn-cookie { flex: 1 1 auto; min-width: 120px; }
    #cookie-banner { padding: 1rem; }
}

/* ============================================
   Barre d'outils d'accessibilité
   ============================================ */

/* Bouton flottant */
.a11y-fab {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99990;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: var(--ucapr-primary, #2d6a2e);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.a11y-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.a11y-fab:focus-visible {
    outline: 3px solid #8bc34a;
    outline-offset: 3px;
}

/* Panneau */
.a11y-panel {
    position: fixed;
    bottom: 82px;
    left: 20px;
    z-index: 99991;
    width: 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,.2);
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
}
.a11y-panel.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.a11y-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
    color: var(--ucapr-primary-dark, #1b4d1c);
    font-size: .95rem;
}
.a11y-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #6c757d;
    cursor: pointer;
    line-height: 1;
    padding: 0 .25rem;
}
.a11y-close:hover { color: #333; }
.a11y-close:focus-visible { outline: 2px solid var(--ucapr-primary); border-radius: 4px; }

.a11y-panel-body {
    padding: .75rem 1.25rem 1rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Option row */
.a11y-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.a11y-option:last-child { border-bottom: none; }
.a11y-label {
    font-size: .875rem;
    color: #333;
    display: flex;
    align-items: center;
}

/* Font size controls */
.a11y-size-ctrl {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.a11y-btn-sm {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    background: #fff;
    font-size: .9rem;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, background .15s;
}
.a11y-btn-sm:hover { border-color: var(--ucapr-primary); background: #f0fdf4; }
.a11y-btn-sm:focus-visible { outline: 2px solid var(--ucapr-primary); outline-offset: 1px; }
.a11y-btn-sm small { font-size: .7rem; margin-left: 1px; }
.a11y-size-value {
    min-width: 44px;
    text-align: center;
    font-size: .82rem;
    font-weight: 600;
    color: var(--ucapr-primary-dark, #1b4d1c);
}

/* Toggle switch */
.a11y-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}
.a11y-toggle:focus-visible { outline: 2px solid var(--ucapr-primary); outline-offset: 2px; border-radius: 20px; }
.a11y-toggle-track {
    display: block;
    width: 42px;
    height: 24px;
    border-radius: 12px;
    background: #ccc;
    position: relative;
    transition: background .2s;
}
.a11y-toggle.active .a11y-toggle-track {
    background: var(--ucapr-primary, #2d6a2e);
}
.a11y-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform .2s;
}
.a11y-toggle.active .a11y-toggle-thumb {
    transform: translateX(18px);
}

/* Reset button */
.a11y-option-reset { justify-content: center; padding-top: .75rem; border-bottom: none; }
.a11y-btn-reset {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: .4rem 1rem;
    font-size: .82rem;
    color: #6c757d;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.a11y-btn-reset:hover { color: #333; border-color: #adb5bd; }
.a11y-btn-reset:focus-visible { outline: 2px solid var(--ucapr-primary); outline-offset: 1px; }

/* ---- Effets appliqués sur <html> ---- */

/* Contraste élevé */
html.a11y-contrast {
    filter: contrast(1.4);
}
html.a11y-contrast body {
    background: #fff !important;
}
html.a11y-contrast .navbar,
html.a11y-contrast .public-footer {
    filter: contrast(.75);
}

/* Masquer images */
html.a11y-no-images img:not(.a11y-fab img):not([role="presentation"]) {
    visibility: hidden !important;
}
html.a11y-no-images .card-img-top,
html.a11y-no-images .card-img,
html.a11y-no-images figure img {
    display: none !important;
}

/* Souligner tous les liens */
html.a11y-links a {
    text-decoration: underline !important;
}

/* Interligne augmenté */
html.a11y-line-height body {
    line-height: 2 !important;
}
html.a11y-line-height p,
html.a11y-line-height li,
html.a11y-line-height td,
html.a11y-line-height th,
html.a11y-line-height label,
html.a11y-line-height span {
    line-height: 2 !important;
}

/* Police lisible (sans-serif neutre, bon pour dyslexie) */
html.a11y-dyslexia body,
html.a11y-dyslexia body * {
    font-family: Verdana, Arial, Helvetica, sans-serif !important;
    letter-spacing: .04em !important;
    word-spacing: .12em !important;
}

/* Responsive: panneau pleine largeur sur mobile */
@media (max-width: 576px) {
    .a11y-panel {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 78px;
    }
    .a11y-fab {
        left: 10px;
        bottom: 14px;
        width: 46px;
        height: 46px;
        font-size: 1.3rem;
    }
}
