/* welcome-mobile.css — à placer dans public/css/ */

body { overflow-x: hidden; }

/* ---------- Mobile (< 768px) ---------- */
@media (max-width: 767.98px) {

    /* ===== Carrousel : afficher titre + boutons sur mobile ===== */
    .slider {
        height: 62vh;
        min-height: 340px;
        object-fit: cover;
    }
    .carousel-item { position: relative; }
    .carousel-item .overlay {
        position: absolute;
        inset: 0;
    }

    /* Le bloc texte remplit toute la slide et centre son contenu
       (#mainSlider = spécificité forte pour écraser le thème) */
    #mainSlider .carousel-caption,
    #mainSlider .carousel-caption.d-none.d-md-block {
        position: absolute !important;
        inset: 0 !important;
        width: auto !important;
        margin: 0 !important;
        padding: 1.5rem 3rem !important;   /* marge pour les flèches */
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center !important;
        transform: none !important;
        animation: none !important;
        z-index: 2;
    }
    #mainSlider .carousel-caption h4 {
        width: 100%;
        margin: 0 0 .6rem;
        font-size: 1.2rem;
        line-height: 1.35;
        text-align: center;
        overflow-wrap: anywhere;
    }
    #mainSlider .carousel-caption p {
        width: 100%;
        margin: 0 0 .5rem;
        font-size: .9rem;
        text-align: center;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    #mainSlider .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: .6rem;
        width: 100%;
        margin: .8rem auto 0;
    }
    #mainSlider .hero-buttons a,
    #mainSlider .btn-connexion,
    #mainSlider .btn-inscription {
        display: block;
        width: 100%;
        max-width: 300px;
        min-height: 46px;
        line-height: 26px;
        margin: 0 !important;
        padding: .6rem 1rem;
        text-align: center;
    }
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 1.4rem;
        height: 1.4rem;
    }

    /* ===== Titres ===== */
    .heading_container h2,
    .step-container h2,
    .contact-section h2 {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }
    .heading_container p,
    .futuristic-subtitle {
        font-size: .95rem !important;
        padding: 0 .5rem;
    }

    /* ===== Étapes de dépôt ===== */
    .step-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .step-row .step {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
        padding: 12px 14px;
    }
    .step-row .step-text { font-size: .95rem; }

    /* ===== Processus de traitement ===== */
    .box { padding: 1rem !important; }
    .box h5 { font-size: 1.05rem; }
    .box p { font-size: .92rem; }
    .box .step-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 16px;
    }

    /* ===== Bloc "Important" ===== */
    .futuristic-info-box {
        width: 92%;
        padding: 20px 16px;
    }
    .futuristic-title {
        font-size: 1.2rem;
        animation: none !important;   /* le translateX ±20px déborde de l'écran */
    }
    .header { gap: 12px; }
    .header svg { width: 36px; height: 36px; }
    .futuristic-text { font-size: 1rem; }

    /* ===== Cartes de procédures ===== */
    .proc-actions {
        display: flex;
        flex-direction: column;
        gap: .5rem;
        padding: 0 1rem;
    }
    .proc-actions .btn {
        width: 100%;
        min-height: 44px;
        margin: 0 !important;
    }
    .card-proc { padding: 0 1rem; text-align: center; }
    .card-proc .proc-title { font-size: 1rem; }

    /* ===== Modals ===== */
    .modal-body { padding: 1rem !important; }
    .modal-title { font-size: 1rem; }
    .modal-footer .btn { min-height: 44px; }

    /* ===== Contact ===== */
    .contact-section { padding: 40px 16px; }
    .contact-container { gap: 24px; }
    .contact-image { min-width: 0; }
    .contact-image img { max-height: 220px; }
    .contact-form { padding: 24px 16px; min-width: 0; }
    .contact-form input,
    .contact-form textarea {
        font-size: 16px;              /* évite le zoom auto d'iOS */
        padding: 12px;
    }
    .contact-form button { min-height: 48px; }

    .contact-phones {
        flex-direction: column;
        align-items: stretch;
        gap: 10px !important;
        font-size: 1rem;
    }
    .contact-phones .phone-link {
        display: block;
        text-align: center;
        padding: 12px;
        border: 1px solid currentColor;
        border-radius: 10px;
    }
    .social-icon { width: 38px; height: 38px; line-height: 38px; font-size: 16px; }

    /* ===== Espaces <br><br><br> trop grands ===== */
    br + br + br { display: none; }
}

/* ---------- Écrans tactiles : pas d'effet hover/tilt ---------- */
@media (hover: none) {
    .box:hover,
    .contact-form:hover,
    .futuristic-info-box:hover {
        transform: none;
        box-shadow: none;
    }
}

/* ---------- Accessibilité ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}