* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: white !important;
    margin: 0 !important;
}

html {
    padding: 0 !important;
}

body {
    font-family: 'Merriweather Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    padding: 105px 0 80px 0 !important; /* Par défaut : promo (70px) + top-banner (35px) + footer progression (80px bottom) */
}

/* Si aucune promo n'est active, réduire le padding-top */
body:not(.promo-banner-visible) {
    padding-top: 35px !important; /* Seulement top-banner (35px) */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, serif;
}

/* ===== TOP BANNER (Made in France) ===== */
.top-banner {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #e0e0e0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    transition: top 0.3s ease;
}

/* When promo banner is visible, push down top banner */
body.promo-banner-visible .top-banner {
    top: 70px !important;
}

/* When promo banner is visible on mobile, push down top banner */
@media (max-width: 768px) {
    body.promo-banner-visible .top-banner {
        top: 45px !important; /* promo mobile height réduite */
    }
}

.top-banner .flag-fr {
    display: block;
    height: 18px;
    width: auto;
    border-radius: 2px;
}

.top-banner .banner-text {
    color: #333;
    font-weight: 600;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ===== NAVBAR (Landing style) ===== */
.navbar-app-blue {
    background: #34495e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

/* ===== NAVBAR WHITE (Modern style) ===== */
.navbar-app-white {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-app-blue .navbar-brand {
    display: inline-flex;
    align-items: center;
}

.navbar-app-blue .navbar-logo {
    height: 40px;
    width: auto;
    transition: transform 0.2s ease;
}

.navbar-app-blue .navbar-brand:hover .navbar-logo {
    transform: scale(1.05);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.navbar-app-blue .nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    transition: all 0.3s ease;
    background: transparent;
    border-radius: 8px;
}

.navbar-app-blue .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* White navbar specific styles */
.navbar-app-white .navbar-brand {
    display: inline-flex;
    align-items: center;
}

.navbar-app-white .navbar-logo {
    height: 40px;
    width: auto;
    transition: transform 0.2s ease;
}

.navbar-app-white .navbar-brand:hover .navbar-logo {
    transform: scale(1.05);
}

.navbar-app-white .nav-link {
    color: #34495e;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    transition: all 0.3s ease;
    background: transparent;
    border-radius: 8px;
}

.navbar-app-white .nav-link:hover {
    color: #2c3e50;
    background: rgba(52, 73, 94, 0.1);
    transform: translateY(-2px);
}

/* ===== LANGUAGE FLAGS CONTAINER ===== */
.lang-flags-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lang-flag-btn {
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lang-flag-btn img {
    width: 28px;
    height: auto;
    display: block;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lang-flag-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.lang-flag-btn.active {
    opacity: 1;
}

/* Desktop alignment */
@media (min-width: 769px) {
    .navbar-container {
        flex-direction: row;
    }

    .navbar-menu {
        flex-direction: row;
    }
}

/* ===== APP HERO SECTION (NOT USED - supprimée du header app) ===== */
/*
.app-hero-section {
    background: linear-gradient(135deg, #34495e 0%, #3498db 100%);
    color: white;
    text-align: center;
    padding: 50px 20px;
    position: relative;
    overflow: hidden;
}

.app-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" fill="white"></path><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" fill="white"></path><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="white"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.1;
    pointer-events: none;
}

.app-hero-section .container {
    position: relative;
    z-index: 1;
}

.app-hero-section h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 400;
}

.app-hero-section p {
    font-size: 1.1em;
    opacity: 0.9;
}
*/

/* Responsive */
@media (max-width: 768px) {
    .top-banner {
        padding: 6px 15px;
    }

    .top-banner .flag-fr {
        height: 16px;
    }

    .top-banner .banner-text {
        font-size: 0.75em;
    }

    .navbar-container {
        flex-direction: column;
        gap: 15px;
        padding: 10px 15px;
    }

    .navbar-menu {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .navbar-app-blue .navbar-logo {
        height: 35px;
    }

    .navbar-app-blue .nav-link {
        padding: 10px 15px;
        text-align: center;
        width: 100%;
    }

    .navbar-app-white .navbar-logo {
        height: 35px;
    }

    .navbar-app-white .nav-link {
        padding: 10px 15px;
        text-align: center;
        width: 100%;
    }

    .lang-flags-container {
        justify-content: center;
        width: 100%;
    }

    .lang-flag-btn img {
        width: 24px;
    }
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: white;
    box-shadow: none;
}

/* Exception : le container dans promo-banner ne doit PAS avoir de fond blanc */
.promo-banner .container {
    background: transparent !important;
}

.container:first-child {
    overflow: hidden;
    margin-bottom: 0;
}

.container-main {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
    margin-bottom: 0;
    background: white;
}

/* ===== OLD HEADER STYLES (NOT USED ANYMORE - using Bootstrap navbar now) ===== */
/* Kept for reference, can be removed later */
/*
header {
    background: linear-gradient(135deg, #34495e 0%, #3498db 100%);
    color: white;
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: visible;
    transition: transform 0.1s ease-out;
    will-change: transform;
    z-index: 10;
}

.header-logo {
    position: absolute;
    top: 55px;
    left: 40px;
    z-index: 2;
    display: inline-block;
    transition: transform 0.2s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

.logo-image {
    height: 50px;
    width: auto;
}

.header-back-home {
    position: absolute;
    top: 55px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    padding: 10px 25px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.header-back-home:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-lang-selector {
    position: absolute;
    top: 55px;
    right: 40px;
    z-index: 2;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" fill="white"></path><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" fill="white"></path><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="white"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.1;
    pointer-events: none;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.lang-flag {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lang-flag img {
    width: 28px;
    height: auto;
    display: block;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lang-flag:hover {
    opacity: 1;
    transform: translateY(-2px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.lang-flag.active {
    opacity: 1;
    border-color: transparent;
    background: rgba(255, 255, 255, 0.15);
}
*/

main {
    padding: 0;
    background: white;
}

/* Inner container for content sections */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.upload-section, .config-section, .generate-section, .result-section {
    padding: 60px 0;
    margin-bottom: 0;
}

#step1 {
    padding-bottom: 280px;
    min-height: calc(100vh - 300px);
    transition: padding-bottom 0.3s ease;
}

/* Réduire le padding du step1 quand les autres steps sont visibles */
#step1.has-next-steps {
    padding-bottom: 40px;
}

/* Alternate background colors like landing page */
.upload-section {
    background: white;
}

.config-section {
    background: white;
}

.generate-section {
    background: white;
}

.result-section {
    background: white;
}

/* ===== RÈGLES COMMUNES SECTIONS ===== */
.config-section .step-header,
.config-section .config-description,
.config-section .grid-selection,
.config-section .parameters-grid,
.generate-section,
.result-section .step-header,
.result-section .result-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ===== STEP 1 - PHOTO PRINCIPALE (centrée 1200px) ===== */
#step1 .step-header {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

#step1 .format-info-text {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    margin-bottom: 20px;
}

#step1 .format-info-text small {
    color: #666;
    line-height: 1.6;
}

#step1 .upload-box,
#step1 .preview-container {
    max-width: calc(1200px - 40px); /* 1160px pour compenser le padding interne de 40px */
    margin-left: auto;
    margin-right: auto;
    /* padding: 40px déjà défini sur .upload-box */
}

/* ===== STEP 2 - PHOTOS SECONDAIRES (conteneur 1200px comme les autres) ===== */
#step2 .step-header,
#step2 .tiles-section {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

#step2 .format-info-text {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    margin-bottom: 20px;
}

