/* ============================================================
   RESPONSIVE GLOBAL - L'UNION CITOYENNE 2026
   ============================================================ */

/* --- 1. TABLETTES ET GRANDS MOBILES (Max 1024px) --- */
@media screen and (max-width: 1024px) {
    /* Grilles principales : Passage de 4 à 2 colonnes */
    .actions-grid, 
    .propositions-grid, 
    .program-grid,
    .barometre-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        padding: 0 5% !important;
    }

    /* Hero Section */
    .hero-text h1 { font-size: 4.5rem !important; }
    .hero-overlay { padding-top: 100px !important; }

    /* Carrousel Thomas Gregolin : Ajustement taille */
    .card-stack { width: 90% !important; }

    /* Sections Texte/Image split */
    .about-container, 
    .importance-banner,
    .contact-container {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        gap: 40px !important;
    }

    .about-content, .info-sidebar { order: 2; }
    .about-image, .form-card { order: 1; }
}

/* --- 2. SMARTPHONES STANDARDS (Max 768px) --- */
@media screen and (max-width: 768px) {
    /* Navbar : Simplification pour le pouce */
    .navbar { padding: 15px 5% !important; }
    .nav-container { width: 100% !important; }
    .logo { font-size: 1.3rem !important; }
    
    /* Boutons de navigation compacts */
    .btn-yellow-sm, .btn-pink-sm {
        padding: 8px 12px !important;
        font-size: 0.75rem !important;
        border-radius: 8px !important;
    }

    /* Hero : Slogan sur mobile */
    .hero-text h1 { 
        font-size: 3.2rem !important; 
        line-height: 1 !important;
    }
    .hero-text h1 span { padding: 5px 12px !important; }

    /* Grilles : Passage en colonne unique (100% lisibilité) */
    .actions-grid, 
    .propositions-grid, 
    .program-grid, 
    .barometre-grid,
    .actions-container {
        grid-template-columns: 1fr !important;
    }

    /* Cartes de guides (Carousel mobile en pile) */
    .card-stack {
        width: 280px !important;
        height: 420px !important;
        margin: 0 auto !important;
    }

    .stack-item {
        position: absolute !important;
        transform: translateX(calc(var(--index) * 10px)) 
                   translateY(calc(var(--index) * -8px)) 
                   rotateZ(calc(var(--index) * 1deg)) !important;
    }

    /* Témoignages (Stories) */
    .story-row, .story-row.reverse {
        flex-direction: column !important;
        gap: 25px !important;
    }
    .story-img img { height: 280px !important; }

    /* Footer : Alignement centre */
    .footer-top { 
        flex-direction: column !important; 
        text-align: center !important; 
        gap: 30px !important;
    }
    .footer-links { 
        flex-direction: column !important; 
        gap: 25px !important; 
        align-items: center !important;
    }
    .copyright { 
        flex-direction: column !important; 
        gap: 15px !important; 
        text-align: center !important;
    }

    /* Formulaires */
    .form-grid { grid-template-columns: 1fr !important; }
    .reminder-form-pop { flex-direction: column !important; }
}

