/* Configurateur de Piscines - Style Typeform moderne */

:root {
    --primary-color: #00575d;
    --secondary-color: #0ca9c1;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --border-color: #e2e8f0;
    --success-color: #48bb78;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    box-sizing: border-box;
}

/* Mode plein écran immersif */
.pool-configurator.pool-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    padding: 40px 20px 20px;
    background: linear-gradient(135deg, #f7fafc 0%, #e2e8f0 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    overflow-y: auto;
    z-index: 99999;
}

/* Logo Poolkit */
.pool-logo {
    text-align: center;
    padding: 20px 0 15px;
    z-index: 100;
}

.pool-logo img {
    height: 45px;
    width: auto;
}

/* Avatar Poolkit (emoji) */
.poolkit-avatar {
    text-align: center;
    margin-bottom: 20px;
}

.avatar-emoji {
    display: inline-block;
    font-size: 60px;
    animation: bounce 2s ease-in-out infinite;
}

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

/* Conteneur principal dans le mode fullscreen */
.pool-fullscreen .pool-configurator-content {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 90px; /* Espace pour les boutons fixes - réduit de moitié */
}

/* Barre de progression */
.pool-configurator-progress {
    max-width: 600px;
    margin: 0 auto 40px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 100px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    min-width: 50px;
    text-align: right;
}

/* Contenu des étapes */
.pool-configurator-content {
    min-height: 500px;
    position: relative;
}

.pool-step {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pool-step.active {
    display: block;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.step-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 15px;
    letter-spacing: -0.5px;
}

.step-subtitle {
    font-size: 18px;
    color: var(--text-light);
    margin: 0;
}

/* Grille des tailles de piscine */
.pool-sizes-grid,
.pool-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.pool-size-card,
.pool-option-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pool-size-card::before,
.pool-option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pool-size-card:hover,
.pool-option-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--secondary-color);
}

.pool-size-card:hover::before,
.pool-option-card:hover::before {
    transform: scaleX(1);
}

.pool-size-card.selected,
.pool-option-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 87, 93, 0.05), rgba(12, 169, 193, 0.05));
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pool-size-card.selected::before,
.pool-option-card.selected::before {
    transform: scaleX(1);
}

.pool-size-card.selected::after,
.pool-option-card.selected::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    animation: checkmark 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.card-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 10px;
}

.card-dimensions {
    font-size: 16px;
    color: var(--text-light);
    margin: 0 0 15px;
    font-weight: 500;
}

.card-description {
    font-size: 15px;
    color: var(--text-dark);
    margin: 0 0 20px;
    line-height: 1.6;
}

.card-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0;
}

.card-price-label {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 5px;
}

.card-products-list {
    margin: 20px 0;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
}

.card-products-list h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-products-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.card-products-list li {
    font-size: 14px;
    color: var(--text-dark);
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-products-list li::before {
    content: '•';
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 18px;
}

/* Options spécifiques */
.pool-option-card {
    display: flex;
    flex-direction: column;
}

.option-icon {
    font-size: 48px;
    margin-bottom: 15px;
    text-align: center;
}

.option-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.option-icon-small {
    font-size: 32px;
    flex-shrink: 0;
}

.option-info {
    flex: 1;
}

/* Récapitulatif */
.pool-summary {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
}

.summary-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.summary-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.summary-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item-name {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 500;
}

.summary-item-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-color);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0 0;
    margin-top: 20px;
    border-top: 3px solid var(--primary-color);
}

.summary-total-label {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.summary-total-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--secondary-color);
}

/* Formulaire de contact */
.pool-contact-form {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.pool-contact-form h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(12, 169, 193, 0.1);
}

/* Footer avec navigation - FIXÉ EN BAS - VERSION COMPACTE */
.pool-configurator-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 12px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}

