* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--neutral-50);
    min-height: 100vh;
    line-height: 1.5;
    color: var(--neutral-900);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

/* Styles spécifiques pour la page Panorama 360 Studio intégrée dans WordPress */
.panorama-360-studio-page {
    position: relative;
    margin-top: 0; /* Pas de remontée nécessaire avec header fixe */
    padding-top: 0; /* Pas de compensation nécessaire */
    overflow-x: hidden; /* Empêcher le débordement horizontal sur toute la page */
    width: 100%;
    max-width: 100vw;
}

/* Neutraliser complètement le conteneur Astra pour cette page */
.panorama-360-studio-page .ast-container {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
}

/* Surcharger les styles Astra globaux avec plus de spécificité */
@media (min-width: 922px) {
    body.page .panorama-360-studio-page .ast-container {
        max-width: none !important;
    }
    
    /* Préserver le header */
    #masthead .ast-container {
        max-width: 1240px !important;
    }
}

/* Surcharger le padding Astra */
body.page .panorama-360-studio-page .ast-container,
body.page .panorama-360-studio-page .ast-container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Préserver le padding du header */
#masthead .ast-container,
#masthead .ast-container-fluid {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* Supprimer le padding Astra sur mobile pour éviter les espaces blancs */
@media (max-width: 544px) {
    .ast-separate-container #content .ast-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Surcharge globale très agressive pour cette page uniquement */
.panorama-360-studio-page .ast-container,
.panorama-360-studio-page .ast-container-fluid,
.panorama-360-studio-page .site-content .ast-container {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Forcer la surcharge avec une spécificité maximale */
body.page-template-page-panorama-360-studio .ast-container,
body.page-template-page-panorama-360-studio .ast-container-fluid {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Restaurer le header avec une spécificité encore plus haute */
body.page-template-page-panorama-360-studio #masthead .ast-container,
body.page-template-page-panorama-360-studio #masthead .ast-container-fluid {
    max-width: 1240px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* Assurer que le header WordPress reste PAR DESSUS le hero */
#masthead {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 999 !important;
    background: transparent !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform: translateY(0) !important;
}

/* Header caché quand on scroll vers le bas */
#masthead.header-hidden {
    transform: translateY(-100%) !important;
}

/* Ajouter des transitions fluides aux liens du menu */
#masthead .menu-link,
#masthead .site-branding a,
#masthead .custom-logo-link,
#masthead .ast-custom-button {
    transition: color 0.3s ease, background 0.3s ease !important;
}

/* Header avec flou quand on défile */
#masthead.scrolled {
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Changer la couleur des liens du menu SEULEMENT quand on est sur fond blanc */
#masthead.on-light-bg .menu-link {
    color: #333 !important;
}

#masthead.on-light-bg .menu-link:hover {
    color: #3b82f6 !important;
}

/* Changer aussi la couleur du logo/texte du site SEULEMENT sur fond blanc */
#masthead.on-light-bg .site-branding a,
#masthead.on-light-bg .custom-logo-link {
    color: #333 !important;
}

/* Changer la couleur du logo SVG */
#masthead .custom-logo {
    filter: brightness(0) invert(1); /* Logo blanc par défaut */
    transition: filter 0.3s ease !important;
}

#masthead.on-light-bg .custom-logo {
    filter: brightness(0) invert(0); /* Logo noir SEULEMENT sur fond blanc */
}

/* Bouton "Réserver une prestation" reste visible */
#masthead.scrolled .ast-custom-button {
    background: #3b82f6 !important;
    color: white !important;
}

.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    padding: 140px 0 80px 0; /* Plus de padding-top pour compenser le header fixe */
    width: 100%;
    max-width: 1600px; /* Limiter la largeur sur très grands écrans */
    margin-left: auto;
    margin-right: auto;
    min-height: 100vh; /* Prendre toute la hauteur de l'écran */
    box-sizing: border-box; /* Assurer que le padding est inclus dans la largeur */
    padding-left: max(2rem, calc((100vw - 1600px) / 2 + 2rem)); /* Padding dynamique */
    padding-right: max(2rem, calc((100vw - 1600px) / 2 + 2rem));
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(147, 51, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(34, 197, 94, 0.1) 0%, transparent 50%);
    animation: gradientShift 8s ease-in-out infinite;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.3), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: particleFloat 20s linear infinite;
}

.hero-sphere {
    position: absolute;
    top: 10%;
    right: 10%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    filter: blur(40px);
    animation: sphereFloat 6s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes particleFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-100px); }
}

@keyframes sphereFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-30px) scale(1.1); }
}

.hero-content {
    padding: 0 2rem;
    position: relative;
    z-index: 2;
    color: white;
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2rem;
    animation: badgeGlow 3s ease-in-out infinite;
}

.badge-icon {
    font-size: 1rem;
}

@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.5); }
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.title-main {
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-highlight {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #06d6a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientMove 3s ease-in-out infinite;
}

.title-sub {
    font-size: 1.6rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    font-size: 0.9rem;
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.6);
}

.cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-visual {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    margin: 0 4rem 0 0;
}

.visual-container {
    position: relative;
    width: 400px;
    height: 400px;
}

.visual-sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6, #06d6a0);
    background-size: 300% 300%;
    animation: sphereRotate 4s ease-in-out infinite;
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.5);
}

.sphere-inner {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 50%;
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(10px);
}

.sphere-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring {
    position: absolute;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    animation: ringRotate 8s linear infinite;
}

.ring-1 {
    width: 250px;
    height: 250px;
    top: -125px;
    left: -125px;
    border-color: rgba(59, 130, 246, 0.4);
}

.ring-2 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    border-color: rgba(139, 92, 246, 0.3);
    animation-duration: 12s;
    animation-direction: reverse;
}

.ring-3 {
    width: 350px;
    height: 350px;
    top: -175px;
    left: -175px;
    border-color: rgba(6, 214, 160, 0.2);
    animation-duration: 16s;
}

.visual-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.element {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: white;
    font-size: 0.875rem;
    animation: elementFloat 6s ease-in-out infinite;
}