/* --- 3. TRÈS PETITS ÉCRANS (Max 480px) --- */
@media screen and (max-width: 480px) {
    /* Réduction drastique des titres pour éviter les coupures */
    h1, .hero-text h1 { font-size: 2.5rem !important; }
    h2, .title-pop { font-size: 2rem !important; }
    
    /* Boutons plein écran pour faciliter le clic */
    .btn-main, .btn-submit, .btn-yellow-main, .btn-recruit {
        width: 100% !important;
        padding: 18px !important;
        font-size: 1.1rem !important;
    }

    /* Ajustement des paddings de section */
    section, .container, .hero-overlay {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* On cache certains éléments purement décoratifs si nécessaire */
    .arrow-container, .bg-circle { display: none !important; }

    /* Compteur Élections */
    .countdown-pop { gap: 8px !important; }
    .time-unit { min-width: 70px !important; padding: 12px !important; }
    .time-unit span { font-size: 1.8rem !important; }
}

/* --- 4. FIXES TECHNIQUES POUR TOUS LES MOBILES --- */
body {
    overflow-x: hidden !important; /* Empêche le scroll horizontal parasite */
    width: 100% !important;
}

img {
    max-width: 100% !important; /* Empêche les images de déborder */
    height: auto !important;
}

/* Désactivation du hover sur tactile pour éviter les doubles clics */
@media (hover: none) {
    .action-card:hover, .mosaic-card:hover, .prop-card:hover {
        transform: none !important;
    }
}

_________

@media (max-width: 768px) {
    /* 1. On cache les boutons "J'agis" et "Rejoindre" sur mobile pour épurer */
    .btn-yellow-sm, .btn-pink-sm {
        display: none !important;
    }

    /* 2. On ajuste la navbar pour qu'il n'y ait plus de bande et que le burger soit seul à droite */
    .navbar {
        background: transparent !important; /* Enlève la bande de fond */
        border-bottom: none !important;
        padding: 20px 5% !important;
        position: absolute; /* Pour flotter sur le hero */
    }

    /* 3. On stylise le burger en "Rose Sarah" bien visible */
    .menu-burger {
        background-color: #ef4444 !important; /* Rose/Rouge vif */
        display: flex !important;
        margin-left: auto; /* Le pousse tout à droite */
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    }

    /* 4. Les cartes prennent tout l'espace (1 seule colonne large) */
    .actions-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        padding: 0 20px !important;
        margin-top: 30px !important;
    }

    .action-card {
        width: 100% !important;
        min-height: auto !important;
        padding: 30px 20px !important;
        border-radius: 25px !important; /* Coins très arrondis comme l'exemple */
    }

    /* 5. Réduction des textes Hero pour mobile */
    .hero-text h1 {
        font-size: 2.8rem !important;
        margin-bottom: 15px !important;
    }

    .hero-overlay {
        padding-top: 100px !important; /* Rapproche le contenu du haut */
    }
}
@media (max-width: 768px) {
    .hero-cta {
        margin: 30px 0 60px 0 !important;
        padding: 0 20px;
    }
    
    .btn-yellow-main {
        width: 100% !important; /* Bouton large pour un clic facile au pouce */
    }
}


@media (max-width: 768px) {
    /* 1. On masque les boutons et la bande de fond pour épurer */
    .btn-yellow-sm, .btn-pink-sm, .navbar::after {
        display: none !important;
    }

    
    .navbar {
        background: transparent !important; /* Pas de fond pour laisser respirer l'image */
        padding: 15px 5% !important; /* On réduit le padding vertical de 20px à 10px */
        border-bottom: none !important;
        position: absolute;
        height: auto !important;
    }

    /* 2. On rend le menu Burger (Rose Sarah) prioritaire */
    .menu-burger {
        background-color: #ef4444 !important; /* Rose vif */
        display: flex !important;
        margin-left: auto;
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    }

    /* 3. Les cartes occupent toute la largeur de l'écran */
    .actions-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        padding: 0 20px !important;
    }

    .action-card {
        width: 100% !important;
        min-height: auto !important;
        padding: 30px 20px !important;
        border-radius: 25px !important; /* Arrondis prononcés */
    }

    /* 4. Ajustement du titre Hero pour qu'il ne déborde pas */
    .hero-text h1 {
        font-size: 2.8rem !important;
    }
}


