/* public/css/app.css — Styles personnalisés ADSRDF / Dondou Digital */

/* ===================================================================
   PALETTE INSPIRÉE DU LOGO ADSRDF
   - Bleu principal  : #32b0ec  (texte "ADSRDF" du logo)
   - Bleu foncé      : #1a8bbf  (hover, ombres)
   - Brun arbre      : #8B6F47  (tronc de l'arbre du logo)
   - Blanc           : #ffffff  (fond logo)
   - Gris texte      : #5a6a7a  (sous-titres)
=================================================================== */

:root {
    /* Couleur principale — bleu ADSRDF */
    --bs-primary:            #32b0ec;
    --bs-primary-rgb:        50, 176, 236;
    --bs-primary-bg-subtle:  #d6f0fb;

    /* Couleur secondaire — brun arbre */
    --dondou-brown:          #8B6F47;
    --dondou-brown-light:    #c9a87a;

    /* Warning/accent — orange chaleureux */
    --bs-warning:            #f0a500;
    --bs-warning-rgb:        240, 165, 0;

    --bs-body-font-family:   'Segoe UI', system-ui, -apple-system, sans-serif;
    --bs-border-radius:      0.5rem;
    --bs-border-radius-lg:   0.75rem;
}

/* ===== NAVBAR ===== */
.navbar.bg-primary {
    background: #ffffff !important;
    border-bottom: 1px solid #e8f4fb;
    box-shadow: 0 2px 8px rgba(50, 176, 236, 0.12) !important;
}

.navbar-brand {
    font-size:      1rem;
    letter-spacing: 0.01em;
    padding-top:    0.2rem;
    padding-bottom: 0.2rem;
}

.navbar-brand img {
    /* Logo sur fond transparent dans la navbar blanche */
    background:    transparent;
    border-radius: 0;
    padding:       0;
}

/* Liens de navigation — bleu ADSRDF sur fond blanc */
.navbar-nav .nav-link {
    color: #2a2a2a !important;
    font-weight: 500;
    transition: color 0.15s ease;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #32b0ec !important;
}
.navbar-nav .nav-link.active {
    border-bottom: 2px solid #32b0ec;
}

/* Toggler sur fond blanc */
.navbar-toggler {
    border-color: rgba(50, 176, 236, 0.4);
}
.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='rgba%2850%2C176%2C236%2C0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown menu */
.navbar-nav .dropdown-menu {
    border: 1px solid rgba(50, 176, 236, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Switch de langue FR / Pulaar */
.lang-switch-btn {
    background: #ffffff;
    color: #32b0ec;
    border: 1px solid #32b0ec;
}
.lang-switch-btn:hover {
    background: rgba(50, 176, 236, 0.1);
    color: #32b0ec;
}
.lang-switch-btn.active {
    background: #32b0ec;
    color: #ffffff;
    border-color: #32b0ec;
}
.navbar-nav .dropdown-item:hover {
    background-color: #e8f4fb;
    color: #32b0ec;
}

/* ===== BOUTONS ===== */
.btn-primary {
    background-color: var(--bs-primary);
    border-color:     var(--bs-primary);
    color:            #fff;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: #1a8bbf;
    border-color:     #1a8bbf;
    color:            #fff;
}
.btn-outline-primary {
    color:        var(--bs-primary);
    border-color: var(--bs-primary);
}
.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color:     var(--bs-primary);
    color:            #fff;
}

/* ===== FORMULAIRES ===== */
.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow:   0 0 0 0.25rem rgba(50, 176, 236, 0.2);
}

/* ===== CARTES ===== */
.card {
    border-radius: var(--bs-border-radius-lg);
    transition:    box-shadow 0.2s ease;
}
.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(50, 176, 236, 0.15) !important;
    transform:  translateY(-2px);
    transition: all 0.2s ease;
}