#step2 .format-info-text small {
    color: #666;
    line-height: 1.6;
}

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    margin-right: 15px;
}

.step-header h2 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 0;
}

.step-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.step-subtitle {
    font-size: 0.95em;
    margin: 0;
    line-height: 1.4;
}

.upload-box {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-box:hover {
    border-color: #34495e;
    background: #f0f4f8;
}

.upload-label {
    cursor: pointer;
    display: block;
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.upload-text strong {
    display: block;
    font-size: 1.2em;
    color: #333;
    margin-bottom: 5px;
}

.upload-text span {
    color: #666;
    font-size: 0.9em;
}

.preview-container {
    position: relative;
    max-width: 350px;
    margin: 0 auto;
}

.preview-container img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Bouton pour changer l'image principale */
.change-main-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 14px;
    background: rgba(102, 126, 234, 0.95);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.change-main-btn .change-icon {
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.change-main-btn .change-text {
    white-space: nowrap;
}

.change-main-btn:hover {
    background: rgba(102, 126, 234, 1);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.change-main-btn:hover .change-icon {
    transform: rotate(180deg);
}

/* Tiles Section */
.tiles-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tiles-upload-zone {
    margin-bottom: 0;
    padding: 60px 40px;
    min-height: 250px;
}

.tiles-upload-zone .upload-icon {
    font-size: 5em;
    margin-bottom: 20px;
}

.tiles-upload-zone .upload-text strong {
    font-size: 1.3em;
    margin-bottom: 8px;
}

.tiles-upload-zone .upload-text span {
    font-size: 1em;
}

.tiles-preview {
    margin-top: 20px;
}

.tiles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 20px;
    background: white;
    border-radius: 10px;
}

.tiles-count {
    font-size: 1em;
    color: #34495e;
    font-weight: 600;
}

.btn-add-more {
    background: #34495e;
    color: white;
    border: none;
    padding: 8px 18px;
    font-size: 0.9em;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(52, 73, 94, 0.3);
}

.btn-add-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 73, 94, 0.5);
}

.tiles-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
    gap: 8px;
    max-height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: transparent;
    border-radius: 10px;
}