.element-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.element-2 {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.element-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes sphereRotate {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes ringRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes elementFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.container {
    max-width: 100%;
    margin: 20px 0 1.5rem 0; /* Réduit la marge pour une meilleure intégration */
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    border: none;
    padding: 0 1.5rem;
}

.app-header {
    background: white;
    border-bottom: none;
    padding: 1.5rem 0;
    position: relative;
    top: auto;
    z-index: auto;
    backdrop-filter: none;
    margin-bottom: 2rem;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    max-width: 1200px;
    margin: 0 auto 2rem auto;
}

.app-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--neutral-900);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.logo:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.logo .logo-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: var(--neutral-600);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    background: transparent;
}

.sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    background: transparent;
    padding: 0;
    border: none;
    overflow: visible;
    position: relative;
    order: 3;
}

.sidebar::before {
    display: none;
}

.sidebar-title {
    display: none;
}

.sidebar-title span:first-child {
    font-size: 1.5rem;
}

.upload-section {
    margin-bottom: 0;
    padding: 1.8rem;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--neutral-200);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.upload-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06d6a0);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-section:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.upload-section:hover::before {
    opacity: 1;
}

.upload-section h3 {
    color: var(--neutral-900);
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.file-upload {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.file-upload input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-upload label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.8rem;
    background: var(--neutral-50);
    color: var(--neutral-700);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    font-weight: 500;
    border: 2px dashed var(--neutral-300);
    min-height: 56px;
    font-size: 0.85rem;
}

.file-upload label:hover {
    background: var(--neutral-100);
    border-color: var(--primary);
    color: var(--primary);
}

.file-upload.drag-over label {
    background: var(--primary-light);
    border-color: var(--primary);
    color: white;
}

.logo-controls {
    padding: 1.8rem;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--neutral-200);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    order: 2;
    width: 100%;
}

.logo-controls::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8b5cf6, #3b82f6);
}

.logo-controls h3 {
    color: var(--neutral-900);
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--neutral-700);
    font-weight: 500;
    font-size: 0.8rem;
}

.control-group input[type="range"] {
    width: 100%;
    height: 20px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    border: none;
    padding: 0;
    margin: 0;
}

/* Track unique - c'est LA barre visible */
.control-group input[type="range"]::-webkit-slider-track {
    width: 100%;
    height: 3px;
    background: var(--neutral-200);
    border-radius: 1.5px;
    border: none;
    box-shadow: none;
}

.control-group input[type="range"]::-moz-range-track {
    width: 100%;
    height: 3px;
    background: var(--neutral-200);
    border-radius: 1.5px;
    border: none;
    box-shadow: none;
}

/* Thumb simple et sobre */
.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: none;
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: none;
}

/* Hover très subtil */
.control-group input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--primary-dark);
}

.control-group input[type="range"]::-moz-range-thumb:hover {
    background: var(--primary-dark);
}

.control-value {
    display: inline-block;
    background: var(--neutral-100);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--primary);
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
    margin-top: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: var(--shadow-sm);
}

.btn:hover:not(:disabled) {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.btn:disabled {
    background: var(--neutral-300);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-primary {
    background: var(--primary);
}

.viewer-container {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    order: 1;
    min-height: 75vh;
}

.viewer-header {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.viewer-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
}

.viewer-title {
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.viewer-title::before {
    content: '🎨';
    font-size: 1.25rem;
}

.viewer-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.viewer-info {
    font-size: 0.7rem;
    color: var(--neutral-400);
}

#viewer {
    width: 100%;
    height: 75vh;
    min-height: 600px;
    display: block;
    background: var(--neutral-800);
}

/* Panorama Import Overlay */
.panorama-import-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: rgb(254 254 254); /* Fond blanc moderne */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 3px dashed rgba(0, 0, 0, 0.2); /* Bordure pointillée grise douce */
    box-sizing: border-box; /* Éviter les débordements */
}

.panorama-import-overlay.drag-hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.import-content {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.import-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.import-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: rgb(0, 0, 0);
}

.import-content p {
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.import-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.import-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Add Overlay Button */
.add-overlay-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 5;
}

.overlay-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.overlay-btn:hover {
    background: rgba(59, 130, 246, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Overlay Upload Panel */
.overlay-upload-panel {
    position: absolute;
    top: 80px;
    left: 20px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    min-width: 300px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-xl);
    z-index: 100;
    transition: var(--transition);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.panel-header h4 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.close-panel-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-panel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.overlay-upload-panel .file-upload {
    margin-bottom: 0;
}

.overlay-upload-panel .file-upload label {
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    color: white;
}

.overlay-upload-panel .file-upload label:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* Viewer Controls Panel */
.viewer-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(30, 30, 50, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    min-width: 280px;
    z-index: 6;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.controls-header h4 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.close-controls-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-controls-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.controls-grid-compact {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.control-group-compact {
    display: grid;
    grid-template-columns: 70px 1fr 40px;
    align-items: center;
    gap: 0.5rem;
}

.control-group-compact label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Forcer les styles contre user agent stylesheet */
.control-group-compact input[type="range"] {
    width: 100% !important;
    height: 4px !important;
    background: rgba(255, 255, 255, 0.3) !important;
    border-radius: 2px !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    cursor: pointer !important;
    border: none !important;
    padding: 0 !important;
    margin: 8px 0 !important;
    box-shadow: none !important;
}

/* FORCER la suppression complète du track */
.control-group-compact input[type="range"]::-webkit-slider-track {
    background: transparent !important;
    border: none !important;
    height: 0 !important;
    width: 0 !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
}

.control-group-compact input[type="range"]::-moz-range-track {
    background: transparent !important;
    border: none !important;
    height: 0 !important;
    width: 0 !important;
    box-shadow: none !important;
    -moz-appearance: none !important;
}

/* Supprimer TOUS les pseudo-éléments possibles */
.control-group-compact input[type="range"]::-webkit-slider-runnable-track {
    background: transparent !important;
    border: none !important;
    height: 0 !important;
    -webkit-appearance: none !important;
}

.control-group-compact input[type="range"]::-ms-track {
    background: transparent !important;
    border: none !important;
    height: 0 !important;
}

.control-group-compact input[type="range"]::-ms-fill-lower {
    background: transparent !important;
}

.control-group-compact input[type="range"]::-ms-fill-upper {
    background: transparent !important;
}

/* Supprimer les éléments de progress pour Firefox */
.control-group-compact input[type="range"]::-moz-range-progress {
    background: transparent !important;
}

/* Supprimer les éléments lower/upper pour WebKit */
.control-group-compact input[type="range"]::-webkit-slider-lower-track {
    background: transparent !important;
}

.control-group-compact input[type="range"]::-webkit-slider-upper-track {
    background: transparent !important;
}

/* Thumb simple pour viewer controls */
.control-group-compact input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: none;
}

.control-group-compact input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: none;
}

/* Hover très simple */
.control-group-compact input[type="range"]::-webkit-slider-thumb:hover {
    background: #1d4ed8;
}

.control-group-compact input[type="range"]::-moz-range-thumb:hover {
    background: #1d4ed8;
}

.control-group-compact .control-value {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 45px;
    white-space: nowrap;
}

.controls-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.btn-compact:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-compact:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Controls Toggle Button */
.controls-toggle-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 5;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(139, 92, 246, 0.9);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-btn:hover {
    background: rgba(139, 92, 246, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* Text Input Panel Styles */
.text-input-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.text-input-section textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
}

.text-input-section textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.text-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.text-option-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.text-option-group label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    min-width: 60px;
}

/* Forcer les styles pour text options contre user agent stylesheet */
.text-option-group input[type="range"] {
    flex: 1 !important;
    height: 4px !important;
    background: rgba(255, 255, 255, 0.3) !important;
    border-radius: 2px !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    cursor: pointer !important;
    border: none !important;
    padding: 0 !important;
    margin: 8px 0 !important;
    box-shadow: none !important;
}

/* Rendre le track visible pour text options */
.text-option-group input[type="range"]::-webkit-slider-track {
    background: rgba(255, 255, 255, 0.3) !important;
    border: none !important;
    height: 6px !important;
    border-radius: 3px !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
}

.text-option-group input[type="range"]::-moz-range-track {
    background: rgba(255, 255, 255, 0.3) !important;
    border: none !important;
    height: 6px !important;
    width: 0 !important;
    box-shadow: none !important;
    -moz-appearance: none !important;
}

/* Supprimer TOUS les pseudo-éléments pour text options */
.text-option-group input[type="range"]::-webkit-slider-runnable-track {
    background: transparent !important;
    border: none !important;
    height: 0 !important;
    -webkit-appearance: none !important;
}

.text-option-group input[type="range"]::-ms-track {
    background: transparent !important;
    border: none !important;
    height: 0 !important;
}

.text-option-group input[type="range"]::-ms-fill-lower {
    background: transparent !important;
}

.text-option-group input[type="range"]::-ms-fill-upper {
    background: transparent !important;
}

/* Thumb minimaliste pour text options */
.text-option-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: none;
}

.text-option-group input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: none;
}

.text-option-group input[type="color"] {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.text-option-group span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    min-width: 40px;
    text-align: right;
}

.text-confirm-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.text-confirm-btn:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

/* Controls Tabs */
.controls-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 4px;
}

