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

.hidden {
    display: none !important;
}

html,
body {
    overflow: hidden;
}

body {
    font-family: "area-normal", sans-serif;
    background: white;
    width: 768px;
    height: 1024px;
    position: relative;
    margin: auto;
    color: #000;
    outline: 1px solid #eee;
}

.container {
    width: 768px;
    height: 1024px;

    margin: auto;
    position: relative;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

/* Page 1 - Accueil */
.home-title {
    font-size: 140px;
    font-weight: 600;
    line-height: 0.9;
    text-align: left;
}

.word-autre {
    filter: blur(4px);
    display: inline-block;
    transform-origin: left center;
}

.word-autre .letter {
    display: inline-block;
    transform: translateY(15px);
    opacity: 0.8;
}

/* Page 2 - Concept (ancien écran 3) */
#screen2 {
    background: black;
    color: white;
}

/* Page 3 - Conditions */
#screen3bis {
    padding: 30px;
}

.conditions-text {
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 80px;
    max-width: 600px;
}

.conditions-button {
    background: #333;
    color: white;
    border: none;
    position: relative;
    z-index: 10;
    border-radius: 50px;
    padding: 25px 50px;
    font-family: inherit;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.conditions-button:hover {
    background: #555;
}

/* Écran conditions complet */
.conditions-screen {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    padding: 35px;
    overflow-y: auto;
}

.conditions-content {
    background: white;
    max-width: 650px;
    font-size: 20px;
    line-height: 1.5;
    text-align: left;
}

.conditions-content h3 {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
}

.conditions-content p,
.conditions-content li {
    margin-bottom: 15px;
}

.conditions-content ul {
    margin: 20px 0;
    padding-left: 25px;
}

.conditions-buttons-screen--container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.conditions-buttons-screen {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 30px;
    width: 100%;
    max-width: 375px;
}

.conditions-button-screen {
    flex: 1;
    background: #333;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px;
    font-family: inherit;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.conditions-button-screen.accept {
    background: #4caf7a;
}

.conditions-button-screen:hover {
    opacity: 0.9;
}

/* Écran de refus */
#screenRefus {
    background: #333;
    color: white;
}

.refus-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.refus-text {
    font-size: 48px;
    text-align: center;
    line-height: 1.3;
    font-weight: normal;
}

/* Page 3 - Conditions (ancien écran 2) */

.intro-main-text {
    font-size: 48px;
    line-height: 1.3;
    text-align: center;
    border: 3px solid white;
    padding: 40px;
    border-radius: 0;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 20%;
    transform: translate(-10%, -50%);
    max-width: 600px;
}

.intro-sentences-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 48px;
    line-height: 1.5;
}

.intro-sentence {
    opacity: 0;
    transform: scale(0.8);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    white-space: nowrap;
}

/* Page 4 - Décompte */
.countdown-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.countdown {
    font-size: 300px;
    font-weight: bold;
    color: #000;
}

/* Page 5 - Webcam plein écran */
.webcam-fullscreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}



.face-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    z-index: 3;
    /*mix-blend-mode: soft-light;*/
}

.user-image-fullscreen {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    background: white;
}



.face-overlay--img {
    display: block;
    width: 100%;
    height: 100%;
    /* mix-blend-mode: multiply; */
}

.photo-capture-btn {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #4caf7a;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 20px 40px;
    font-family: inherit;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    z-index: 10;
    transition: all 0.3s ease;
}

.photo-capture-btn:hover {
    background: #39866a;
    transform: translateX(-50%) scale(1.05);
}

/* Page 6 - Photo validation plein écran */
.photo-validation {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.validation-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Boutons de validation écran 6 */
.validation-buttons {
    position: absolute;
    top: 75%;
    left: 30%;
    transform: translateX(-20%);
    display: flex;
    gap: 30px;
}

.validation-button {
    background: #333;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 20px 30px;
    font-family: inherit;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.validation-button.accept {
    background: #4caf7a;
}

.validation-button:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Page 7 - Sélection 3 photos */
.photos-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0;
}

.selection-text {
    font-size: 28px;
    margin-bottom: 40px;
    text-align: center;
    max-width: 600px;
}

.photos-grid {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 40px;
    width: 100%;
}

.photo-option {
    /*width: 33.333%;*/
    height: 400px;
    border: 4px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(50px);
}

.photo-option.selected {
    border-color: #E5395E;
}

.photo-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.validate-selection {
    background: #4caf7a;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 20px 40px;
    font-family: inherit;
    font-size: 24px;
    cursor: pointer;
}

/* Page 8 - Photo sélectionnée plein écran */

#screen8 {
    padding: 0;
}

.selected-photo-fullscreen {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.selected-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quote-overlay {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 30px;
    border-radius: 10px;
    font-size: 20px;
    text-align: center;
    max-width: 600px;
    line-height: 1.4;
}

/* Page 8b - Vidéo plein écran */
.video-fullscreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    /* Transparent pour crossfade */
}

.fullscreen-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    /* Start invisible for fade-in effect */
}

/* Améliorer le crossfade entre écrans */
#screen8b.active {
    background: transparent;
    z-index: 10;
    /* Au-dessus de l'écran 8 */
}

/* Page 8c - Animation révélation du dessin */
#screen8c {
    padding: 0;
}

#photos {
    position: relative;
    width: 768px;
    height: 1024px;
    background: white;
    overflow: hidden;
    margin: 0 auto;
}

/* Images superposées pour l'animation */
.image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    will-change: opacity;
}

.photo {
    transition: opacity var(--fade-duration, 2s) linear;
}

.mixed {
    mix-blend-mode: multiply;
}

.visible {
    opacity: 1;
}

.blur {
    filter: blur(1px);
}

/* Page 9 - Animation finale comme dans le PDF */
#screen9 {
    padding: 0;
}

.final-animation {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
}

#final-photos {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.final-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;

    opacity: 1;
}

.final-title-overlay {
    position: absolute;
    top: 25%;
    left: 30%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    font-weight: 600;
    line-height: 0.8;
    text-align: left;
    opacity: 0;
    z-index: 10;
}

.final-title-overlay .letter {
    display: inline-block;
    transform: translateY(20px);
    opacity: 0.7;
}

.small-photo-container {
    position: absolute;
    right: 100px;
    bottom: 150px;
    width: 200px;
    height: 260px;
    opacity: 0;
    z-index: 5;
}

.small-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Page 10 - Écran de don */
.donation-screen {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    position: relative;
    padding: 60px;
}

.donation-title {
    position: absolute;
    top: 20%;
    left: 23%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    font-weight: 600;
    line-height: 0.9;
    text-align: left;
    text-align: left;
}

.donation-icon {
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 170px;
}

.donation-question {
    position: absolute;
    bottom: 280px;
    width: 420px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 30px;
    text-align: center;
    line-height: 1.3;
}

.donation-thanks {
    position: absolute;
    bottom: 160px;
    left: 50%;
    width: 420px;
    transform: translateX(-50%);
    font-size: 30px;
    text-align: center;
    line-height: 1.3;
}

/* Bouton de test temporaire */
.next-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #E5395E;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    z-index: 1000;
}