.pool-price-display {
    background: transparent;
    color: var(--text-dark);
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.price-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.price-amount {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 2px;
    color: var(--primary-color);
}

.currency {
    font-size: 14px;
}

.pool-navigation {
    display: flex;
    gap: 10px;
}

/* Boutons - Plus petits et modernes */
.pool-btn {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.pool-btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 87, 93, 0.2);
}

.pool-btn-primary:hover {
    background: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(12, 169, 193, 0.3);
    transform: translateY(-1px);
}

.pool-btn-primary:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

.pool-btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.pool-btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Spinner de chargement */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modal de succès */
.pool-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.pool-modal-content {
    background: white;
    padding: 50px;
    border-radius: 16px;
    text-align: center;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 25px;
    animation: checkmark 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.pool-modal-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 15px;
}

.pool-modal-content p {
    font-size: 18px;
    color: var(--text-dark);
    margin: 0 0 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .pool-fullscreen {
        padding: 15px 15px;
    }

    .pool-fullscreen .pool-configurator-content {
        padding-bottom: 100px; /* Espace pour le footer mobile */
        overflow-x: hidden; /* Empêcher le défilement horizontal */
    }

    .pool-logo img {
        height: 35px;
    }

    .step-header {
        overflow: hidden;
        padding: 0 5px;
        margin-bottom: 30px;
    }

    .step-title {
        font-size: 24px;
        line-height: 1.3;
    }

    .step-subtitle {
        font-size: 15px;
        line-height: 1.5;
    }

    .pool-sizes-grid,
    .pool-options-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pool-configurator-footer {
        padding: 10px 15px;
        flex-direction: row;
        justify-content: space-between;
        gap: 12px;
    }

    .pool-price-display {
        text-align: left;
    }

    .price-amount {
        font-size: 16px;
    }

    .currency {
        font-size: 12px;
    }

    .price-label {
        font-size: 9px;
    }

    .pool-navigation {
        gap: 8px;
    }

    .pool-btn {
        padding: 7px 14px;
        font-size: 12px;
    }

    .pool-summary,
    .pool-contact-form {
        padding: 20px;
    }

    .avatar-emoji {
        font-size: 48px;
    }

    .pool-configurator-progress {
        max-width: 100%;
        padding: 0 10px;
    }

    .pool-lead-form {
        padding: 25px 20px;
        margin-top: 30px;
    }
}

/* Animation au survol des cartes */
.pool-size-card,
.pool-option-card {
    animation: cardAppear 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.pool-size-card:nth-child(1),
.pool-option-card:nth-child(1) {
    animation-delay: 0.1s;
}

.pool-size-card:nth-child(2),
.pool-option-card:nth-child(2) {
    animation-delay: 0.2s;
}

.pool-size-card:nth-child(3),
.pool-option-card:nth-child(3) {
    animation-delay: 0.3s;
}

.pool-size-card:nth-child(4),
.pool-option-card:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== POOLKIT SPECIFIC STYLES ===== */

/* Formulaire de lead (étape 0) */
.pool-lead-form {
    max-width: 500px;
    margin: 50px auto 0;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out 2.5s both;
}

.pool-lead-form .form-group {
    margin-bottom: 25px;
}

.pool-lead-form input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.pool-lead-form input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(12, 169, 193, 0.1);
}

.privacy-note {
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
    margin-top: 20px;
}

/* Effet Typewriter */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    animation: blink-caret 0.75s step-end infinite;
    display: inline-block;
    max-width: 100%;
}

/* Le sous-titre doit pouvoir passer à la ligne */
.step-subtitle.typewriter {
    display: block;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Sur mobile, permettre aux titres de passer à la ligne aussi */
@media (max-width: 768px) {
    .step-title.typewriter {
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        display: block;
        width: 100%;
    }

    .step-subtitle.typewriter {
        width: 100%;
    }
}

.typewriter.typing-complete {
    border-right: none;
    animation: none;
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--primary-color);
    }
}

/* Formulaire final amélioré */
.form-intro {
    text-align: center;
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 25px;
}