/* ===== HERO HOME ===== */
.hero-section {
    background:  linear-gradient(135deg, #1a8bbf 0%, #0d6a99 60%, #8B6F47 100%);
    min-height:  60vh;
    display:     flex;
    align-items: center;
}

/* ===== HERO PAGES INTÉRIEURES ===== */
.page-hero {
    position:    relative;
    min-height:  220px;
    display:     flex;
    align-items: flex-end;
    overflow:    hidden;
    padding:     2.5rem 0 2rem;
}

/* Image de fond + overlay sombre-bleu pour lisibilité du texte */
.page-hero::before {
    content:    '';
    position:   absolute;
    inset:      0;
    background: linear-gradient(
        135deg,
        rgba(13, 106, 153, 0.65) 0%,
        rgba(26, 42, 58, 0.25) 100%
    );
    z-index:    1;
}

.page-hero-bg {
    position:           absolute;
    inset:              0;
    background-size:    cover;
    background-position: center;
    background-repeat:  no-repeat;
    z-index:            0;
    /* --parallax-y est mis à jour en JS (voir app.js) au défilement ;
       0px par défaut si JS est désactivé. */
    transform:          translateY(var(--parallax-y, 0px)) scale(1.03);
    transition:         transform 6s ease;
}

.page-hero:hover .page-hero-bg {
    transform: translateY(var(--parallax-y, 0px)) scale(1.06); /* effet Ken Burns subtil au hover */
}

.page-hero-content {
    position: relative;
    z-index:  2;
    width:    100%;
}

.page-hero h1 {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.page-hero .page-hero-breadcrumb{
    font-size: .65em;
}
.page-hero .page-hero-breadcrumb .breadcrumb-item,
.page-hero .page-hero-breadcrumb .breadcrumb-item a,
.page-hero .page-hero-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}
.page-hero .page-hero-breadcrumb .breadcrumb-item a:hover {
    color: #ffffff;
}
.page-hero .page-hero-breadcrumb .breadcrumb-item.active {
    color: #ffffff;
}

/* Image de fond par défaut (fallback sans image) */
.page-hero.no-image::before {
    background: linear-gradient(
        135deg,
        #1a8bbf 0%,
        #0d4d7a 60%,
        #8B6F47 100%
    );
}

/* ===== BARRES DE PROGRESSION ===== */
.progress {
    border-radius:    1rem;
    background-color: #e3f5fd;
}
.progress-bar {
    border-radius:    1rem;
    transition:       width 0.6s ease;
    background-color: var(--bs-primary);
}

/* ===== ANNUAIRE MEMBRES ===== */
.member-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.member-card:hover {
    transform:  translateY(-3px);
    box-shadow: 0 0.5rem 1.5rem rgba(50, 176, 236, 0.15) !important;
}
.member-avatar {
    width:         64px;
    height:        64px;
    object-fit:    cover;
    border-radius: 50%;
}
.member-avatar-placeholder {
    width:            64px;
    height:           64px;
    border-radius:    50%;
    background:       linear-gradient(135deg, #32b0ec, #1a8bbf);
    display:          flex;
    align-items:      center;
    justify-content:  center;
    color:            #fff;
    font-weight:      bold;
    font-size:        1.2rem;
}

/* ===== BADGES COTISATION ===== */
.badge-cotisation-ok {
    background-color: #32b0ec;
    color:            #fff;
}
.badge-cotisation-retard {
    background-color: #dc3545;
    color:            #fff;
}

/* ===== SECTION STATS ACCUEIL ===== */
.stat-card-primary   { background: linear-gradient(135deg, #32b0ec, #1a8bbf); color: #fff; }
.stat-card-secondary { background: linear-gradient(135deg, #8B6F47, #6b5535); color: #fff; }

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(180deg, #1a2a3a 0%, #0d1a26 100%) !important;
}

/* Liens du footer — blancs au repos, bleu ADSRDF au survol */
.footer-link {
    color:           #ffffff;
    text-decoration: none;
    transition:      color 0.15s ease;
}
.footer-link:hover {
    color:           #32b0ec;
    text-decoration: none;
}

/* text-muted dans le footer — blanc au lieu du gris Bootstrap */
footer .text-muted {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* ===== BLOCS DE CONTENU ÉDITABLES ===== */
.page-content-block {
    border-top: 1px solid rgba(50, 176, 236, 0.1);
}
.page-content-body {
    line-height: 1.8;
    color: #444;
}
.page-content-body h1,
.page-content-body h2,
.page-content-body h3 {
    color: #32b0ec;
    margin-top: 1.2rem;
}
.page-content-body a {
    color: #32b0ec;
}
.page-content-body ul,
.page-content-body ol {
    padding-left: 1.5rem;
}
.page-content-body blockquote {
    border-left: 4px solid #32b0ec;
    padding-left: 1rem;
    color: #6c757d;
    font-style: italic;
}

/* ===== ACCESSIBILITÉ ===== */
.btn:focus-visible,
a:focus-visible {
    outline:        3px solid var(--bs-warning);
    outline-offset: 2px;
}

/* ===== TEXTE COULEURS ADSRDF ===== */
.text-primary { color: #32b0ec !important; }
.text-dondou-brown { color: var(--dondou-brown) !important; }

/* ===================================================================
   ANIMATIONS D'APPARITION AU DÉFILEMENT (reveal-on-scroll)
   - Activées uniquement une fois JS confirmé (voir .js sur <html>,
     basculé dans base.html.twig) : sans JS, le contenu reste visible.
   - app.js ajoute .is-revealed via IntersectionObserver.
   - Uniquement opacity + transform (translateY) pour rester GPU-friendly.
=================================================================== */
.js .reveal-on-scroll {
    opacity:    0;
    transform:  translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--reveal-delay, 0s);
}
.js .reveal-on-scroll.is-revealed {
    opacity:   1;
    transform: translateY(0);
}

/* Décalage en cascade pour les groupes de cartes (stat, projet, feature) */
.reveal-group > *:nth-child(1) { --reveal-delay: 0s; }
.reveal-group > *:nth-child(2) { --reveal-delay: 0.08s; }
.reveal-group > *:nth-child(3) { --reveal-delay: 0.16s; }
.reveal-group > *:nth-child(4) { --reveal-delay: 0.24s; }

.projectTitle{
    height:50px; 
    overflow-y:hidden;
}

/* ===== PRÉFÉRENCE UTILISATEUR : MOUVEMENT RÉDUIT ===== */
@media (prefers-reduced-motion: reduce) {
    .js .reveal-on-scroll {
        opacity:    1;
        transform:  none;
        transition: none;
    }
    .page-hero-bg {
        transition: none;
        transform:  none !important;
    }
    .page-hero:hover .page-hero-bg {
        transform: none !important;
    }
    .member-card,
    .hover-shadow,
    .card {
        transition: none;
    }
}

/* ===== MOBILE FIRST — CORRECTIONS RESPONSIVE ===== */

/* --- XS : < 576px --- */
@media (max-width: 575.98px) {

    /* Navbar */
    .navbar-brand img {
        height: 34px !important;
        max-width: 140px !important;
    }
    /* Boutons CTA navbar empilés verticalement dans le menu déroulé */
    .navbar-collapse .btn {
        display: block;
        width: 100%;
        margin: 4px 0 0 0 !important;
    }
    .navbar-collapse .nav-item.ms-lg-2,
    .navbar-collapse .nav-item.ms-lg-1 {
        margin-left: 0 !important;
    }

    /* Hero home */
    .hero-section {
        min-height: auto;
        padding: 2.5rem 0;
    }
    .hero-section .display-5 {
        font-size: 1.75rem;
    }
    .hero-section .lead {
        font-size: 1rem;
    }
    .hero-section .btn-lg {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Hero pages intérieures */
    .page-hero {
        min-height: 160px;
        padding: 1.5rem 0 1.25rem;
    }
    .page-hero h1 {
        font-size: 1.4rem !important;
    }

    /* Cartes */
    .card-body {
        padding: 1rem;
    }

    /* Tableaux : toujours scrollables */
    .table-responsive {
        font-size: 0.82rem;
    }

    /* Dashboard — stats */
    .fs-4.fw-bold {
        font-size: 1.1rem !important;
    }

    /* Contact : colonnes infos en pleine largeur */
    .contact-info-card {
        margin-bottom: 0.75rem;
    }

    /* Footer */
    footer .d-flex.gap-2 {
        flex-wrap: wrap;
    }
    footer .btn {
        flex: 1 1 auto;
        text-align: center;
    }
    footer .fw-bold.text-white {
        margin-top: 1.5rem;
    }

    /* Donation — montants suggérés */
    #suggested-amounts .btn {
        flex: 1 1 calc(33% - 0.5rem);
    }
}

/* --- SM : 576px – 767px --- */
@media (min-width: 576px) and (max-width: 767.98px) {

    .navbar-brand img {
        height: 38px !important;
        max-width: 160px !important;
    }
    .hero-section .display-5 {
        font-size: 2rem;
    }
    .page-hero {
        min-height: 180px;
        padding: 2rem 0 1.5rem;
    }
    .page-hero h1 {
        font-size: 1.6rem !important;
    }
    .navbar-collapse .btn {
        display: block;
        width: 100%;
        margin: 4px 0 0 0 !important;
    }
}

/* --- MD : 768px – 991px --- */
@media (min-width: 768px) and (max-width: 991.98px) {

    .navbar-brand img {
        height: 40px !important;
        max-width: 170px !important;
    }
    /* Nav active border-bottom peut couper sur MD */
    .navbar-nav .nav-link.active {
        border-bottom: none;
        color: #32b0ec !important;
        font-weight: 700;
    }
}

/* ===== Bandeau de consentement cookies (Google Analytics) ===== */
.cookie-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    background: #1c2b33;
    color: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}
.cookie-consent-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
}
.cookie-consent-text {
    flex: 1 1 420px;
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}
.cookie-consent-actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
    margin-left: auto;
}
.cookie-consent-actions .btn-outline-secondary {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}
.cookie-consent-actions .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #fff;
}
.cookie-consent-accept-btn {
    background: #32b0ec;
    border: 1px solid #32b0ec;
    color: #fff;
    font-weight: 600;
}
.cookie-consent-accept-btn:hover {
    background: #1a8bbf;
    border-color: #1a8bbf;
    color: #fff;
}
@media (max-width: 576px) {
    .cookie-consent-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .cookie-consent-actions {
        margin-left: 0;
        justify-content: stretch;
    }
    .cookie-consent-actions .btn {
        flex: 1;
    }
}
