/* ==========================================
   WEDDING - Styles pour la blague mariage
   ========================================== */

:root {
    /* Married theme - Bleu romantique */
    --married-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --married-text: #ffffff;
    --married-accent: #ffd700;
    
    /* Divorced theme - Rouge dramatique */
    --divorced-bg: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --divorced-text: #ffffff;
    --divorced-accent: #ff6b6b;
    
    /* Complicated theme - Orange chaos */
    --complicated-bg: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --complicated-text: #2d3748;
    --complicated-accent: #ff8c00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
    -webkit-user-select: none;
    user-select: none;
}

/* Canvas pour les particules */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Container principal */
.app {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* États (married, divorced, complicated) */
.state {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                opacity 0.6s ease;
}

.state.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 10;
}

.state.prev {
    transform: translateX(-100%);
}

/* Thème married */
.state-married {
    background: var(--married-bg);
    color: var(--married-text);
}

/* Thème divorced */
.state-divorced {
    background: var(--divorced-bg);
    color: var(--divorced-text);
}

/* Thème complicated */
.state-complicated {
    background: var(--complicated-bg);
    color: var(--complicated-text);
}

/* Contenu centré */
.content {
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
}

/* Container photo */
.photo-container {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.state-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.state-photo.loaded {
    display: block;
}

.photo-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem;
}

.photo-placeholder small {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

/* Titre */
.title {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
}

/* Sous-titre */
.subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Compteur */
.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.time-block {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
}

.time-block:hover {
    transform: translateY(-5px);
}

.time-block .value {
    display: block;
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.state-married .value {
    color: var(--married-accent);
}

.state-divorced .value {
    color: var(--divorced-accent);
}

.state-complicated .value {
    color: var(--complicated-accent);
}

.time-block .label {
    display: block;
    font-size: clamp(0.75rem, 2vw, 1rem);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    font-weight: 500;
}

/* Hint pour le swipe */
.hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: clamp(0.875rem, 2.5vw, 1.125rem);
    opacity: 0.7;
    margin-top: 2rem;
    animation: pulse 2s infinite;
}

.hint .arrow {
    font-size: 1.5rem;
    font-weight: bold;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Bouton WhatsApp */
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    margin-top: 1.5rem;
}

.whatsapp-btn:hover {
    background: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn:active {
    transform: translateY(0);
}

.whatsapp-btn svg {
    width: 20px;
    height: 20px;
}

/* Navigation dots */
.navigation-dots {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 100;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.dot.active {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.3);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* Responsive - Mobile */
@media (max-width: 640px) {
    .content {
        padding: 0.75rem;
    }
    
    .photo-container {
        width: 200px;
        height: 200px;
        margin-bottom: 0.75rem;
        border-width: 3px;
    }
    
    .title {
        font-size: 2rem;
        margin-bottom: 0.25rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .countdown {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .time-block {
        padding: 0.75rem 0.5rem;
    }
    
    .time-block .value {
        font-size: 1.75rem;
        margin-bottom: 0.25rem;
    }
    
    .time-block .label {
        font-size: 0.7rem;
    }
    
    .hint {
        font-size: 0.8rem;
        margin-top: 1rem;
    }
    
    .whatsapp-btn {
        font-size: 0.875rem;
        padding: 0.75rem 1.25rem;
        margin-top: 1rem;
    }
    
    .navigation-dots {
        bottom: 1.5rem;
    }
}

/* Responsive - Petits écrans en hauteur (éviter le scroll) */
@media (max-width: 640px) and (max-height: 740px) {
    .content {
        padding: 0.5rem;
    }
    
    .photo-container {
        width: 180px;
        height: 180px;
        margin-bottom: 0.5rem;
    }
    
    .title {
        font-size: 1.75rem;
        margin-bottom: 0.25rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .countdown {
        gap: 0.4rem;
        margin-bottom: 0.75rem;
    }
    
    .time-block {
        padding: 0.6rem 0.4rem;
        border-radius: 12px;
    }
    
    .time-block .value {
        font-size: 1.5rem;
        margin-bottom: 0.2rem;
    }
    
    .time-block .label {
        font-size: 0.65rem;
    }
    
    .hint {
        font-size: 0.75rem;
        margin-top: 0.75rem;
    }
    
    .whatsapp-btn {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
        margin-top: 0.75rem;
    }
    
    .whatsapp-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .navigation-dots {
        bottom: 1rem;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}

/* Responsive - Petits mobiles */
@media (max-width: 380px) {
    .countdown {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .time-block {
        padding: 0.75rem 0.5rem;
    }
}

/* Animation de transition entre états */
.state.transitioning {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px) rotate(-2deg); }
    75% { transform: translateX(10px) rotate(2deg); }
}

/* Mode paysage mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .photo-container {
        width: 140px;
        height: 140px;
        margin-bottom: 0.5rem;
    }
    
    .title {
        font-size: 2rem;
        margin-bottom: 0.25rem;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .countdown {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .time-block {
        padding: 0.75rem 0.5rem;
    }
    
    .time-block .value {
        font-size: 1.5rem;
    }
    
    .time-block .label {
        font-size: 0.75rem;
    }
    
    .navigation-dots {
        bottom: 1rem;
    }
}