/**
 * Styles spécifiques aux pages publiques
 * Cour des Comptes - Bénin
 * Refonte alignée sur presidence.bj (Dec 2025)
 */

:root {
    /* Couleurs */
    --bs-primary: #0e406e;
    --bs-secondary: #0E6258;
    /* Vert Présidence */
    --bs-accent: #EB0000;
    --bs-body-color: #313131;
    --bs-light-bg: #f8f9fa;

    /* Typographie */
    --font-primary: 'Montserrat', sans-serif;

    /* Espacements */
    --section-padding: 80px;
    --card-padding: 30px;
}

body {
    font-family: var(--font-primary);
    font-size: 18px;
    /* Augmenté de 16px */
    line-height: 1.6;
    color: var(--bs-body-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.25rem;
    font-weight: 600;
}

h3 {
    font-size: 1.75rem;
}

/* Espacement des sections */
/* Espacement des sections */
section,
.section-padding {
    padding-top: var(--section-padding);
    padding-bottom: var(--section-padding);
}

/* Boutons style Présidence */
.btn-primary,
.btn-primary-custom {
    background-color: var(--bs-secondary) !important;
    border-color: var(--bs-secondary) !important;
    color: white !important;
    padding: 12px 24px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary-custom:hover {
    background-color: #0b4d44 !important;
    /* Version plus foncée */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 98, 88, 0.3);
}

/* Override Bootstrap containers for more breath */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}


/* ============================================
   FAQ PAGE
   ============================================ */
.faq-accordion .accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.faq-accordion .accordion-button {
    background-color: #f8f9fa;
    color: #0e406e;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    border: none;
}

.faq-accordion .accordion-button:not(.collapsed) {
    background-color: #0e406e;
    color: white;
    box-shadow: none;
}

.faq-accordion .accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(14, 64, 110, 0.25);
    border-color: #0e406e;
}

.faq-accordion .accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230e406e'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.faq-accordion .accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.faq-accordion .accordion-body {
    padding: 1.5rem;
    background-color: white;
}

/* ============================================
   MÉDIATHÈQUE PAGE
   ============================================ */
.media-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.media-card img {
    height: 250px;
    object-fit: cover;
    width: 100%;
}

.media-card .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
}

/* ============================================
   BIOGRAPHIE PRÉSIDENTE
   ============================================ */
.president-biography {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.president-photo-frame {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.president-photo-frame img {
    width: 100%;
    height: auto;
    display: block;
}

.president-quote {
    background: #0e406e;
    color: white;
    padding: 2rem;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    margin: 2rem 0;
}

.president-quote p {
    font-size: 1.1rem;
    font-style: italic;
    margin: 0;
}

/* ============================================
   MISSIONS PAGE
   ============================================ */
.mission-item {
    position: relative;
    padding: 1.5rem;
    border-left: 4px solid #0e406e;
    background: white;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.mission-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.mission-number {
    position: absolute;
    left: -20px;
    top: 20px;
    width: 40px;
    height: 40px;
    background: #0e406e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.mission-title {
    color: #0e406e;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* ============================================
   RECHERCHE AVANCÉE
   ============================================ */
.search-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-results .result-item {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 0;
}

.search-results .result-item:last-child {
    border-bottom: none;
}

.search-results .result-title {
    color: #0e406e;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.search-results .result-title:hover {
    color: #0a2e52;
    text-decoration: underline;
}

.search-highlight {
    background-color: #fff3cd;
    padding: 0 0.25rem;
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-info-card {
    background: linear-gradient(135deg, #0e406e 0%, #1a5490 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    height: 100%;
}

.contact-info-item {
    display: flex;
    align-items: start;
    margin-bottom: 1.5rem;
}

.contact-info-item i {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: #ffc107;
}

.contact-form .form-control,
.contact-form .form-select {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: #0e406e;
    box-shadow: 0 0 0 0.25rem rgba(14, 64, 110, 0.15);
}

/* ============================================
   ACTUALITÉS
   ============================================ */
.actualite-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.actualite-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.actualite-card img {
    height: 220px;
    object-fit: cover;
    width: 100%;
}

.actualite-card .card-body {
    padding: 1.5rem;
}

.actualite-date {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.actualite-title {
    color: #0e406e;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

/* ============================================
   ORGANISATION
   ============================================ */
.org-member-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.org-member-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.org-member-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: contain;
    margin: 0 auto 1rem;
    border: 4px solid #0e406e;
}

.org-member-name {
    color: #0e406e;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.org-member-role {
    color: #6c757d;
    font-size: 0.9rem;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-primary-custom {
    color: #0e406e !important;
}

.bg-primary-custom {
    background-color: #0e406e !important;
}

.border-primary-custom {
    border-color: #0e406e !important;
}

.btn-primary-custom {
    background-color: #0e406e;
    border-color: #0e406e;
    color: white;
}

.btn-primary-custom:hover {
    background-color: #0a2e52;
    border-color: #0a2e52;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .mission-number {
        position: static;
        margin-bottom: 1rem;
    }

    .org-member-photo {
        width: 120px;
        height: 120px;
    }

    .contact-info-card {
        margin-bottom: 2rem;
    }

    /* Navbar Brand Mobile Fix */
    .navbar-brand img {
        max-width: 90px;
        height: auto;
    }

    /* Presentation Logo Overlay - Mobile Fix */
    .presentation-logo-overlay {
        width: 80px !important;
        height: 80px !important;
        margin-bottom: 10px !important;
        margin-right: 10px !important;
        bottom: 0;
        right: 0;
    }
}

@media (min-width: 992px) {
    .presentation-logo-overlay {
        width: 100px;
        height: 100px;
        margin-bottom: -20px;
        margin-right: -20px;
    }
}

/* ============================================
   ACCESSIBILITÉ
   ============================================ */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0e406e;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 9999;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}
/* ============================================
   EFFETS HOVER
   ============================================ */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
