/* Police par défaut pour le texte */
body {
    font-family: 'Rubik', Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #FFF; /* Couleur de fond inspirée de l'image */
    line-height: 1.6;
    color: #fff; /* Couleur de texte par défaut */
}

header {
    background-color: #fff;
    padding: 20px;
    text-align: center;
}

header h1 {
    margin: 0;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Rubik', Arial, sans-serif;
}

.logo {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
    width: 500px;
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-image: url('/static/img/bg.jpg'); /* Utilisation de l'image locale */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.main-container {
    background-color: #fff; /* Fond blanc */
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #333; /* Couleur de texte pour le contenu du conteneur */
}

/* Fond blanc sobre uniquement pour la page d'accueil (step1) */
.main-container.home {
    background-color: rgba(255, 255, 255, 0.9);
}

/* Titres principaux */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Rubik', Arial, sans-serif;
    font-weight: normal;
    letter-spacing: 0.01em;
    color: #003437;
}

/* Pour les titres dans les containers principaux */
.main-container h1,
.main-container h2,
.main-container h3,
.main-container h4,
.main-container h5,
.main-container h6 {
    font-family: 'Rubik', Arial, sans-serif;
    color: #003437;
}

/* Responsive styles */
@media (min-width: 768px) {
    .main-container {
        min-width: 500px;
        max-width: 600px;
    }
}

@media (max-width: 767px) {
    .main-container {
        width: 95%;
    }
}

/* Style général pour le formulaire */
form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-in-out;
}



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

/* Style des labels */
label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
}

/* Style des champs de saisie */
input[type="email"],
input[type="text"],
select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}
input.large{
    width: 90%;
}
.full-width{
    width: 100%;
}
textarea {
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 12px;
    width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="email"]:focus,
input[type="text"]:focus,
textarea:focus,
select:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
    outline: none;
}