.control-tab {
    flex: 1;
    padding: 0.5rem 1rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-tab.active {
    background: rgba(59, 130, 246, 0.8);
    color: white;
}

.control-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

/* Text Controls Specific Styles */
.control-group-compact.full-width {
    grid-template-columns: 70px 1fr;
    gap: 0.5rem;
}

.control-group-compact.full-width textarea {
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: inherit;
    font-size: 12px;
    resize: vertical;
}

.control-group-compact.full-width textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.control-group-compact input[type="color"] {
    width: 40px;
    height: 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: none;
}

/* Add Overlay Buttons Layout */
.add-overlay-btn {
    display: flex;
    gap: 0.5rem;
}

/* Delete Buttons */
.btn-delete {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.btn-delete:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.close-text-panel-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-text-panel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Fullscreen Button */
.fullscreen-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.fullscreen-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    background: rgba(1, 1, 1, 0.9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    flex-shrink: 0;
    flex-grow: 0;
}

.fullscreen-toggle-btn:hover {
    background: rgb(14, 14, 14);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Gestion des icônes plein écran */
.fullscreen-icon,
.exit-fullscreen-icon {
    transition: opacity 0.3s ease;
    display: inline-block;
    line-height: 1;
    font-size: 1.2rem;
    width: auto;
    height: auto;
    flex-shrink: 0;
}

/* S'assurer que les images emoji ne déforment pas le bouton */
.fullscreen-toggle-btn .emoji {
    width: 16px !important;
    height: 16px !important;
    display: inline-block;
}

.exit-fullscreen-icon.hidden {
    display: none;
}

/* Quand on est en plein écran, changer l'icône */
.viewer-container.fullscreen .fullscreen-icon {
    display: none;
}

.viewer-container.fullscreen .exit-fullscreen-icon {
    display: inline !important;
}

/* Set Initial View Button */
.set-initial-view-btn {
    position: absolute;
    top: 20px;
    left: 70px;
    z-index: 10;
    pointer-events: none;
}

.initial-view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    white-space: nowrap;
    pointer-events: auto;
}

.initial-view-toggle-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.initial-view-toggle-btn:active {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Download Button */
.download-btn {
    position: absolute;
    bottom: 20px;
    right: 20px; /* Légèrement plus près du bord pour laisser place au canvas */
    right: 20px;
    z-index: 5;
    pointer-events: none; /* Ne pas bloquer les événements tactiles du canvas */
}

.download-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    padding: 0 !important;
    background: rgba(34, 197, 94, 0.9);
    color: white;
    border: none;
    pointer-events: auto; /* Réactiver les événements seulement sur le bouton */
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
}

.download-toggle-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.download-toggle-btn:hover:not(:disabled) {
    background: rgba(34, 197, 94, 1);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.download-toggle-btn:disabled {
    background: rgba(107, 114, 128, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Fullscreen mode styles */
.viewer-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    border-radius: 0;
    /* Forcer le plein écran réel sur mobile */
    background: #000;
}

.viewer-container.fullscreen #viewer {
    height: 100vh;
    width: 100vw;
}

.viewer-container.fullscreen .viewer-header {
    display: none;
}

/* Styles spéciaux pour mobile en plein écran */
@media (max-width: 768px) {
    .viewer-container.fullscreen {
        /* Utiliser les unités dvh pour le viewport dynamique sur mobile */
        height: 100dvh;
        min-height: 100vh;
        /* Forcer l'affichage au-dessus de tout */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
    }
    
    .viewer-container.fullscreen #viewer {
        height: 100dvh;
        min-height: 100vh;
        width: 100vw;
    }
    
    /* S'assurer que le canvas a la priorité pour les événements tactiles */
    #viewer {
        pointer-events: auto;
        touch-action: manipulation; /* Permettre tous les gestes natifs sur le canvas */
    }
    
    /* Permettre le zoom de page sur le body */
    body {
        touch-action: manipulation; /* Permettre le zoom de page */
    }
    
    /* Repositionner les boutons sur mobile */
    .download-btn {
        top: 20px;
        right: 10px; /* Légèrement plus près du bord pour laisser place au canvas */
        bottom: auto;
        left: auto;
    }
    
    .viewer-container.fullscreen .fullscreen-btn {
        top: 20px;
    }
    
    .viewer-container.fullscreen .set-initial-view-btn {
        top: 20px;
    }
    
    .viewer-container.fullscreen .controls-toggle-btn {
        bottom: 80px;
    }
    
    .viewer-container.fullscreen .add-overlay-btn {
        bottom: 120px;
    }
    
    /* En plein écran, garder le bouton télécharger dans le coin en haut à droite */
    .viewer-container.fullscreen .download-btn {
        top: 20px;
        right: 10px; /* Aligné avec la position normale */
    }
}

.export-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}