.tile-card {
    position: relative;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.tile-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tile-card img {
    width: 100%;
    height: 74px;
    object-fit: cover;
    display: block;
}

.tile-card .tile-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: 10;
}

.tile-card:hover .tile-remove-btn {
    opacity: 1;
}

.tile-card .tile-remove-btn:hover {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.15);
}

.config-description {
    text-align: center;
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
}

/* Ratio detection info in step 3 */
.ratio-info {
    text-align: center;
    background: #f0f4f8;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px 20px;
    margin: 0 auto 25px;
    max-width: 600px;
}

.ratio-info p {
    margin: 0;
    color: #34495e;
    font-size: 1em;
}

.ratio-info strong {
    color: #34495e;
    font-weight: 700;
}

.ratio-info span {
    color: #34495e;
    font-weight: 600;
}

/* Grid Selection Cards */
.grid-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.grid-card {
    position: relative;
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.grid-card:hover {
    border-color: #34495e;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(52, 73, 94, 0.2);
}

input[type="radio"]:checked + .grid-card {
    border-color: #34495e;
    background: linear-gradient(135deg, rgba(52, 73, 94, 0.05) 0%, rgba(52, 152, 219, 0.05) 100%);
    box-shadow: 0 8px 25px rgba(52, 73, 94, 0.3);
}

.grid-card.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.grid-visual {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

.grid-example {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.grid-row {
    display: flex;
    gap: 2px;
}

.grid-cell {
    background: #34495e;
    border-radius: 1px;
}

/* Different grid sizes */
.coarse .grid-cell {
    width: 18px;
    height: 18px;
}

.standard .grid-cell {
    width: 11px;
    height: 11px;
}

.detailed .grid-cell {
    width: 7px;
    height: 7px;
}

.ultra .grid-cell {
    width: 5px;
    height: 5px;
}

.grid-info {
    text-align: center;
}

.grid-info h3 {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 8px;
}

.grid-stats {
    color: #34495e;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.grid-desc {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.selected-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #34495e;
    color: white;
    padding: 8px 15px;
    border-radius: 0 12px 0 12px;
    font-weight: bold;
    font-size: 0.9em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

input[type="radio"]:checked + .grid-card .selected-badge {
    opacity: 1;
}

/* Parameters Grid Layout */
.parameters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.parameter-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.parameter-card:hover {
    border-color: #34495e;
    box-shadow: 0 4px 12px rgba(52, 73, 94, 0.1);
}

.setting-label {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1em;
    text-align: center;
}

.radio-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
}

.radio-option:hover {
    border-color: #34495e;
    background: #f0f4f8;
    transform: translateX(5px);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #34495e;
    background: #34495e;
}

.radio-option input[type="radio"]:checked ~ .radio-label {
    color: #34495e;
    font-weight: bold;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio-label {
    color: #333;
    transition: all 0.3s ease;
    flex-grow: 1;
}

.parameter-hint {
    display: block;
    text-align: center;
    color: #666;
    font-size: 0.85em;
    margin-top: 12px;
    line-height: 1.4;
}

/* Border preview visualization - shows frame around entire mosaic */
.border-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 40px;
    margin-left: auto;
}

.tile-sample {
    width: 100%;
    height: 100%;
    background: #34495e;
}

.border-preview.no-border {
    padding: 0;
    background: transparent;
}

.border-preview.no-border .tile-sample {
    width: 100%;
    height: 100%;
}

.border-preview.thin-border {
    background: white;
    padding: 3px;
    border: 1px solid #e0e0e0;
}

.border-preview.thin-border .tile-sample {
    width: calc(100% - 6px);
    height: calc(100% - 6px);
}

.border-preview.thick-border {
    background: white;
    padding: 5px;
    border: 1px solid #e0e0e0;
}

.border-preview.thick-border .tile-sample {
    width: calc(100% - 10px);
    height: calc(100% - 10px);
}

/* Blend Adjustment inside color mode card */
.blend-adjustment {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    margin: 12px 0;
    transition: all 0.3s ease;
}

.blend-adjustment:hover {
    border-color: #34495e;
    box-shadow: 0 2px 8px rgba(52, 73, 94, 0.1);
}

.blend-label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.blend-control {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
}

.blend-control input[type="range"] {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.blend-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #34495e;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.blend-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #34495e;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.blend-value {
    display: inline-block;
    background: #34495e;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9em;
    min-width: 45px;
    text-align: center;
}

.blend-hint {
    display: block;
    color: #666;
    font-size: 0.8em;
    line-height: 1.3;
}

/* Edge fade color picker */
.edge-fade-color-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.color-picker-label {
    font-size: 0.9em;
    color: #555;
}

#edgeFadeColor {
    width: 50px;
    height: 30px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

#edgeFadeColor:hover {
    border-color: #34495e;
}

.generate-section {
    text-align: center;
}

.generate-btn {
    background: #34495e;
    color: white;
    border: none;
    padding: 20px 60px;
    font-size: 1.3em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 73, 94, 0.4);
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 73, 94, 0.6);
}

