/* Mobile-First Styles */
:root {
    --header-height: 60px;
    --bottom-nav-height: 60px;
    --primary-color: #000000;
    --secondary-color: #333333;
    --background-light: #ffffff;
    --text-color: #1a1a1a;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

/* Base Mobile Styles */
html {
    font-size: 16px; /* Base font size for mobile */
}

body {
    padding-bottom: var(--bottom-nav-height); /* Space for bottom navigation */
}

/* Mobile Header */
header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.98);
}

.navbar {
    padding: 0.5rem 1rem;
}

.navbar-brand {
    font-size: 1.2rem;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 10px 0;
}

.mobile-nav-list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    text-align: center;
    flex: 1;
}

.mobile-nav-link {
    color: #333;
    text-decoration: none;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px;
}

.mobile-nav-link i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.mobile-nav-link.active {
    color: #333;
}

/* Mobile Hero Section */
.hero-section {
    padding-top: calc(var(--header-height) + 1rem);
    text-align: center;
}

.hero-section h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-section .lead {
    font-size: 1.1rem;
}

/* Mobile Cards */
.card {
    margin-bottom: 1rem;
    border-radius: 15px;
}

.pricing-card {
    margin: 0.5rem;
}

/* Mobile Forms */
.form-floating {
    margin-bottom: 1rem;
}

.form-control, .form-select {
    font-size: 1rem;
    height: 3rem;
}

/* Styles du formulaire */
.form-step {
    padding: 1rem;
}

.form-section {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.form-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.form-floating {
    margin-bottom: 1rem;
}

.form-floating label {
    color: #666;
}

.form-control:focus,
.form-select:focus {
    border-color: #333;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1);
}

.btn-group {
    width: 100%;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-group .btn {
    flex: 1;
    min-width: calc(50% - 0.5rem);
    margin-bottom: 0.5rem;
}

.btn-outline-dark {
    border-color: #333;
    color: #333;
}

.btn-outline-dark:hover,
.btn-outline-dark:focus,
.btn-check:checked + .btn-outline-dark {
    background-color: #333;
    border-color: #333;
    color: #fff;
}

.invalid-feedback {
    font-size: 0.85rem;
    color: #dc3545;
    margin-top: 0.25rem;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: #198754;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
}

@media (max-width: 767px) {
    .form-step {
        padding: 0.5rem;
    }

    .form-section {
        padding: 1rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
        margin-right: 0;
    }
}

/* Styles des étapes du formulaire */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.form-section {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-section h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
}

/* Animation de transition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style des champs de formulaire */
.form-floating {
    margin-bottom: 1rem;
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    border-color: #333;
    box-shadow: 0 0 0 0.2rem rgba(51, 51, 51, 0.25);
}

.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    color: #333;
}

/* Style des boutons radio et checkbox */
.btn-check:checked + .btn-outline-dark {
    background-color: #333;
    border-color: #333;
    color: #fff;
}

.form-check-input:checked {
    background-color: #333;
    border-color: #333;
}

/* Validation des champs */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Responsive pour mobile */
@media (max-width: 767px) {
    .form-section {
        padding: 1rem;
    }

    .form-section h3 {
        font-size: 1.25rem;
    }

    .btn-group {
        flex-wrap: wrap;
    }

    .btn-group .btn {
        flex: 1 0 45%;
        margin: 0.25rem;
    }
}

/* Mobile Buttons */
.btn {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    font-size: 1rem;
}

/* Mobile CTAs */
.cta-primary {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 1rem);
    left: 0;
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 999;
}

/* Mobile Modals */
.modal-dialog {
    margin: 0.5rem;
}

.modal-content {
    border-radius: 20px;
}

/* Mobile Spacing */
section {
    padding: 2rem 1rem;
}

/* Mobile Typography */
h1, h2, h3 {
    text-align: center;
}

h2 {
    font-size: 1.8rem;
}

h3 {
    font-size: 1.4rem;
}

