/* ============================================
   CERPA CONSTRUCTION - VERSION FINALE COMPLÈTE
   Avec description des projets cachée sur mobile
   ============================================ */

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
}

* {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* ============================================
   MOBILE (< 768px)
   ============================================ */

@media (max-width: 767px) {
    
    /* === HEADER === */
    header {
        padding: 10px 0 !important;
    }
    
    .header-container {
        padding: 0 15px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .logo {
        height: 50px !important;
    }
    
    .logo img {
        height: 50px !important;
        width: auto !important;
    }
    
    /* Menu hamburger */
    .menu-toggle {
        display: flex !important;
        font-size: 28px !important;
        color: #FF8C00 !important;
        background: none !important;
        border: none !important;
        padding: 8px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    nav {
        display: none !important;
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        flex-direction: column !important;
        padding: 0 !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
        z-index: 999 !important;
    }
    
    nav.active {
        display: flex !important;
    }
    
    nav a {
        padding: 18px 20px !important;
        font-size: 16px !important;
        border-bottom: 1px solid #f0f0f0 !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    .quote-btn {
        margin: 15px 20px !important;
        width: calc(100% - 40px) !important;
        text-align: center !important;
        padding: 14px 20px !important;
    }
    
    /* === HERO === */
    .hero {
        margin-top: 70px !important;
        min-height: 400px !important;
        height: auto !important;
        padding: 40px 20px !important;
    }
    
    .hero-content {
        padding: 0 !important;
    }
    
    .hero-badge {
        font-size: 10px !important;
        padding: 8px 18px !important;
        margin-bottom: 15px !important;
    }
    
    .hero h1 {
        font-size: 32px !important;
        line-height: 1.2 !important;
        margin-bottom: 18px !important;
    }
    
    .hero p {
        font-size: 15px !important;
        line-height: 1.5 !important;
        margin-bottom: 25px !important;
    }
    
    .hero-buttons {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .hero-buttons a,
    .hero-buttons button,
    .btn-primary,
    .btn-secondary {
        width: 100% !important;
        padding: 14px 28px !important;
        font-size: 15px !important;
    }
    
    .scroll-indicator {
        display: none !important;
    }
    
    /* === TOUTES LES SECTIONS === */
    section,
    .section,
    .before-after,
    .stats,
    .services,
    .about,
    .featured-projects,
    .testimonials,
    .cta-section {
        padding: 40px 15px !important;
    }
    
    .section-container {
        padding: 30px 18px !important;
        border-radius: 16px !important;
    }
    
    .section-title {
        font-size: 24px !important;
        line-height: 1.2 !important;
        margin-bottom: 12px !important;
        word-wrap: break-word !important;
    }
    
    .section-subtitle {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin-bottom: 25px !important;
    }
    
    /* === COMPARISON SLIDER === */
    .comparison-container {
        height: 300px !important;
        border-radius: 12px !important;
    }
    
    /* === STATS === */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
    }
    
    .stat-item {
        padding: 18px !important;
    }
    
    .stat-item h3 {
        font-size: 28px !important;
        margin-bottom: 6px !important;
    }
    
    .stat-item p {
        font-size: 12px !important;
    }
    
    /* === SERVICES === */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }
    
    .service-card {
        padding: 22px !important;
    }
    
    .service-card h3 {
        font-size: 18px !important;
        margin-bottom: 10px !important;
    }
    
    .service-card p {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }
    
    /* === ABOUT === */
    .about-content {
        flex-direction: column !important;
        gap: 25px !important;
    }
    
    .about-text {
        width: 100% !important;
        padding: 0 !important;
    }
    
    .about-text h2 {
        font-size: 28px !important;
        margin-bottom: 15px !important;
    }
    
    .about-text p {
        font-size: 14px !important;
        line-height: 1.6 !important;
        margin-bottom: 12px !important;
    }
    
    .about-image {
        width: 100% !important;
        height: 280px !important;
    }
    
    .about-features {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* === PROJECTS - AVEC DESCRIPTION CACHÉE === */
    .featured-projects {
        padding: 40px 15px !important;
    }
    
    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .project-card {
        height: 200px !important;
        margin-bottom: 15px !important;
        border-radius: 12px !important;
        overflow: hidden !important;
    }
    
    .project-info {
        padding: 15px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }
    
    .project-info h3 {
        font-size: 17px !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: none !important;
        -webkit-hyphens: none !important;
        word-break: keep-all !important;
    }
    
    /* CACHE LA DESCRIPTION SUR MOBILE */
    .project-info p {
        display: none !important;
    }
    
    .project-info a {
        font-size: 13px !important;
        padding: 8px 16px !important;
        margin-top: auto !important;
    }
    
    /* === TESTIMONIALS === */
    .testimonials-grid {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }
    
    .testimonial-card {
        padding: 22px !important;
    }
    
    .testimonial-text {
        font-size: 14px !important;
        line-height: 1.6 !important;
        margin-bottom: 15px !important;
    }
    
    .testimonial-author {
        gap: 12px !important;
    }
    
    .testimonial-author img {
        width: 45px !important;
        height: 45px !important;
    }
    
    .testimonial-author h4 {
        font-size: 15px !important;
    }
    
    .testimonial-author p {
        font-size: 12px !important;
    }
    
    /* === CTA SECTION === */
    .cta-section {
        padding: 40px 15px !important;
        text-align: center !important;
    }
    
    .cta-content {
        padding: 0 !important;
    }
    
    .cta-content h2 {
        font-size: 24px !important;
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
        word-wrap: break-word !important;
    }
    
    .cta-content p {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin-bottom: 25px !important;
    }
    
    .cta-buttons {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .cta-buttons a,
    .cta-buttons button {
        width: 100% !important;
        padding: 14px 28px !important;
        font-size: 15px !important;
    }
    
    /* === FOOTER === */
    footer {
        padding: 35px 15px !important;
    }
    
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 22px !important;
    }
    
    .footer-column {
        text-align: left !important;
    }
    
    .footer-column h3 {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }
    
    .footer-column p,
    .footer-column a,
    .footer-column li {
        font-size: 13px !important;
        line-height: 1.7 !important;
    }
    
    .footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
        gap: 12px !important;
        margin-top: 22px !important;
        padding-top: 18px !important;
    }
    
    .footer-bottom p {
        font-size: 11px !important;
        line-height: 1.6 !important;
        word-wrap: break-word !important;
    }
    
    /* === FORMULAIRES === */
    .contact-form,
    .quote-form,
    form {
        padding: 28px 18px !important;
    }
    
    .form-row {
        flex-direction: column !important;
        gap: 18px !important;
    }
    
    .form-group {
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    
    input,
    textarea,
    select {
        width: 100% !important;
        font-size: 16px !important;
        padding: 13px !important;
        border-radius: 8px !important;
    }
    
    textarea {
        min-height: 110px !important;
    }
    
    button[type="submit"],
    .submit-button {
        width: 100% !important;
        padding: 15px 28px !important;
        font-size: 16px !important;
    }
    
    label {
        font-size: 13px !important;
        margin-bottom: 7px !important;
        display: block !important;
    }
    
    /* === FIX FORMULAIRE QUOTE === */
    
    .radio-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }
    
    .radio-option {
        display: flex !important;
        align-items: flex-start !important;
        gap: 12px !important;
        width: 100% !important;
        padding: 12px !important;
        background: #f8f9fa !important;
        border-radius: 8px !important;
        cursor: pointer !important;
    }
    
    .radio-option input[type="radio"] {
        flex-shrink: 0 !important;
        width: 20px !important;
        height: 20px !important;
        margin: 2px 0 0 0 !important;
        cursor: pointer !important;
    }
    
    .radio-option label {
        flex: 1 !important;
        font-size: 15px !important;
        line-height: 1.5 !important;
        color: #2c3e50 !important;
        cursor: pointer !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
        max-width: 100% !important;
    }
    
    .form-section {
        padding: 0 !important;
        margin-bottom: 25px !important;
    }
    
    .section-header {
        font-size: 16px !important;
        font-weight: 600 !important;
        margin-bottom: 15px !important;
        color: #2c3e50 !important;
        word-wrap: break-word !important;
    }
    
    select {
        appearance: none !important;
        -webkit-appearance: none !important;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
        background-repeat: no-repeat !important;
        background-position: right 12px center !important;
        background-size: 20px !important;
    }
    
    .submit-btn,
    button[type="submit"] {
        width: 100% !important;
        padding: 16px !important;
        font-size: 17px !important;
        font-weight: 600 !important;
        background: var(--primary-orange, #FF8C00) !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        margin-top: 20px !important;
    }
    
    .quote-form-container,
    .form-container {
        padding: 20px 15px !important;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .quote-hero,
    .page-hero {
        min-height: 350px !important;
        padding: 80px 20px 40px !important;
    }
    
    .quote-hero h1,
    .page-hero h1 {
        font-size: 32px !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
    }
    
    .quote-hero p,
    .page-hero p {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }
    
    /* === IMAGES === */
    img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* === TEXT OVERFLOW === */
    h1, h2, h3, h4, h5, h6, p, span, div {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: none !important;
        -webkit-hyphens: none !important;
    }
    
    /* === BUTTONS === */
    button,
    .button,
    .btn,
    a.button {
        min-height: 44px !important;
        min-width: 44px !important;
    }
}

/* ============================================
   TRÈS PETITS ÉCRANS (< 375px)
   ============================================ */

@media (max-width: 374px) {
    .hero {
        min-height: 380px !important;
    }
    
    .hero h1 {
        font-size: 26px !important;
    }
    
    .section-title {
        font-size: 22px !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .logo {
        height: 45px !important;
    }
    
    .logo img {
        height: 45px !important;
    }
    
    .project-card {
        height: 180px !important;
    }
    
    .project-info h3 {
        font-size: 16px !important;
    }
    
    .footer-bottom p {
        font-size: 10px !important;
    }
}

/* ============================================
   PAYSAGE MOBILE
   ============================================ */

@media (max-width: 812px) and (orientation: landscape) {
    .hero {
        min-height: 350px !important;
        padding: 50px 20px 35px !important;
    }
    
    .hero h1 {
        font-size: 28px !important;
    }
    
    section {
        padding: 35px 15px !important;
    }
    
    .project-card {
        height: 180px !important;
    }
}

/* ============================================
   TABLETTE (768px - 1023px)
   ============================================ */

@media (min-width: 768px) and (max-width: 1023px) {
    .header-container {
        padding: 0 35px !important;
    }
    
    .hero {
        padding: 70px 35px !important;
        min-height: 500px !important;
    }
    
    section {
        padding: 55px 35px !important;
    }
    
    .services-grid,
    .projects-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .project-card {
        height: 250px !important;
    }
}

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

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #FF8C00 !important;
    outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

@media (hover: none) and (pointer: coarse) {
    .service-card:hover,
    .project-card:hover,
    button:hover,
    a:hover {
        transform: none !important;
    }
}
/* REMPLACER LA FIN DU CSS PAR CE CODE (après la ligne 696) */

@media (max-width: 767px) {
    
    /* === CACHE LES DESCRIPTIONS === */
    .project-info p {
        display: none !important;
    }
    
    /* === CACHE LES MINIATURES DES CARTES DE PROJETS === */
    /* Seulement les vraies balises <img> dans les cartes */
    .featured-projects .project-card img,
    .projects-grid .project-card img {
        display: none !important;
    }
    
    /* NE TOUCHE PAS au slider - il utilise background-image */
}

/* DESKTOP */
@media (min-width: 768px) {
    /* Cache miniatures */
    .featured-projects .project-card img,
    .projects-grid .project-card img {
        display: none !important;
    }
    
    /* Cache descriptions */
    .project-info p {
        display: none !important;
    }
}
