/* ======================================== */
/* FICHIER MOBILE.CSS COMPLET               */
/* Styles spécifiques pour mobile (max-width: 768px) */
/* Dernière mise à jour : 7 mai 2026        */
/* ======================================== */

/* ========== STYLES DE BASE MOBILE ========== */
@media (max-width: 768px) {
    
    /* Annulation des effets de survol sur mobile */
    .modern-card:hover {
        transform: none !important;
    }
    
    .modern-card:hover::before {
        transform: scaleX(0) !important;
    }
    
    .nav-link:hover::after,
    .nav-link.active::after {
        width: 0 !important;
    }
    
    .nav-link:hover {
        transform: none !important;
    }
    
    .btn-glass:hover::before,
    .btn-primary-gradient:hover::before,
    .btn-outline-primary-custom:hover::before {
        width: 0 !important;
    }
    
    .btn-glass:hover,
    .btn-primary-gradient:hover,
    .btn-outline-primary-custom:hover {
        transform: none !important;
    }
    
    .social-sidebar-modern a:hover {
        transform: scale(1.05) !important;
    }
    
    /* Ajustement des polices */
    body {
        font-size: 14px;
    }
    
    h1.display-4 {
        font-size: 1.8rem !important;
    }
    
    .lead {
        font-size: 0.9rem !important;
    }
    
    /* Cartes modernes sur mobile */
    .modern-card {
        padding: 20px 15px !important;
        margin-bottom: 20px !important;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .card-icon i {
        font-size: 1.5rem;
    }
    
    /* Ajustement des boutons */
    .hero-buttons .btn-glass,
    .hero-buttons .btn-primary-gradient {
        padding: 8px 16px !important;
        font-size: 0.75rem !important;
    }
    
    /* Page header */
    .page-header {
        padding: 80px 0 30px !important;
    }
    
    .page-header h1 {
        font-size: 1.5rem !important;
    }
    
    /* Section hero */
    .hero-section {
        min-height: auto !important;
        padding: 20px 0 30px 0 !important;
    }
    
    .hero-text-wrapper {
        padding: 20px 15px !important;
        text-align: center;
    }
    
    .hero-text-wrapper h1 {
        font-size: 1.3rem !important;
        margin-bottom: 15px !important;
    }
    
    .hero-text-wrapper p {
        font-size: 0.85rem !important;
        margin-bottom: 20px !important;
    }
    
    .hero-buttons {
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    /* Quick activities section */
    .quick-activities-section {
        margin-top: 0 !important;
        padding: 10px 0 !important;
    }
    
    /* Footer */
    .footer-modern {
        padding: 30px 0 15px !important;
    }
    
    .footer-modern .row {
        display: flex;
        flex-direction: column;
    }
    
    .footer-modern .col-md-4 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        margin-bottom: 25px;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .footer-logo {
        height: 35px;
    }
    
    /* Social sidebar */
    .social-sidebar-modern {
        right: 10px !important;
        bottom: 70px !important;
        gap: 8px !important;
    }
    
    [dir="rtl"] .social-sidebar-modern {
        right: auto !important;
        left: 10px !important;
    }
    
    .social-sidebar-modern a {
        width: 35px !important;
        height: 35px !important;
    }
    
    /* Back to top button */
    .back-to-top-modern {
        width: 40px;
        height: 40px;
        bottom: 15px;
        left: 15px;
    }
    
    [dir="rtl"] .back-to-top-modern {
        left: auto;
        right: 15px;
    }
    
    /* Formulaire de contact */
    .form-control {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    /* Map container */
    .map-container iframe {
        height: 200px;
    }
    
    /* Membre photos */
    .member-photo {
        width: 100px;
        height: 100px;
    }
    
    /* Ajustement des grids */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .col-md-4, .col-md-6, .col-lg-6 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    /* Espacement général */
    .page-content {
        padding: 30px 0;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* ========== STYLES POUR TRÈS PETITS ÉCRANS (MOINS DE 480PX) ========== */
@media (max-width: 480px) {
    body {
        padding-top: 75px !important;
    }
    
    [dir="ltr"] .navbar-brand,
    [dir="rtl"] .navbar-brand {
        max-width: 48% !important;
        font-size: 0.55rem !important;
    }
    
    .mobile-lang-btn {
        padding: 3px 7px;
        font-size: 0.6rem;
    }
    
    .hero-section {
        padding: 15px 0 25px 0 !important;
    }
    
    .hero-text-wrapper h1 {
        font-size: 1.2rem !important;
    }
    
    .hero-text-wrapper p {
        font-size: 0.75rem !important;
    }
    
    .hero-buttons .btn-glass,
    .hero-buttons .btn-primary-gradient {
        padding: 6px 12px !important;
        font-size: 0.7rem !important;
    }
    
    .page-header h1 {
        font-size: 1.3rem !important;
    }
    
    .section-title {
        font-size: 1.2rem !important;
    }
    
    .modern-card h3 {
        font-size: 1.1rem;
    }
    
    .modern-card h4 {
        font-size: 1rem;
    }
    
    .modal-title {
        font-size: 1rem !important;
    }
    
    .modal-summary {
        font-size: 0.75rem !important;
    }
}

/* ========== STYLES POUR ANNONCE BAR ========== */
@media (max-width: 768px) {
    .announcement-bar {
        margin-top: 0 !important;
        position: relative !important;
        top: 0 !important;
        padding: 8px 0 !important;
        min-height: 50px !important;
        display: block !important;
        width: 100% !important;
    }
    
    .announcement-content {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        padding: 0 10px !important;
        flex-wrap: nowrap !important;
    }
    
    .announcement-badge {
        padding: 4px 10px !important;
        font-size: 0.7rem !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    
    .announcement-text {
        flex: 1 !important;
        overflow: hidden !important;
        max-width: none !important;
    }
    
    .marquee-wrapper {
        overflow: hidden !important;
        white-space: nowrap !important;
        width: 100% !important;
    }
    
    .marquee-track {
        display: inline-block !important;
        white-space: nowrap !important;
        animation: marqueeMobile var(--scroll-speed) linear infinite !important;
    }
    
    @keyframes marqueeMobile {
        0% { transform: translateX(0); }
        100% { transform: translateX(-50%); }
    }
    
    [dir="rtl"] .marquee-track {
        animation: marqueeMobileRTL var(--scroll-speed) linear infinite !important;
    }
    
    @keyframes marqueeMobileRTL {
        0% { transform: translateX(0); }
        100% { transform: translateX(50%); }
    }
    
    .marquee-item {
        display: inline-block !important;
        padding-right: 50px !important;
        white-space: nowrap !important;
        font-size: 0.8rem !important;
        line-height: 1.4;
    }
    
    .marquee-wrapper:hover .marquee-track {
        animation-play-state: paused !important;
    }
}

/* ======================================== */
/* CORRECTION NEWSLETTER - MODE PORTRAIT    */
/* Formulaire dans publications.html        */
/* ======================================== */

@media (max-width: 768px) and (orientation: portrait) {
    
    /* Cibler TRÈS spécifiquement le formulaire dans publications.html */
    .modern-card .row.justify-content-center,
    .modern-card form.row.justify-content-center {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .modern-card .col-md-6 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Détruire le comportement inline du input-group */
    .modern-card .input-group {
        display: block !important;
        width: 100% !important;
    }
    
    /* Forcer l'input et le bouton à être l'un au-dessus de l'autre */
    .modern-card .input-group .form-control,
    .modern-card .input-group .btn-primary-gradient {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: 50px !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    
    /* Espace entre l'input et le bouton */
    .modern-card .input-group .btn-primary-gradient {
        margin-top: 12px !important;
    }
    
    /* Titre de la newsletter centré */
    .modern-card h4 {
        font-size: 1.2rem !important;
        text-align: center !important;
    }
    
    /* Correction RTL (arabe) */
    [dir="rtl"] .modern-card .input-group .form-control,
    [dir="rtl"] .modern-card .input-group .btn-primary-gradient {
        text-align: center !important;
    }
}

/* Newsletter - mode paysage (garder côte à côte) */
@media (max-width: 768px) and (orientation: landscape) {
    .modern-card .col-md-6 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding: 0 !important;
    }
    
    .modern-card .input-group {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        width: 100% !important;
    }
    
    .modern-card .input-group .form-control {
        flex: 1 1 auto !important;
        width: auto !important;
        border-radius: 50px 0 0 50px !important;
    }
    
    .modern-card .input-group .btn-primary-gradient {
        width: auto !important;
        border-radius: 0 50px 50px 0 !important;
        white-space: nowrap !important;
        margin-top: 0 !important;
    }
}

/* Newsletter - pour très petits écrans */
@media (max-width: 480px) and (orientation: portrait) {
    .modern-card .input-group .form-control,
    .modern-card .input-group .btn-primary-gradient {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }
    
    .modern-card h4 {
        font-size: 1rem !important;
    }
}

/* ========== MODAL STYLES MOBILE ========== */
@media (max-width: 768px) {
    .activity-modal.active {
        padding-top: 10px !important;
    }
    
    .modal-container {
        width: 95% !important;
        max-height: 85vh !important;
    }
    
    .modal-body {
        max-height: calc(85vh - 70px) !important;
    }
    
    .modal-title {
        font-size: 1.1rem !important;
    }
    
    .modal-content-section {
        padding: 16px !important;
    }
    
    .modal-details {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .detail-card p {
        font-size: 0.75rem !important;
    }
    
    .modal-summary {
        font-size: 0.8rem !important;
    }
    
    .modal-media-section iframe,
    .modal-media-section video {
        height: 200px !important;
    }
    
    .media-image img {
        max-height: 200px !important;
    }
    
    .modal-badge {
        font-size: 0.7rem !important;
        padding: 4px 10px !important;
    }
    
    .modal-speaker {
        font-size: 0.7rem !important;
        padding: 4px 12px !important;
    }
    
    .detail-card {
        padding: 10px 12px !important;
    }
    
    .detail-card i {
        font-size: 0.9rem !important;
    }
    
    .detail-card strong {
        font-size: 0.6rem !important;
    }
}

/* ========== ACTIVITIES SECTION MOBILE ========== */
@media (max-width: 768px) {
    .quick-activities-section {
        padding: 20px 0 !important;
    }
    
    .section-title {
        font-size: 1.4rem !important;
    }
    
    .column-header {
        padding: 15px !important;
    }
    
    .column-subtitle {
        font-size: 0.85rem !important;
    }
    
    .activity-list-wrapper {
        max-height: 500px !important;
    }
    
    .activity-list {
        padding: 12px !important;
    }
    
    .activity-item {
        padding: 12px !important;
        gap: 12px !important;
    }
    
    .activity-bullet {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.7rem !important;
    }
    
    .activity-title {
        font-size: 0.85rem !important;
    }
    
    .activity-meta {
        font-size: 0.65rem !important;
        gap: 10px !important;
    }
}

/* ========== PUBLICATIONS CARDS MOBILE ========== */
@media (max-width: 768px) {
    .publications-grid .col-md-4 {
        margin-bottom: 20px;
    }
}

/* ========== MEMBERS CARDS MOBILE ========== */
@media (max-width: 768px) {
    .member-card {
        text-align: center;
        margin-bottom: 25px;
    }
    
    .member-photo {
        margin-bottom: 15px;
    }
    
    .member-card h4 {
        font-size: 1.1rem;
    }
    
    .member-card p {
        font-size: 0.85rem;
    }
}

/* ========== CONTACT PAGE MOBILE ========== */
@media (max-width: 768px) {
    .contact-info-section .modern-card {
        margin-top: 20px;
    }
    
    .map-container iframe {
        height: 200px;
    }
}

/* ========== ALERTES MOBILE ========== */
@media (max-width: 768px) {
    .alert-success {
        padding: 12px 15px;
        font-size: 0.85rem;
    }
}

/* ========== UTILITAIRES MOBILE ========== */
@media (max-width: 768px) {
    .text-center-mobile {
        text-align: center !important;
    }
    
    .mt-3-mobile {
        margin-top: 15px !important;
    }
    
    .mb-3-mobile {
        margin-bottom: 15px !important;
    }
    
    .d-none-mobile {
        display: none !important;
    }
}
/* FORCE L'ALIGNEMENT EN MODE PAYSAGE */
@media (max-width: 768px) and (orientation: landscape) {
    .announcement-bar {
        margin-top: 0 !important;
        position: relative !important;
        top: 0 !important;
    }
}