/* Mobile Images */
img {
    max-width: 100%;
    height: auto;
}

/* Mobile Phone Display */
.phone-display {
    display: inline-block;
    text-decoration: none;
    color: #000;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-weight: 500;
    transition: color 0.3s ease;
}

.phone-display:hover {
    color: #333;
    text-decoration: none;
}

.phone-display i {
    color: #000;
}

/* Progress Steps for Mobile */
.progress-steps {
    overflow-x: auto;
    padding: 1rem 0;
    -webkit-overflow-scrolling: touch;
}

/* Styles de la barre de progression */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.progress-steps .step {
    flex: 1;
    text-align: center;
    position: relative;
    min-width: 80px;
}

.progress-steps .step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.progress-steps .step-label {
    font-size: 0.8rem;
    color: #6c757d;
    display: block;
    margin-top: 0.25rem;
    white-space: nowrap;
}

.progress-steps .step.active .step-number {
    background: #333;
    border-color: #333;
    color: #fff;
}

.progress-steps .step.active .step-label {
    color: #333;
    font-weight: 500;
}

.progress-steps .step.completed .step-number {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

/* Style pour mobile */
@media (max-width: 767px) {
    .progress-steps {
        margin: 0 -1rem 1.5rem;
        padding: 1rem;
    }

    .progress-steps .step {
        min-width: 60px;
    }

    .progress-steps .step-number {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
    }

    .progress-steps .step-label {
        font-size: 0.7rem;
    }
}

/* Navigation des étapes */
.step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.step-navigation .btn {
    min-width: 120px;
}

@media (max-width: 767px) {
    .step-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .step-navigation .btn {
        width: 100%;
    }
}

/* Section Partenaires Mobile */
.partners-mobile {
    padding: 2rem 0;
    background-color: #fff;
    margin-bottom: 2rem;
}

.partners-mobile .partner-logo {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    transition: transform 0.3s ease;
}

.partners-mobile .partner-logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.partners-mobile .partner-logo img {
    max-width: 80%;
    max-height: 60px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.partners-mobile .partner-logo:hover img {
    filter: grayscale(0%);
}

/* Hide partners section on desktop */
@media (min-width: 768px) {
    .partners-mobile {
        display: none;
    }
}

/* Section Partenaires Mobile */
.partners-section {
    padding: 2rem 0;
    background-color: #f8f9fa;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 1rem;
}

.partner-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.partner-item:hover {
    transform: translateY(-2px);
}

.partner-logo {
    max-width: 100%;
    height: auto;
    max-height: 60px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.partner-logo:hover {
    filter: grayscale(0%);
}

@media (min-width: 576px) {
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile Footer */
@media (max-width: 767px) {
    .footer {
        padding: 2rem 0;
        margin-bottom: var(--bottom-nav-height);
    }

    .footer h5 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .footer .row {
        text-align: center;
    }

    .footer .list-unstyled {
        margin-bottom: 1.5rem;
    }

    .footer .list-unstyled li {
        margin-bottom: 0.5rem;
    }

    .footer .phone {
        margin: 1rem 0;
    }

    .footer .address {
        margin-bottom: 1rem;
    }

    .footer .copyright {
        font-size: 0.9rem;
        margin-top: 1rem;
    }
}

/* Tablet Breakpoint */
@media (min-width: 768px) {
    .mobile-nav {
        display: none;
    }

    body {
        padding-bottom: 0;
    }

    .btn {
        width: auto;
    }

    .cta-primary {
        position: static;
        background: none;
        backdrop-filter: none;
    }

    .phone-display {
        position: static;
        transform: none;
    }
}

/* Touch Optimizations */
* {
    -webkit-tap-highlight-color: transparent;
}

button, a {
    touch-action: manipulation;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Optimizations */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Mobile Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* Personnalisation de l'alerte info */
.devis-display .alert-info {
    background: none;
    border: none;
    padding: 1rem 0;
}
