* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}


body {
    --transition-speed: 0.4s;
    --font-main: 'Nunito', sans-serif;
    --font-code: 'Fira Code', monospace;

    --bg-color: #4E342E;         /* Soft Brown */
    --text-color: #ECEFF1;       /* Soft White */
    --accent-color: #90CAF9;     /* Soft Blue */
    --secondary-color: #D7CCC8;  /* Light Brown accent */
    --input-bg: #3E2723;
    --code-color: rgba(255, 255, 255, 0.15);
    --shadow: 0 4px 6px rgba(0,0,0,0.3);
}
body[data-theme="light"] {
    --bg-color: #F8F9FA;         /* Soft White */
    --text-color: #546E7A;       /* Soft Blue Grey */
    --accent-color: #FFD54F;     /* Soft Golden */
    --secondary-color: #29B6F6;  /* Vivid Soft Blue */
    --input-bg: #ffffff;
    --code-color: rgba(0, 0, 0, 0.15);
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
}


#ide-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#flashlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), transparent 10%, var(--bg-color) 40%);
    opacity: 0.75;
    transition: background 0.1s ease;
}

#theme-switch {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    /*padding: 10px;*/
    z-index: 1000;
    background: transparent;
    border: 2px solid var(--text-color);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

#theme-switch svg {
    width: 80%;
    height: 80%;
    fill: currentColor; /* S'assure que l'icône prend la couleur du texte */
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centre verticalement si possible */
    z-index: 10;
    
    width: 100%;
    margin: 0 auto;
    padding-top: 80px;
    text-align: center;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: var(--shadow);
    opacity: 0;
    animation: fadeIn 1s ease forwards 0.5s;
}

#product-name {
    padding-top: 4%;
}

.description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    width: 60vw;
    max-width: 60vw;
    margin-bottom: 3rem;
    line-height: 1.6;
    opacity: 0;
    animation: fadeIn 1s ease forwards 0.8s;
}


.countdown-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5vw;
    margin: 20px 0 30px 0; /* Espacement vertical */
    font-family: var(--font-code);
    opacity: 0;
    animation: fadeIn 1s ease forwards 0.7s;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
    min-width: 60px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.time-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
    color: var(--text-color);
    opacity: 0.8;
}

.time-separator {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 300;
    opacity: 0.5;
    margin-top: -5px; /* Ajustement visuel léger */
}

/* Petit ajustement Mobile */
@media (max-width: 600px) {
    .countdown-container { gap: 0.25vw; }
    .time-value { font-size: 1.8rem; min-width: 40px; }
    .time-separator { font-size: 1.8rem; }
    .time-label { font-size: 0.6rem; }
}



.cta-container {
    width: 40vw;
    max-width: 40vw;
    display: flex;
    flex-direction: column;
    gap: 5vh;
    opacity: 0;
    animation: slideUp 0.8s ease forwards 1s;
}

@media (max-width: 600px) {
    .cta-container {
        width: 60vw;
        max-width: 60vw;
    }
    .description {
        width: 80vw;
        max-width: 80vw;
    }
}

#email-input {
    border: 1px black solid;
}

input[type="email"] {
    width: 100%;
    padding: 15px 20px;
    border-radius: 8px;
    border: 2px solid var(--text-color);
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    font-family: var(--font-main);
    outline: none;
    transition: all 0.3s ease;
}

input[type="email"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(0,0,0,0.1);
}

#cta-button {
    padding: 15px 30px;
    border-radius: 8px;
    border: none;
    background-color: var(--accent-color);
    color: var(--bg-color); /* Contrast text */
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    position: relative;
    overflow: hidden;
}

#cta-button:hover {
    transform: translateY(-2px);
    filter: brightness(110%);
}

#cta-button:active {
    transform: translateY(1px);
}

#feedback {
    /*height: 20px;*/
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: bold;
}

footer {
    height: 10vh;
    min-height: 10vh;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: rgba(0,0,0,0.1); /* Slight tint */
    backdrop-filter: blur(5px);
    z-index: 10;
    /*padding: 0 20px;*/
    font-size: 0.9rem;
    border-top: 0.25vh solid rgba(255,255,255,0.25);
}

footer a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

footer a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}


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

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

@keyframes blink {
    50% { opacity: 0; }
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: var(--accent-color);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}


@media (max-width: 600px) {
    footer {
        flex-direction: column;
        height: auto;
        min-height: auto;
        /*padding: 20px;*/
        gap: 10px;
    }

    h1 { margin-bottom: 1rem; }
}