.export-loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.export-text {
    font-size: 1.5em;
    margin-bottom: 10px;
    font-weight: 500;
}

.export-subtext {
    font-size: 1em;
    opacity: 0.8;
    text-align: center;
    max-width: 400px;
}

.status {
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.hidden {
    display: none;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--neutral-900);
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 0.9rem;
    color: var(--neutral-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Capabilities Section */
.capabilities-section {
    padding: 60px 0 4rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    width: 100vw; /* Prendre toute la largeur de l'écran */
    margin-left: calc(-50vw + 50%); /* Centrer et étendre sur toute la largeur */
}

.capabilities-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.capability-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--neutral-200);
    position: relative;
    overflow: hidden;
}

.capability-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06d6a0);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.capability-card:hover::before {
    opacity: 1;
}

.capability-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.capability-card.primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.capability-card.primary .capability-icon {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.capability-card.primary p {
    color: rgba(255, 255, 255, 0.8);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.capability-icon {
    width: 48px;
    height: 48px;
    background: var(--neutral-100);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.capability-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin: 0;
}

.capability-card.primary h3 {
    color: white;
}

.capability-card p {
    color: var(--neutral-600);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.capability-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.feature-tag {
    background: var(--neutral-100);
    color: var(--neutral-700);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.capability-card.primary .feature-tag {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

/* Workflow Section */
.workflow-section {
    padding: 80px 0 2rem 0;
    background: white;
    width: 100vw; /* Prendre toute la largeur de l'écran */
    margin-left: calc(-50vw + 50%); /* Centrer et étendre sur toute la largeur */
}

.workflow-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 3rem;
}

.workflow-steps {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.workflow-step {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.step-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.8rem;
}

.step-content p {
    color: var(--neutral-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.step-visual {
    width: 100%;
    height: 80px;
    background: var(--neutral-50);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.upload-demo {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #e2e8f0 25%, transparent 25%), 
                linear-gradient(-45deg, #e2e8f0 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #e2e8f0 75%), 
                linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    position: relative;
}

.upload-demo::after {
    content: '↑';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--primary);
    animation: bounce 2s infinite;
}

.edit-demo {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, #3b82f6 2px, transparent 2px),
                radial-gradient(circle at 70% 70%, #8b5cf6 2px, transparent 2px),
                radial-gradient(circle at 50% 20%, #06d6a0 2px, transparent 2px);
    background-size: 30px 30px;
    animation: editFloat 3s ease-in-out infinite;
}

.export-demo {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    position: relative;
}

.export-demo::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: white;
    animation: checkPulse 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, -50%) translateY(0); }
    40% { transform: translate(-50%, -50%) translateY(-10px); }
    60% { transform: translate(-50%, -50%) translateY(-5px); }
}

@keyframes editFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

@keyframes checkPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

.info-section {
    padding: 5rem 0;
    background: var(--neutral-50);
}

.info-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.info-icon {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
}

.info-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 0.8rem;
}

.info-card p {
    color: var(--neutral-600);
    line-height: 1.6;
}

.features-section {
    background: white;
    width: 100vw; /* Prendre toute la largeur de l'écran */
    margin-left: calc(-50vw + 50%); /* Centrer et étendre sur toute la largeur */
}

.seo-features-section {
    background: white;
    width: 100vw; /* Prendre toute la largeur de l'écran */
    margin-left: calc(-50vw + 50%);
}

.features-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.features-header {
    text-align: center;
    margin-bottom: 3rem;
}

.features-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.8rem;
}

.features-header p {
    font-size: 0.95rem;
    color: var(--neutral-600);
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    width: 100%;
    max-width: 500px;
}

.feature-number {
    flex-shrink: 0;
    width: 2.2rem;
    height: 2.2rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1;
    text-align: center;
}

.feature-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 0.4rem;
}

.feature-content p {
    color: var(--neutral-600);
    line-height: 1.6;
}

/* Footer styles supprimés - utilisation du footer WordPress */

/* Grands écrans - Réduire légèrement le visual */
@media (max-width: 1400px) {
    .visual-container {
        width: 350px;
        height: 350px;
    }
    
    .visual-sphere {
        width: 180px;
        height: 180px;
    }
    
    .ring-1 {
        width: 220px;
        height: 220px;
        top: -110px;
        left: -110px;
    }
    
    .ring-2 {
        width: 270px;
        height: 270px;
        top: -135px;
        left: -135px;
    }
    
    .ring-3 {
        width: 320px;
        height: 320px;
        top: -160px;
        left: -160px;
    }
}

/* Écrans moyens - Réduction supplémentaire */
@media (max-width: 1200px) {
    .visual-container {
        width: 320px;
        height: 320px;
    }
    
    .visual-sphere {
        width: 160px;
        height: 160px;
    }
    
    .ring-1 {
        width: 200px;
        height: 200px;
        top: -100px;
        left: -100px;
    }
    
    .ring-2 {
        width: 240px;
        height: 240px;
        top: -120px;
        left: -120px;
    }
    
    .ring-3 {
        width: 280px;
        height: 280px;
        top: -140px;
        left: -140px;
    }
}

/* Tablette - Centrer les éléments du hero */
@media (max-width: 1025px) {
    .hero-content {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-subtitle {
        max-width: 100%;
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-badge {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 1024px) {
    .nav-menu {
        display: none;
    }

    .nav-mobile {
        display: block;
    }

    .hero-section {
        grid-template-columns: 1fr;
        min-height: 100vh;
        padding: 120px 1rem 60px 1rem; /* Padding réduit pour mobile */
        margin-left: calc(-50vw + 50%); /* Maintenir l'extension pleine largeur */
        width: 100vw;
        overflow-x: hidden; /* Empêcher le débordement horizontal */
    }
    
    .panorama-360-studio-page {
        margin-top: 0;
        padding-top: 0;
        overflow-x: hidden; /* Empêcher le débordement horizontal */
    }
    
    .hero-content {
        padding: 0 1rem;
        margin: 0;
        text-align: center;
        order: 2;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .hero-visual {
        order: 1;
        margin: 0 1rem 2rem 1rem;
        max-width: calc(100% - 2rem);
        box-sizing: border-box;
    }
    
    .visual-container {
        width: 300px;
        height: 300px;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .seo-features-section .section-header h2 {
        font-size: 1.6rem;
        line-height: 1.3;
        padding: 0 1rem;
    }
    
    .title-sub {
        font-size: 1.3rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }
    
    .cta-primary, .cta-secondary {
        width: 100%;
        max-width: 280px;
        text-align: center;
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .visual-container {
        width: 250px;
        height: 250px;
    }
    
    .visual-sphere {
        width: 150px;
        height: 150px;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    #viewer {
        height: 65vh;
        min-height: 500px;
    }
    
    .viewer-container {
        min-height: 50vh;
    }
}

/* Media query pour très petits écrans (smartphones en portrait) */
@media (max-width: 480px) {
    .hero-section {
        padding: 100px 0.5rem 40px 0.5rem;
    }
    
    .hero-content {
        padding: 0 0.5rem;
        margin: 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .title-sub {
        font-size: 1.1rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .visual-container {
        width: 200px;
        height: 200px;
    }
    
    .visual-sphere {
        width: 120px;
        height: 120px;
    }
    
    .capabilities-grid {
        grid-template-columns: 1fr;
    }
    
    .workflow-step {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    
    .step-number {
        margin: 0 auto;
    }

    .features-header h2 {
        font-size: 1.5rem;
    }
    
    .seo-features-section .section-header h2 {
        font-size: 1.4rem;
        line-height: 1.3;
        padding: 0 1rem;
    }

    .feature-item {
        flex-direction: column;
        text-align: center;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .upload-section, .logo-controls {
        padding: 1.5rem;
    }
    
    .capabilities-container {
        padding: 0 1.5rem;
    }

    .workflow-container {
        padding: 0 1.5rem;
    }

    .app-header {
        margin: 0 1rem 2rem 1rem;
        padding: 1.5rem;
    }
}

/* Correction pour très petits écrans - éviter le débordement */
@media (max-width: 385px) {
    .hero-section {
        padding: 100px 0.75rem 40px 0.75rem;
        overflow-x: hidden;
    }
    
    .hero-content {
        padding: 0 0.75rem;
        margin: 0;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .hero-title {
        font-size: 1.5rem;
        word-break: break-word;
    }
    
    .title-sub {
        font-size: 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
        word-break: break-word;
    }
    
    .hero-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        max-width: calc(100% - 1.5rem);
    }
    
    .hero-cta {
        width: 100%;
        padding: 0;
    }
    
    .cta-primary,
    .cta-secondary {
        width: 100%;
        max-width: 100%;
        font-size: 0.85rem;
        padding: 0.65rem 1rem;
    }
    
    .hero-stats {
        gap: 0.75rem;
        width: 100%;
    }
    
    .stat-item {
        flex: 1;
        min-width: 0;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .visual-container {
        width: 160px;
        height: 160px;
    }
    
    .visual-sphere {
        width: 90px;
        height: 90px;
    }
    
    .ring-1 {
        width: 120px;
        height: 120px;
        top: -60px;
        left: -60px;
    }
    
    .ring-2 {
        width: 140px;
        height: 140px;
        top: -70px;
        left: -70px;
    }
    
    .ring-3 {
        width: 160px;
        height: 160px;
        top: -80px;
        left: -80px;
    }
    
    .element {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
    }
    
    /* Empêcher tout débordement horizontal */
    .panorama-360-studio-page,
    .hero-section,
    .hero-content,
    .hero-visual {
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    /* Sections modernes - éviter le débordement */
    .modern-features-section,
    .modern-features-container,
    .sections-wrapper {
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .modern-features-container {
        padding: 0 0.75rem;
    }
    
    .advantages-section,
    .functionalities-section {
        padding: 1.25rem;
        border-radius: 12px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .advantages-section h2,
    .functionalities-section h2 {
        font-size: 1.3rem;
        word-break: break-word;
    }
    
    .advantages-section p,
    .functionalities-section p {
        font-size: 0.85rem;
    }
    
    .advantage-card,
    .functionality-card {
        padding: 1.25rem;
        gap: 1rem;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .card-content h4 {
        font-size: 0.95rem;
        word-break: break-word;
    }
    
    .card-content p {
        font-size: 0.8rem;
        word-break: break-word;
        line-height: 1.4;
    }
    
    .card-number {
        width: 35px;
        height: 35px;
        font-size: 0.85rem;
    }
    
    .header-icon {
        width: 45px;
        height: 45px;
    }
    
    .header-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* ===== NOUVELLES SECTIONS MODERNES ===== */

.modern-features-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 5rem 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.modern-features-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.sections-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* ===== SECTION AVANTAGES ===== */

.advantages-section {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.advantages-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.header-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
}

.advantages-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
}

.advantages-section p {
    color: var(--neutral-600);
    font-size: 1.1rem;
}

.advantage-cards {
    display: grid;
    gap: 1.5rem;
}

.advantage-card {
    background: linear-gradient(135deg, #fefefe, #f8fafc);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.advantage-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.advantage-card:hover::before {
    transform: scaleX(1);
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
}

.advantage-card .card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.advantage-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 0.8rem;
}

.advantage-card p {
    color: var(--neutral-600);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ===== SECTION FONCTIONNALITÉS ===== */

.functionalities-section {
    background: linear-gradient(135deg, #1e293b, #334155);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    color: white;
}

.functionalities-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.functionalities-section .header-icon {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.functionalities-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.functionalities-section p {
    color: #cbd5e1;
    font-size: 1.1rem;
}

.functionality-cards {
    display: grid;
    gap: 1.5rem;
}

.functionality-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.functionality-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.card-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
}

.card-content {
    flex: 1;
}

.card-content .card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.card-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: #cbd5e1;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 1024px) {
    .sections-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .modern-features-container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .modern-features-section {
        padding: 3rem 0;
    }
    
    .advantages-section,
    .functionalities-section {
        padding: 2rem;
        border-radius: 16px;
    }
    
    .sections-wrapper {
        gap: 2rem;
    }
    
    .advantages-section h2,
    .functionalities-section h2 {
        font-size: 1.6rem;
    }
    
    .header-icon {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .modern-features-container {
        padding: 0 1rem;
    }
    
    .advantages-section,
    .functionalities-section {
        padding: 1.5rem;
    }
    
    .advantage-card,
    .functionality-card {
        padding: 1.5rem;
    }
    
    .functionality-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .card-number {
        margin: 0 auto;
    }
}

/* ===== RESPONSIVE DESIGN POUR L'ÉDITEUR PANORAMA 360 ===== */

/* Tablettes et écrans moyens */
@media (max-width: 1024px) {
    .viewer-controls {
        min-width: 260px;
        padding: 1.2rem;
    }
    
    .control-group-compact {
        grid-template-columns: 60px 1fr 35px;
        gap: 0.4rem;
    }
    
    .control-group-compact label {
        font-size: 0.75rem;
    }
}

/* Smartphones en paysage */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .app-header {
        margin: 0 auto 1.5rem auto;
        padding: 1rem 1.5rem;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .nav-links {
        display: none; /* Masquer les liens de navigation sur mobile */
    }
    
    /* Réorganiser les boutons sur mobile */
    .add-overlay-btn {
        bottom: 80px; /* Plus haut pour éviter les conflits */
        left: 10px;
        right: 10px;
        display: flex;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .overlay-btn {
        flex: 1;
        max-width: 150px;
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* Repositionner les boutons sur la même ligne que le télécharger sur mobile */
    .fullscreen-btn {
        top: 10px;
        right: 110px; /* À gauche du bouton définir point de vue */
    }
    
    .set-initial-view-btn {
        top: 10px;
        right: 60px; /* À gauche du bouton télécharger */
    }
    
    .initial-view-toggle-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        gap: 6px;
    }
    
    .initial-view-toggle-btn span {
        display: block; /* Afficher le texte sur mobile */
    }
    
    .download-btn {
        top: 10px;
        right: 10px;
        bottom: auto;
    }
    
    /* Repositionner la fenêtre de personnalisation sur mobile */
    .viewer-controls {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 1000;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    
    .viewer-controls.show {
        transform: translateX(0);
    }
    
    /* Repositionner le bouton de personnalisation sur mobile */
    .controls-toggle-btn {
        top: 10px;
        right: 160px; /* À gauche des autres boutons */
    }
    
    /* S'assurer que les éléments restent visibles dans le viewer pour l'export */
    #viewer * {
        pointer-events: auto;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Pendant l'export, s'assurer que tous les éléments sont dans leur état normal */
    .export-overlay:not(.hidden) ~ * #viewer * {
        transform: none !important;
        filter: none !important;
        display: block !important;
    }
    
    /* Ajouter des instructions tactiles sur mobile */
    .touch-instructions {
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 0.8rem 1rem;
        border-radius: 8px;
        font-size: 0.8rem;
        max-width: 200px;
        z-index: 10;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        transition: opacity 0.3s ease;
    }
    
    .touch-instructions.fade-out {
        opacity: 0;
        pointer-events: none;
    }
    
    .touch-instructions h4 {
        margin: 0 0 0.5rem 0;
        font-size: 0.9rem;
        color: #3b82f6;
    }
    
    .touch-instructions ul {
        margin: 0;
        padding-left: 1rem;
        list-style: none;
    }
    
    .touch-instructions li {
        margin-bottom: 0.3rem;
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    .touch-instructions li:before {
        content: "👆 ";
        margin-right: 0.3rem;
    }
    
    .controls-header {
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 1.5rem;
    }
    
    .controls-header h4 {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .close-controls-btn {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 32px;
        height: 32px;
        font-size: 1.8rem;
    }
    
    .controls-tabs {
        margin: 0 1rem 2rem 1rem;
        padding: 6px;
    }
    
    .control-tab {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .controls-grid-compact {
        padding: 0 1rem;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .control-group-compact {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        background: rgba(255, 255, 255, 0.05);
        padding: 1rem;
        border-radius: 12px;
    }
    
    .control-group-compact label {
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    .control-group-compact .control-value {
        justify-self: center;
        font-size: 0.85rem;
        padding: 4px 12px;
        border-radius: 6px;
        background: rgba(59, 130, 246, 0.2);
        color: #3b82f6;
        font-weight: 700;
    }
    
    .control-group-compact.full-width textarea {
        min-height: 80px;
        font-size: 14px;
        padding: 0.8rem;
    }
    
    .controls-actions {
        padding: 0 1rem 2rem 1rem;
    }
    
    .btn-delete {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        border-radius: 12px;
    }
    
    /* Boutons de suppression flottants pour mobile - en dessous de la ligne de boutons */
    .mobile-delete-buttons {
        position: absolute;
        top: 80px; /* En dessous de la ligne de boutons (10px + hauteur bouton + gap) */
        right: 10px; /* Aligné avec le bouton télécharger */
        display: flex;
        flex-direction: column;
        gap: 1rem;
        z-index: 5; /* Même z-index que le bouton télécharger */
        transition: all 0.3s ease;
        pointer-events: none; /* Ne pas bloquer les événements tactiles du canvas */
    }
    
    /* En plein écran, garder les boutons en dessous de la ligne de boutons */
    .viewer-container.fullscreen .mobile-delete-buttons {
        position: absolute;
        top: 80px;
        right: 10px; /* Aligné avec le bouton télécharger */
    }
    
    .mobile-delete-btn {
        width: 42px;
        height: 42px;
        border-radius: 8px;
        padding: 27px 17px;
        border: none;
        background: rgba(239, 68, 68, 0.9);
        color: white;
        font-size: 0.8rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        backdrop-filter: blur(10px);
        transition: all 0.3s ease;
        cursor: pointer;
        font-weight: 600;
        line-height: 1;
        pointer-events: auto; /* Réactiver les événements seulement sur les boutons */
    }
    
    .mobile-delete-btn .delete-icon {
        font-size: 1.4rem;
        line-height: 1;
        font-weight: 700;
    }
    
    .mobile-delete-btn .btn-label {
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        line-height: 1;
    }
    
    .mobile-delete-btn:hover {
        background: rgba(239, 68, 68, 1);
        transform: scale(1.1);
    }
    
    .mobile-delete-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }
    
    .mobile-delete-btn.hidden {
        display: none;
    }
}

/* Smartphones en portrait */
@media (max-width: 480px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 120px 1rem 60px 1rem;
    }
    
    .hero-visual {
        order: -1;
        padding: 2rem 1rem;
    }
    
    .visual-container {
        width: 280px;
        height: 280px;
        margin: 0 auto;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .app-header {
        padding: 0.8rem 1rem;
        margin-bottom: 1rem;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .logo .logo-icon {
        font-size: 1.2rem;
    }
    
    /* Viewer plus compact sur très petits écrans */
    #viewer {
        height: 60vh;
        min-height: 400px;
    }
    
    .viewer-container {
        min-height: 60vh;
    }
    
    /* Boutons encore plus compacts */
    .add-overlay-btn {
        bottom: 100px;
        left: 10px;
        right: 10px;
    }
    
    .overlay-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
        gap: 0.3rem;
    }
    
    .overlay-btn span:first-child {
        font-size: 1rem;
    }
    
    /* Boutons de contrôle plus petits */
    .fullscreen-toggle-btn,
    .toggle-btn,
    .download-toggle-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .fullscreen-toggle-btn {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
    }
    
    /* Panels d'upload plus compacts */
    .overlay-upload-panel {
        left: 5px;
        right: 5px;
        top: 60px;
        min-width: auto;
        width: calc(100% - 10px);
        padding: 1rem;
    }
    
    .panel-header h4 {
        font-size: 0.9rem;
    }
    
    .overlay-upload-panel .file-upload label {
        padding: 0.8rem;
        font-size: 0.85rem;
        min-height: 48px;
    }
    
    /* Contrôles de personnalisation optimisés pour très petits écrans */
    .viewer-controls {
        padding: 1rem !important;
    }
    
    .controls-header h4 {
        font-size: 1.1rem;
    }
    
    .control-group-compact {
        padding: 0.8rem;
    }
    
    .control-group-compact label {
        font-size: 0.85rem;
    }
    
    .text-input-section textarea {
        min-height: 50px; /* Réduire encore la hauteur */
        font-size: 14px;
        resize: vertical; /* Permettre le redimensionnement vertical seulement */
        max-height: 80px; /* Limiter la hauteur maximale */
    }
    
    .text-options {
        gap: 1rem;
    }
    
    /* Réorganiser les contrôles de texte sur mobile */
    .text-options {
        display: flex;
        flex-direction: row; /* Côte à côte sur mobile */
        gap: 0.75rem;
    }
    
    .text-option-group {
        flex: 1; /* Prendre la même largeur */
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 6px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .text-option-group label {
        font-size: 12px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.9);
        min-width: auto;
        text-align: center;
    }
    
    /* Remplacer le slider par un input number sur mobile */
    .text-option-group .text-size-input {
        width: 100% !important;
        height: 40px !important; /* Plus haut pour faciliter la saisie */
        background: rgba(255, 255, 255, 0.1) !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 8px !important;
        color: white !important;
        text-align: center !important;
        font-size: 16px !important; /* Plus gros pour mobile */
        font-weight: 600 !important;
        padding: 0 0.75rem !important;
        -webkit-appearance: none !important;
        -moz-appearance: textfield !important;
        appearance: none !important;
        /* Améliorer l'accessibilité tactile */
        touch-action: manipulation !important;
        user-select: text !important;
        -webkit-user-select: text !important;
        -moz-user-select: text !important;
    }
    
    .text-option-group .text-size-input:focus {
        outline: none !important;
        border-color: var(--primary) !important;
        background: rgba(59, 130, 246, 0.15) !important;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
    }
    
    .text-option-group .text-size-input:active {
        background: rgba(59, 130, 246, 0.2) !important;
    }
    
    /* Cacher les flèches du number input mais permettre la saisie */
    .text-option-group .text-size-input::-webkit-outer-spin-button,
    .text-option-group .text-size-input::-webkit-inner-spin-button {
        -webkit-appearance: none !important;
        margin: 0 !important;
    }
    
    /* Améliorer la sélection de texte sur mobile */
    .text-option-group .text-size-input::selection {
        background: rgba(59, 130, 246, 0.5) !important;
        color: white !important;
    }
    
    /* Rendre la barre visible sur mobile */
    .text-option-group input[type="range"]::-webkit-slider-track {
        background: rgba(255, 255, 255, 0.3) !important;
        height: 8px !important;
        border-radius: 4px !important;
        border: none !important;
    }
    
    .text-option-group input[type="range"]::-moz-range-track {
        background: rgba(255, 255, 255, 0.3) !important;
        height: 8px !important;
        border-radius: 4px !important;
        border: none !important;
    }
    
    /* Améliorer le thumb sur mobile */
    .text-option-group input[type="range"]::-webkit-slider-thumb {
        width: 20px !important;
        height: 20px !important;
        background: var(--primary) !important;
        border-radius: 50% !important;
        border: 2px solid white !important;
        cursor: pointer !important;
        -webkit-appearance: none !important;
    }
    
    .text-option-group input[type="range"]::-moz-range-thumb {
        width: 20px !important;
        height: 20px !important;
        background: var(--primary) !important;
        border-radius: 50% !important;
        border: 2px solid white !important;
        cursor: pointer !important;
        -moz-appearance: none !important;
    }
    
    /* Affichage de la valeur plus compact */
    .text-option-group span {
        font-size: 12px;
        font-weight: 600;
        color: var(--primary);
        text-align: center;
        padding: 0.2rem 0.4rem;
        background: rgba(59, 130, 246, 0.1);
        border-radius: 3px;
        border: 1px solid rgba(59, 130, 246, 0.2);
        min-height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Améliorer l'input couleur sur mobile */
    .text-option-group input[type="color"] {
        width: 100% !important;
        height: 35px !important;
        border-radius: 6px !important;
        border: 2px solid rgba(255, 255, 255, 0.2) !important;
        background: transparent !important;
        cursor: pointer !important;
        padding: 0 !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
    }
    
    .text-option-group input[type="color"]::-webkit-color-swatch-wrapper {
        padding: 0 !important;
        border: none !important;
        border-radius: 4px !important;
    }
    
    .text-option-group input[type="color"]::-webkit-color-swatch {
        border: none !important;
        border-radius: 4px !important;
    }
    
    /* Améliorer le panel de texte sur mobile */
    .text-input-panel {
        max-height: 70vh; /* Réduire la hauteur maximale */
        overflow-y: auto;
        padding: 1rem; /* Réduire le padding */
    }
    
    .text-input-panel .panel-header h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    /* Réduire l'espacement général */
    .text-input-section {
        gap: 0.75rem;
    }
    
    /* Améliorer le bouton de confirmation */
    .text-confirm-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        margin-top: 0.5rem;
    }
}

/* Très petits écrans (moins de 360px) */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .title-sub {
        font-size: 1.2rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .cta-primary,
    .cta-secondary {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .container {
        padding: 0 0.25rem;
    }
    
    .overlay-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
    }
    
    .overlay-btn span:first-child {
        font-size: 0.9rem;
    }
}

/* ===== AMÉLIORATIONS TACTILES POUR MOBILE ===== */

/* Améliorer la zone de touch sur les boutons mobiles */
@media (max-width: 768px) {
    .overlay-btn,
    .toggle-btn,
    .download-toggle-btn,
    .fullscreen-toggle-btn,
    .initial-view-toggle-btn {
        min-height: 44px; /* Taille minimale recommandée pour les touches mobiles */
        min-width: 44px;
    }
    
    /* Améliorer la visibilité des boutons sur mobile */
    .add-overlay-btn,
    .controls-toggle-btn,
    .download-btn,
    .fullscreen-btn,
    .set-initial-view-btn {
        opacity: 0.95;
    }
    
    /* Animation d'apparition des boutons après chargement du panorama */
    .add-overlay-btn.show,
    .controls-toggle-btn.show,
    .download-btn.show {
        animation: slideInUp 0.5s ease-out;
    }
    
    @keyframes slideInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 0.95;
            transform: translateY(0);
        }
    }
    
    /* Feedback tactile amélioré */
    .overlay-btn:active,
    .toggle-btn:active,
    .download-toggle-btn:active,
    .fullscreen-toggle-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* Améliorer la lisibilité des textes sur mobile */
    .import-content h3 {
        font-size: 1.3rem;
        line-height: 1.3;
    }
    
    .import-content p {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    /* Optimiser les sliders pour le tactile */
    .control-group-compact input[type="range"],
    .text-option-group input[type="range"] {
        height: 6px !important;
        margin: 12px 0 !important;
    }
    
    .control-group-compact input[type="range"]::-webkit-slider-thumb,
    .text-option-group input[type="range"]::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
        margin-top: -6px;
    }
    
    .control-group-compact input[type="range"]::-moz-range-thumb,
    .text-option-group input[type="range"]::-moz-range-thumb {
        width: 18px;
        height: 18px;
    }
}

/* Optimisations spécifiques pour les très petits écrans */
@media (max-width: 480px) {
    /* Réduire l'encombrement visuel */
    .hero-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Améliorer l'espacement des boutons */
    .add-overlay-btn {
        gap: 0.8rem;
    }
    
    .overlay-btn {
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    /* Messages d'état plus visibles sur mobile */
    .status {
        font-size: 0.9rem;
        padding: 0.8rem;
        border-radius: 8px;
        margin-top: 1rem;
    }
    
    /* Améliorer l'overlay d'export sur mobile */
    .export-overlay {
        padding: 2rem 1rem;
    }
    
    .export-text {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .export-subtext {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

/* Gestion de l'orientation mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 80px 1rem 40px 1rem;
        min-height: 100vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .title-sub {
        font-size: 1.3rem;
    }
    
    #viewer {
        height: 70vh;
        min-height: 350px;
    }
    
    .viewer-container {
        min-height: 70vh;
    }
    
    /* Boutons plus compacts en paysage */
    .add-overlay-btn {
        bottom: 10px;
        left: 10px;
        right: auto;
        width: auto;
    }
    
    .overlay-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* Mode sombre automatique pour les appareils qui le supportent */
@media (prefers-color-scheme: dark) {
    .panorama-import-overlay {
        background: rgb(30, 30, 30);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .import-content h3 {
        color: rgb(255, 255, 255);
    }
    
    .import-content p {
        color: rgba(255, 255, 255, 0.8);
    }
}