.generate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.progress-container {
    margin-top: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar {
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: #34495e;
    border-radius: 15px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    color: #34495e;
}

.result-container {
    text-align: center;
}

.result-container img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    /* Protection against image download/right-click */
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.result-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

/* Réorganisation des boutons */
.result-actions #buyNowBtn {
    order: 2;
}

.result-actions #changeOfferBtn {
    order: 1;
}

.result-actions #newMosaicBtn {
    order: 3;
}

/* Email delivery notice */
.email-delivery-notice {
    text-align: center;
    margin-top: 20px;
    padding: 12px 20px;
    background: transparent;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.email-delivery-notice p {
    margin: 0;
    color: #34495e;
    font-size: 0.95em;
    line-height: 1.5;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.btn {
    padding: 15px 30px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: #34495e;
    color: white;
    box-shadow: 0 4px 15px rgba(52, 73, 94, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 73, 94, 0.6);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.6);
}


/* Footer styles removed - Footer supprimé car doublon avec header */
/*
footer {
    background: white;
    padding: 60px 0;
    text-align: center;
    color: #666;
    border-top: 1px solid #e0e0e0;
    margin-bottom: 80px;
    padding-bottom: 60px;
}

footer .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

footer .footer-links {
    margin-top: 15px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

footer .footer-links a {
    color: #34495e;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

footer .footer-links a:hover {
    color: #3498db;
    text-decoration: underline;
}
*/

/* Loading indicator for tiles */
.tiles-loading {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 15px;
    margin: 20px 0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 5px solid #e0e0e0;
    border-top: 5px solid #34495e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #34495e;
    font-size: 1.1em;
    font-weight: bold;
}

.loading-text span {
    color: #34495e;
}


/* Smooth animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.upload-section, .config-section, .generate-section, .result-section {
    animation: fadeInUp 0.5s ease-out;
}

/* Improved shadows and depth */
.container {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.grid-card, .parameter-card, .tile-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}


/* Better focus states for accessibility */
input[type="file"]:focus-visible,
button:focus-visible {
    outline: 2px solid #34495e;
    outline-offset: 2px;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    /* OLD HEADER RESPONSIVE STYLES - NOT USED ANYMORE */
    /*
    header {
        padding: 80px 20px 30px 20px;
    }

    header h1 {
        font-size: 1.8em;
        margin-top: 10px;
    }

    .header-logo {
        top: 15px;
        left: 20px;
        transform: none;
    }

    .header-logo:hover {
        transform: scale(1.05);
    }

    .logo-image {
        height: 40px;
    }

    .header-back-home {
        top: 15px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.9em;
        padding: 8px 20px;
    }

    .header-back-home:hover {
        transform: translateX(-50%) translateY(-2px);
    }

    .header-lang-selector {
        top: 50px;
        right: 20px;
    }

    .lang-flag {
        padding: 3px;
    }

    .lang-flag img {
        width: 24px;
    }
    */

    .upload-section, .config-section, .generate-section, .result-section {
        padding: 40px 0;
    }

    .grid-selection {
        grid-template-columns: 1fr;
    }

    .grid-card:hover {
        transform: none;
    }

    /* Parameters grid responsive */
    .parameters-grid {
        grid-template-columns: 1fr;
    }

    .radio-option:hover {
        transform: none;
    }

    .tiles-grid-cards {
        grid-template-columns: repeat(auto-fill, minmax(59px, 1fr));
    }

    .tiles-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .btn-add-more {
        width: 100%;
    }

    .result-actions {
        flex-direction: column;
    }
}

/* ===== 3D INTERACTIVE SCENE ===== */

/* Container pour les contrôles et instructions sur la même ligne */
.controls-instructions-row {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 0 20px;
    gap: 30px;
}

/* Instructions discrètes à droite */
.scene-instructions-subtle {
    text-align: left;
    padding: 0;
    margin: 0;
}

.scene-instructions-subtle p {
    margin: 0;
    font-size: 0.85em;
    color: #7f8c8d;
    font-weight: 400;
}

.scene-instructions-subtle strong {
    color: #34495e;
    font-weight: 600;
}

/* 3D Room Scene Container */
.result-scene-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.room-scene {
    position: relative;
    width: 100%;
    height: 500px;
    background: url('/static/salon.png') center center / cover no-repeat;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}

/* Frame Container - Positionnement absolu dans le cadre noir de la photo */
.frame-container {
    position: absolute;
    top: 10%;
    left: 48%;
    transform: translateX(-50%);
    width: 66%;
    height: 66%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease; /* Transition douce lors du changement de ratio */
}

/* Ajustements pour images portrait */
.frame-container.portrait {
    width: 44%;  /* Plus étroit pour format portrait */
    height: 74%; /* Plus haut pour format portrait */
    top: 6%;
}

/* Ajustements pour images paysage */
.frame-container.landscape {
    width: 74%;  /* Plus large pour format paysage */
    height: 55%; /* Moins haut pour format paysage */
    top: 10%;
}

/* Ajustements pour images carrées (par défaut) */
.frame-container.square {
    width: 62%;
    height: 62%;
    top: 8%;
}

/* Mosaic Wrapper (zone cliquable pour ouvrir la modale) */
.mosaic-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: transparent;
    overflow: hidden;
    cursor: pointer;
    /* Désactiver le pinch-zoom mais permettre le tap pour ouvrir la modale */
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.mosaic-wrapper img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.2s ease-out;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

/* Zoom Controls */
.zoom-controls {
    display: none; /* Masqué car on utilise la modale plein écran pour zoomer */
}

.zoom-btn {
    width: 28px;
    height: 28px;
    border: 1.5px solid #34495e;
    background: white;
    border-radius: 50%;
    font-size: 1em;
    font-weight: bold;
    color: #34495e;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.zoom-btn:hover {
    background: #34495e;
    color: white;
    transform: scale(1.1);
}

.zoom-btn:active {
    transform: scale(0.95);
}

.zoom-level {
    min-width: 45px;
    text-align: center;
    font-weight: bold;
    color: #34495e;
    font-size: 0.85em;
}

.zoom-reset {
    font-size: 0.95em;
}

/* Result Actions (buttons below scene) */
.result-actions {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive adjustments for 3D scene */
@media (max-width: 1024px) {
    .room-scene {
        height: 450px;
    }

    .frame-container {
        width: 46%;
        height: 46%;
        top: 8%;
    }
}

@media (max-width: 768px) {
    /* MOBILE : Masquer le background du salon et afficher la preview en grand */
    .room-scene {
        height: auto; /* Hauteur automatique basée sur le contenu */
        background: none; /* Pas de background salon */
        border-radius: 0; /* Pas de bordures arrondies */
        box-shadow: none; /* Pas d'ombre */
        overflow: visible; /* Permet à la preview de prendre toute la place */
    }

    /* MOBILE : Preview en plein écran (100% de la largeur disponible) */
    .frame-container {
        position: relative; /* Plus de position absolue */
        top: auto;
        left: auto;
        transform: none;
        width: 100%; /* Pleine largeur */
        height: auto; /* Hauteur automatique selon le ratio de l'image */
        padding: 0 15px; /* Petit padding sur les côtés */
    }

    /* MOBILE : Mêmes règles pour tous les formats (portrait, paysage, carré) */
    .frame-container.portrait,
    .frame-container.landscape,
    .frame-container.square {
        width: 100%;
        height: auto;
        top: auto;
        padding: 0 15px;
    }

    /* MOBILE : La preview doit prendre toute la largeur */
    .mosaic-wrapper {
        width: 100%;
        height: auto;
        min-height: 300px; /* Hauteur minimum pour éviter que ça soit trop petit */
    }

    .mosaic-wrapper img {
        position: relative; /* Plus de positionnement absolu */
        top: auto;
        left: auto;
        transform: none;
        width: 100%; /* Pleine largeur */
        height: auto; /* Hauteur automatique pour conserver le ratio */
        max-width: 100%;
        max-height: none; /* Pas de limite de hauteur */
    }

    /* Masquer complètement les contrôles en mobile - les utilisateurs utilisent le pinch-to-zoom */
    .controls-instructions-row {
        display: none;
    }
}

/* ===== PRICING CARDS STYLING (Step 3) ===== */

/* Pricing Headline */
.pricing-headline {
    text-align: center;
    margin-bottom: 35px;
    padding: 0 20px;
}

.pricing-headline h3 {
    font-size: 1.8em;
    color: #34495e;
    margin-bottom: 10px;
    font-weight: 600;
}

.pricing-headline p {
    font-size: 1.1em;
    color: #666;
    font-weight: 400;
}

/* Price Tag */
.price-tag {
    font-size: 2em;
    font-weight: bold;
    color: #34495e;
    margin: 15px 0;
}

/* Grid Stats (dynamic tile count) */
.grid-stats {
    color: #34495e;
    font-weight: 600;
    font-size: 0.95em;
    margin: 10px 0 15px 0;
    padding: 8px 12px;
    background: #f0f4f8;
    border-radius: 8px;
    text-align: center;
}

/* Card Features List */
.card-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.card-features li {
    padding: 10px 0;
    font-size: 0.95em;
    color: #333;
    line-height: 1.5;
    border-bottom: 1px solid #f0f0f0;
}

.card-features li:last-child {
    border-bottom: none;
}

/* Card Micro-copy */
.card-microcopy {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

/* Print Sizes (calculated dynamically based on ratio) */
.print-sizes {
    margin: 15px 0;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.print-sizes-title {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 4px;
}

.print-sizes-value {
    font-size: 1.1em;
    text-align: center;
}

.print-sizes-value strong {
    color: #34495e;
    font-weight: 700;
}

/* Card CTA Button */
.card-cta {
    width: 100%;
    background: #34495e;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(52, 73, 94, 0.3);
}

.card-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(52, 73, 94, 0.5);
}

input[type="radio"]:checked + .grid-card .card-cta {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

input[type="radio"]:checked + .grid-card .card-cta:hover {
    box-shadow: 0 6px 18px rgba(39, 174, 96, 0.6);
}

/* Card CTA Admin Button (génération directe sans paiement) */
.card-cta-admin {
    width: 100%;
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 0.9em;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.card-cta-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(230, 126, 34, 0.5);
    background: linear-gradient(135deg, #d35400 0%, #e67e22 100%);
}

/* Card Progress Container - Mini jauge dans la card */
.card-progress-container {
    margin-top: 20px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.card-progress-text {
    text-align: center;
    font-size: 0.85em;
    font-weight: 600;
    color: #34495e;
}

/* Admin progress bar (orange) */
.card-progress-fill.admin-fill {
    background: linear-gradient(90deg, #e67e22 0%, #f39c12 100%);
}

.card-progress-container.admin-progress {
    border: 2px solid #e67e22;
}

/* Global Micro-copy */
.global-microcopy {
    text-align: center;
    font-size: 1em;
    color: #666;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    font-weight: 500;
}

/* Quality Badge (POPULAIRE) - à droite */
.quality-badge-right {
    position: absolute;
    top: -3px;
    right: -3px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 5px 10px;
    border-radius: 0 12px 0 12px;
    font-weight: bold;
    font-size: 0.7em;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.4);
}

/* Quality Badge (POPULAIRE) - ancienne version à gauche (garde pour compatibilité) */
.quality-badge {
    position: absolute;
    top: -3px;
    left: -3px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 12px 0 12px 0;
    font-weight: bold;
    font-size: 0.85em;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.4);
}

/* Responsive pricing cards */
@media (max-width: 768px) {
    .pricing-headline h3 {
        font-size: 1.4em;
    }

    .pricing-headline p {
        font-size: 1em;
    }

    .price-tag {
        font-size: 1.6em;
    }

    .card-features li {
        font-size: 0.9em;
        padding: 8px 0;
    }

    .card-cta {
        padding: 12px 25px;
        font-size: 0.95em;
    }

    .global-microcopy {
        font-size: 0.9em;
    }
}

/* ===== STEP 3 - RATIO INFO SMALL ===== */
.ratio-info-small {
    margin-top: 15px;
    padding: 10px 15px;
    background: #f0f4f8;
    border-radius: 8px;
    text-align: center;
}

.ratio-info-small small {
    color: #666;
    font-size: 0.85em;
}

.ratio-info-small strong {
    color: #34495e;
    font-weight: 600;
}

.ratio-info-small span {
    color: #34495e;
    font-weight: 500;
}

/* ===== STEP 3 - VALIDATE BUTTON ===== */
.step3-validate-container {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
}

.btn-validate-params {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.btn-validate-params:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.6);
}

.btn-validate-params:active {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .btn-validate-params {
        width: 100%;
        padding: 15px 30px;
        font-size: 1.1em;
    }
}

/* ===== STICKY PROGRESS PANEL (Footer style) ===== */
.progress-panel {
    position: fixed;
    bottom: 0; /* En bas sur desktop */
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px 20px;
    z-index: 999;
    border-top: 1px solid #e0e0e0;
}

.progress-panel-header {
    display: none; /* Titre masqué en mode footer horizontal */
}

.progress-panel-toggle {
    display: none;
}

/* Progress Bar Container */
.progress-panel-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 6px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.progress-panel-bar-fill {
    height: 100%;
    background: #34495e;
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 25%; /* Start at 25% (step 1 of 4) */
}

.progress-panel-step-count {
    display: none; /* Masqué car redondant avec les étapes */
}

/* Steps - Horizontal layout */
.progress-panel-steps {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto 6px;
}

.progress-panel-step {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 2px solid transparent;
}

.progress-panel-step.active {
    background: rgba(52, 73, 94, 0.1);
    border-color: #34495e;
}

.progress-panel-step.completed {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(46, 204, 113, 0.1) 100%);
    border-color: #27ae60;
}

/* Rendre les étapes actives et complétées cliquables */
.progress-panel-step.active,
.progress-panel-step.completed {
    cursor: pointer;
}

.progress-panel-step.active:hover,
.progress-panel-step.completed:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.progress-panel-step .step-icon {
    font-size: 0.9em;
    color: #ccc;
    transition: all 0.3s ease;
    min-width: 16px;
    text-align: center;
}

.progress-panel-step.active .step-icon {
    color: #34495e;
}

.progress-panel-step.completed .step-icon::before {
    content: '✓';
    color: #27ae60;
    font-weight: bold;
}

.progress-panel-step .step-label {
    font-size: 0.8em;
    color: #666;
    font-weight: 500;
}

.progress-panel-step.active .step-label {
    color: #34495e;
    font-weight: 600;
}

.progress-panel-step.completed .step-label {
    color: #27ae60;
}

.progress-panel-step .step-count {
    font-size: 0.7em;
    color: #34495e;
    background: rgba(52, 73, 94, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

/* Price Display - Inline with steps */
.summary-item.summary-price {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(52, 73, 94, 0.1);
    border-radius: 20px;
    border: 2px solid #34495e;
    white-space: nowrap;
}

.summary-label {
    font-size: 0.8em;
    color: #666;
    font-weight: 500;
}

.summary-value {
    font-size: 1em;
    color: #34495e;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 768px) {
    .progress-panel {
        /* MOBILE : Footer en HAUT collé au top-banner (évite le bug barre d'adresse dynamique) */
        bottom: auto;
        top: 73px; /* Sous promo mobile (45px) + top-banner (~28px) */
        border-top: none;
        border-bottom: 1px solid #e0e0e0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); /* Ombre en bas au lieu d'en haut */
        padding: 10px 15px;
        margin-top: 0; /* Pas de marge pour coller au top-banner */
    }

    /* Quand pas de promo banner */
    body:not(.promo-banner-visible) .progress-panel {
        top: 28px; /* Seulement top-banner (~28px) */
    }

    .progress-panel-steps {
        gap: 6px;
    }

    .progress-panel-step {
        padding: 5px 10px;
        font-size: 0.8em;
    }

    .progress-panel-step .step-label {
        font-size: 0.75em;
    }

    .summary-item.summary-price {
        padding: 5px 10px;
    }

    .summary-label,
    .summary-value {
        font-size: 0.75em;
    }
}

/* Force white background everywhere - must be at the end to override Bootstrap */
html {
    background-color: white !important;
}

body {
    background-color: white !important;
}

.container, .container-main {
    background-color: white !important;
}

main {
    background-color: white !important;
}

/* ===== PROMO BANNER ===== */
.promo-banner {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 12px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1051 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.promo-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
    flex-wrap: wrap;
    padding: 0 15px;
}

.promo-banner-icon {
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.promo-banner-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.promo-banner-text strong {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.promo-banner-text span {
    font-size: 0.85rem;
    opacity: 0.95;
}

.promo-banner-code {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.promo-code-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.9;
}

.promo-code {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.promo-banner-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    padding: 5px;
}

.promo-banner-close:hover {
    opacity: 1;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .promo-banner {
        padding: 6px 0;
    }

    .promo-banner-content {
        gap: 6px;
        padding: 0 40px;
    }

    .promo-banner-icon {
        font-size: 1rem;
        display: none; /* Masquer l'icône sur mobile pour gagner de l'espace */
    }

    .promo-banner-text {
        gap: 2px;
    }

    .promo-banner-text strong {
        font-size: 0.75rem;
    }

    .promo-banner-text span {
        font-size: 0.65rem;
        display: none; /* Masquer la description sur mobile */
    }

    .promo-banner-code {
        padding: 4px 10px;
    }

    .promo-code-label {
        font-size: 0.7rem;
    }

    .promo-code {
        font-size: 0.85rem;
    }

    .btn-copy {
        padding: 3px 6px;
        font-size: 0.85rem;
    }

    .promo-banner-close {
        right: 10px;
    }
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    body {
        /* Footer maintenant en HAUT sur mobile */
        padding-top: 163px !important; /* promo mobile (45px) + top-banner (28px) + footer (90px) */
        padding-bottom: 20px !important; /* Juste une petite marge en bas */
    }

    body:not(.promo-banner-visible) {
        padding-top: 118px !important; /* top-banner (28px) + footer (90px) */
    }
}

/* ===== ANIMATION VA-ET-VIENT POUR TRAITEMENT SERVEUR ===== */
@keyframes progressSlide {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 40px 0;
    }
}

.progress-fill.processing,
.card-progress-fill.processing {
    /* Rayures vertes animées diagonales */
    background: repeating-linear-gradient(
        45deg,
        #27ae60,
        #27ae60 10px,
        #2ecc71 10px,
        #2ecc71 20px
    );
    background-size: 40px 40px;
    animation: progressSlide 1s linear infinite;
}

/* ===== MODAL IMAGE PLEIN ÉCRAN ===== */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.2s ease;
}

.fullscreen-close:hover {
    transform: scale(1.2);
}

.fullscreen-image-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-modal img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

/* Loupe */
.magnifier {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 4px solid white;
    border-radius: 50%;
    cursor: none;
    pointer-events: none;
    background-repeat: no-repeat;
    background-color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(0, 0, 0, 0.2);
    z-index: 10002;
}

/* Indication zoom en bas de la modal */
.fullscreen-zoom-info {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 14px 28px;
    border-radius: 25px;
    z-index: 10001;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    text-align: center;
    max-width: 90%;
}

.zoom-info-main {
    font-size: 0.95em;
    font-weight: 600;
    margin-bottom: 6px;
}

.zoom-info-quality {
    font-size: 0.8em;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.4;
}

@media (max-width: 768px) {
    /* MOBILE : Ajuster la modal fullscreen pour une meilleure proportion */
    .fullscreen-modal {
        padding: 15px; /* Padding global sur la modal */
        overflow-x: hidden; /* Masque le scroll horizontal */
    }

    .fullscreen-image-container {
        max-width: calc(100vw - 30px); /* Largeur écran - padding des 2 côtés */
        max-height: 75%; /* Limite la hauteur pour laisser de la place au texte */
        padding: 0;
        margin: 0 auto; /* Centre le container */
    }

    .fullscreen-modal img {
        max-width: calc(100vw - 30px); /* Largeur écran - padding */
        max-height: 65vh; /* Hauteur réduite pour laisser de la place */
        width: auto;
        height: auto;
        object-fit: contain;
    }

    /* Réduire la taille de la loupe sur mobile (si utilisée) */
    .magnifier {
        width: 120px;
        height: 120px;
    }

    /* TEXTE EN BAS : Bien contraindre la largeur */
    .fullscreen-zoom-info {
        position: fixed; /* Position fixe au lieu d'absolue */
        bottom: 10px;
        left: 10px;
        right: 10px;
        transform: none; /* Pas de transform qui pourrait dépasser */
        padding: 8px 12px;
        max-width: none; /* Retire la contrainte max-width */
        width: auto; /* Largeur auto entre left et right */
        box-sizing: border-box; /* Inclut padding et border dans la largeur */
    }

    .zoom-info-main {
        font-size: 0.75em;
        margin-bottom: 3px;
        line-height: 1.3;
        word-wrap: break-word; /* Permet de casser les mots longs */
    }

    .zoom-info-quality {
        font-size: 0.65em;
        line-height: 1.3;
        word-wrap: break-word;
    }

    /* Ajuster le bouton de fermeture pour mobile */
    .fullscreen-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
    }
}