/* Style des boutons */
button {
    background-color: #4CAF50;
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #388e3c;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Style des étapes du formulaire */
.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

.step-description {
    font-size: 1rem;
    color: #666;
    text-align: center;
    margin-bottom: 30px;
}

.form-description {
    font-style: italic;
    color: #666; /* Couleur légèrement grisée pour le texte */
    margin-bottom: 20px;
}

/* Style des conteneurs de questions */
.question-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Style des transitions entre les étapes */
.hidden {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.visible {
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease;
}

footer {
    background-color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #b26349; /* Couleur de texte adaptée pour contraste */
}

.footer-links a {
    color: #b26349;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-language a {
    color: #b26349;
    text-decoration: none;
    margin: 0 10px;
}

.footer-language a.active {
    font-weight: bold;
}

.separator {
    margin: 0 10px;
    color: #ccc;
}

.product {
    border: 1px solid #ccc;
    flex-direction: row;
    padding: 10px;
    margin: 10px;
    gap: 10px;
    background-color: #fff;
    display: flex;
    align-items: center; /* alignement vertical centré */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product img {
    max-width: 100px;
    max-height: 100px;
}

.product-link {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.product-details {
    text-align: center;
}

.product-details img {
    max-width: 200px;
    max-height: 200px;
}

.product-image-main {
    max-width: 100%;
    height: auto;
    max-height: 350px;
    box-shadow: 0 2px 12px #0002;
    border-radius: 10px;
}

.component-block {
    width: 100%;
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
}

.component-block-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.component-image {
    width: 90%;
    height: auto;
    max-width: 100%;
    max-height: 200px;
    margin-right: 10px;
    display: block;
    object-fit: contain;
}

/* Style pour les images zoomables */
.zoom-image {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.zoom-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Container pour l'image et l'icône de loupe */
.zoom-image-container {
    position: relative;
    display: inline-block;
    width: 90%;
    max-width: 100%;
}

.zoom-image-container .component-image {
    width: 100%;
    height: auto;
    max-height: 200px;
    margin-right: 0;
    display: block;
    object-fit: contain;
}

/* Icône de loupe */
.zoom-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    pointer-events: none;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.zoom-image-container:hover .zoom-icon {
    background: rgba(0, 0, 0, 0.9);
}

/* Responsive pour l'icône de loupe */
@media (max-width: 768px) {
    .zoom-icon {
        width: 25px;
        height: 25px;
        font-size: 12px;
        top: 8px;
        right: 8px;
    }
}

/* Styles pour le modal d'image */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.image-modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.image-modal-close:hover {
    background: rgba(0,0,0,0.8);
}

.modal-caption {
    color: #fff;
    font-size: 1.1em;
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 6px;
    font-family: 'Rubik', Arial, sans-serif;
}

/* Responsive pour le modal */
@media (max-width: 768px) {
    .image-modal-content {
        width: 95%;
        padding: 10px;
    }
    
    .image-modal-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .modal-image {
        max-height: 70vh;
    }
    
    .modal-caption {
        font-size: 1em;
        margin-top: 10px;
    }
}

.debug-info {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f0f0f0;
    border-top: 1px solid #ddd;
    padding: 10px;
    font-family: monospace;
    font-size: 0.8em;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.error-message {
    color: red;
    margin: 20px 0;
    font-weight: bold;
    font-size: 1rem;
}

button.product-link {
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
    color: black;
}

button.product-link:hover {
    background-color: transparent;
    color: black;
}

.submit-button {
    background-color: #4CAF50; /* Fond vert */
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    transition: background-color 0.3s ease;
    font-weight: 600;
    margin-top: 10px;
}

.submit-button:hover {
    background-color: #388e3c; /* Vert plus foncé au survol */
    color: #fff;
}

.problem-select {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
}

.loader:after {
    content: "";
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 4px solid #4CAF50;
    border-color: #4CAF50 transparent #4CAF50 transparent;
    animation: loader-spin 1s linear infinite;
}

@keyframes loader-spin {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
}

.demandes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.demande-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff; /* Fond blanc plus sobre */
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px 12px;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
    font-size: 1rem;
    color: #333;
    font-weight: 600;
    outline: none;
    min-height: 120px;
    text-decoration: none;
}

.demande-card:hover, .demande-card:focus {
    box-shadow: 0 4px 16px rgba(76,175,80,0.12);
    border-color: #4CAF50;
    background: #f8f8f8; /* Légère teinte au survol */
}

.demande-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.demande-label {
    text-align: center;
    font-size: 1rem;
    color: #333;
    font-family: 'Rubik', Arial, sans-serif;
}

.success-message {
    color: #388e3c;
    background: #eafaf1;
    border-radius: 8px;
    padding: 18px 10px;
    margin: 20px 0;
    text-align: center;
    font-size: 1.1em;
}

.success-message a {
    color: #388e3c;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

.success-message a:hover {
    color: #2e7d32;
    text-decoration: none;
}

.product-image {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}
.product-image img,
.component-image {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #fff;
    padding: 8px;
}
.sav-part-label {
    font-size: 0.97em;
    margin-bottom: 2px;
    display: block;
}
.sav-part-select-group {
    margin-bottom: 10px;
}
.add-sav-part-btn {
    background: none;
    border: none;
    color: #388e3c;
    font-size: 1.5em;
    vertical-align: middle;
    cursor: pointer;
}
#back-link-container {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    margin-top: 10px;
}
#back-link-container form {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: none;
    padding: 0px;
    background-color: transparent;
    margin: unset;
    border-radius: 12px;
    box-shadow: none;
    max-width: none;
}

#back-link {
    background: none;
    border: none;
    color: #000;
    cursor: pointer;
    padding: 0;
    font-size: 0.95em;
    opacity: 0.7;
    text-decoration: underline;
}

/* Styles spécifiques pour les pièces SAV */
.sav-part-row {
    display: flex;
    align-items: center; /* Aligne verticalement les éléments au centre */
    gap: 10px;
    margin-bottom: 10px;
}

.sav-part-select {
    flex: 1;
    max-width: 50%; /* Limite la largeur maximale à 50% */
}

.remove-sav-part-btn {
    background-color: transparent !important; /* Fond transparent */
    color: #dc3545 !important; /* Couleur de l'icône (rouge) */
    border: none !important;
    border-radius: 4px !important;
    padding: 4px !important; /* Padding réduit */
    cursor: pointer;
    font-size: 14px !important; /* Taille de l'icône ajustée si nécessaire */
    min-width: auto !important; /* Pas de largeur minimale fixe */
    width: auto !important; /* Largeur automatique */
    height: auto !important; /* Hauteur automatique */
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
    margin: 0 !important;
    flex-shrink: 0;
}

.remove-sav-part-btn:hover {
    color: #c82333 !important; /* Icône plus foncée au survol */
    background-color: transparent !important; /* Garder le fond transparent */
    transform: scale(1.1); /* Léger agrandissement au survol */
}

.remove-sav-part-btn:disabled {
    background-color: transparent !important;
    color: #ccc !important; /* Couleur grise plus claire pour l'icône désactivée */
    cursor: not-allowed;
    transform: none;
    opacity: 0.4 !important; /* Opacité réduite pour l'état désactivé */
}

.remove-sav-part-btn i {
    font-size: 18px; /* Ajuster la taille de l'icône directement */
    pointer-events: none;
}

/* Style alternatif si FontAwesome n'est pas disponible */
.remove-sav-part-btn::before {
    content: "🗑️";
    font-size: 18px; /* Ajuster la taille de l'emoji */
    line-height: 1;
}

.remove-sav-part-btn:has(i)::before {
    display: none;
}
.uploaded-images-recap {
    margin-top: 20px;
}

.uploaded-images-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.uploaded-image-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 120px;
}

.uploaded-image-preview {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.uploaded-image-item p {
    margin-top: 5px;
    font-size: 0.9em;
    text-align: center;
    color: #333;
}

.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
}

.loader:after {
    content: "";
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 4px solid #4CAF50;
    border-color: #4CAF50 transparent #4CAF50 transparent;
    animation: loader-spin 1s linear infinite;
}

@keyframes loader-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 767px) {
    .mobile-logo {
        position: fixed;
        top: 0;
        left: 0;
        width: 120px; /* Taille réduite du logo */
        height: auto;
        background-color: rgba(255, 255, 255, 0.5); /* Overlay blanc 50% transparent */
        padding: 10px;
        z-index: 1000; /* Assure que le logo reste au-dessus */
    }
}

.light-font {
    font-weight: 300; /* Applique une police plus légère */
    color: #000; /* Assure une bonne lisibilité */
    display: block; /* Aligne les éléments l'un en dessous de l'autre */
    text-align: left; /* Aligne le texte à gauche */
    font-size: 14px; /* Taille de police légèrement réduite */
}

.sav-part-wrapper{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-group {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex: 1 ;
}
.radio-group label {
    border: 1px solid #ccc;
    padding: 10px;
    font-size: 16px;
    border-radius: 4px;
}

#address-autocomplete-container{
    width: 100%;
}
#address-autocomplete-container input {
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}
ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

ul li {
    background: #f5f7fa;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 0;
    color: #333;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: background 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    word-break: break-word;
}

@media (max-width: 600px) {
    ul li {
        font-size: 0.97rem;
        padding: 12px 10px;
    }
}