@media (max-width: 768px) {
    /* 1. On force la grille en 2 colonnes égales */
    .actions-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important; /* Espace réduit entre les cartes */
        padding: 0 15px !important;
        margin-top: 20px !important;
    }

    /* 2. On réduit la taille interne des cartes pour qu'elles soient jolies en petit format */
    .action-card {
        padding: 15px 10px !important; /* Moins de vide interne */
        min-height: 140px !important; /* Hauteur réduite pour le format 2x2 */
        border-radius: 20px !important;
    }

    /* 3. On réduit la taille des icônes et des textes dans les cartes */
    .action-card .icon {
        font-size: 1.8rem !important; /* Icônes plus petites */
        margin-bottom: 8px !important;
    }

    .action-card h3 {
        font-size: 0.85rem !important; /* Titres plus petits pour tenir sur une ligne */
        margin: 5px 0 !important;
    }

    .action-card p {
        font-size: 0.7rem !important; /* Description très compacte */
        line-height: 1.2 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Limite à 2 lignes de texte max */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    /* 1. On cible spécifiquement le conteneur du formulaire newsletter */
    section.newsletter-section .newsletter-inline .input-group {
        display: flex !important;
        flex-direction: column !important; /* Force l'alignement vertical */
        align-items: center !important;
        gap: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 2. On force l'input à prendre toute la largeur disponible */
    section.newsletter-section .newsletter-inline input {
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important; /* Supprime l'espace latéral inutile sur mobile */
        padding: 15px !important;
        text-align: center !important;
    }

    /* 3. On force le bouton à passer en dessous et à s'élargir */
    section.newsletter-section .newsletter-inline .btn-yellow-sm {
        width: 100% !important;
        display: block !important;
        margin-left: 0 !important; /* Supprime le décalage à gauche */
        padding: 18px !important;
        font-size: 1.1rem !important;
    }
}


@media (max-width: 768px) {
    /* Navbar compacte et transparente */
    .navbar { background: transparent !important; padding: 10px 5% !important; border: none !important; }
    .btn-yellow-sm, .btn-pink-sm { display: none !important; } /* Cache les boutons inutiles */

    /* Grille d'actions 2x2 */
    .actions-grid { 
        display: grid !important; 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 12px !important; 
    }
    .action-card { padding: 15px !important; min-height: 140px !important; }

    /* Propositions 1 par 1 pour la lisibilité */
    .propositions-grid { 
        display: flex !important; 
        flex-direction: column !important; 
    }
    .prop-card { width: 100% !important; }

    /* Newsletter verticale */
    .newsletter-inline .input-group { 
        flex-direction: column !important; 
        width: 100% !important; 
    }
}

@media (max-width: 768px) {
    /* 1. On cache l'image pour ne garder que l'essentiel */
    .story-img {
        display: none !important;
    }

    /* 2. On transforme le texte en une carte complète qui occupe tout l'espace */
    .story-row, .story-row.reverse {
        flex-direction: column !important;
        margin-bottom: 25px !important;
        gap: 0 !important;
    }

    .story-text {
        width: 100% !important;
        padding: 30px 20px !important;
        border-radius: 25px !important;
        box-shadow: 8px 8px 0px var(--dark-blue) !important; /* Ombre Pop conservée */
        text-align: center !important; /* On centre pour l'impact mobile */
    }

    /* 3. On ajuste les textes pour une lecture rapide au pouce */
    .story-text h3 {
        font-size: 1.4rem !important;
        margin: 15px 0 !important;
        line-height: 1.3 !important;
    }

    .story-text p {
        font-size: 0.95rem !important;
    }

    /* 4. On harmonise le tag de profil */
    .profile-tag {
        margin: 0 auto 15px auto !important;
        display: inline-block !important;
    }
}

@media (max-width: 768px) {
    /* 1. On centre tout le contenu et on réduit le padding */
    .main-footer {
        padding: 60px 20px 30px !important;
        text-align: center !important;
    }

    /* 2. On empile le logo et les menus verticalement */
    .footer-top {
        flex-direction: column !important;
        align-items: center !important;
        gap: 40px !important;
    }

    /* 3. On simplifie les groupes de liens */
    .footer-links {
        flex-direction: column !important;
        gap: 30px !important;
        width: 100% !important;
    }

    /* 4. On harmonise les titres des menus */
    .link-group h4 {
        margin-bottom: 15px !important;
        font-size: 1rem !important;
    }

    .link-group ul li {
        margin-bottom: 10px !important;
    }

    /* 5. Partie basse : on empile les mentions légales */
    .footer-bottom {
        margin-top: 40px !important;
        padding-top: 20px !important;
    }

    .copyright {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .legal-notice {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
    }
}

@media (max-width: 768px) {
    /* 1. On réduit l'espace global */
    .main-footer {
        padding: 50px 15px 30px !important;
        text-align: center !important;
    }

    /* 2. Transformation des liens en mini boutons cliquables */
    .footer-links {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* 2 colonnes égales */
        gap: 10px !important; /* Petit espace entre les boutons */
        width: 100% !important;
        margin-top: 30px !important;
    }

    /* 3. Style "Mini Bouton" pour chaque lien */
    .link-group ul li a {
        display: block !important;
        background: rgba(255, 255, 255, 0.08); /* Fond subtil */
        padding: 12px 5px !important;
        border-radius: 10px !important;
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        border: 1px solid rgba(255, 255, 255, 0.1);
        transition: background 0.2s;
    }

    /* 4. On cache les titres "NAVIGATION" et "ENGAGEMENT" pour gagner de la place */
    .link-group h4 {
        display: none !important;
    }

    .link-group ul {
        display: contents !important; /* Permet aux <li> de s'aligner dans la grille parente */
    }

    .link-group ul li {
        margin: 0 !important;
    }

    /* 5. Recentrage du logo et slogan */
    .footer-brand {
        max-width: 100% !important;
        margin-bottom: 10px !important;
    }

    .logo-footer {
        font-size: 1.8rem !important;
    }

    .footer-slogan {
        font-size: 0.9rem !important;
        opacity: 0.8;
    }
}


