* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
    background: #02060d;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: manipulation;
}


/* =========================================
   APPLICATION MOBILE CENTRÉE
========================================= */

#lightScreen {
    position: relative;

    width: 100%;
    height: 100dvh;

    max-width: 430px;

    overflow: hidden;

    background: #1677ff;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    transition:
        background-color 0.8s ease,
        filter 0.5s ease;

    box-shadow:
        0 0 50px rgba(0, 0, 0, 0.6);
}


/* Lumière diffuse */

#lightScreen::before {
    content: "";

    position: absolute;

    inset: -20%;

    background:
        radial-gradient(
            circle at center,
            rgba(255,255,255,0.18),
            transparent 60%
        );

    pointer-events: none;
}


/* =========================================
   MINUTEUR
========================================= */

#timerDisplay {
    position: absolute;

    top: 25px;
    left: 50%;

    transform: translateX(-50%);

    color: rgba(255,255,255,0.9);

    font-size: 22px;

    font-weight: bold;

    letter-spacing: 2px;

    z-index: 20;
}


/* =========================================
   BARRE DU BAS
========================================= */

#controlBar {
    position: absolute;

    left: 10px;
    right: 10px;
    bottom: 10px;

    height: 82px;

    padding: 7px;

    display: flex;

    align-items: center;
    justify-content: space-around;

    gap: 5px;

    border-radius: 22px;

    background:
        rgba(5, 26, 57, 0.82);

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    box-shadow:
        0 10px 30px rgba(19, 18, 18, 0.35);

    z-index: 30;

    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
}


/* =========================================
   BOUTONS
========================================= */

.controlButton {
    width: 20%;
    height: 68px;

    padding: 4px;

    border: none;
    border-radius: 14px;

    background: transparent;

    color: rgb(1, 2, 15);

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 5px;

    cursor: pointer;
}

.controlButton:active {
    transform: scale(0.90);

    background:
        rgba(255,255,255,0.12);
}

.controlButton img {
    width: 30px;
    height: 30px;

    object-fit: contain;

    display: block;
}

.controlButton span {
    font-size: 9px;

    line-height: 1;

    white-space: nowrap;
}


/* =========================================
   PANELS
========================================= */

.panel {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(0,0,0,0.38);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    z-index: 50;
}

.hidden {
    display: none;
}


/* =========================================
   BOÎTE
========================================= */

.panelBox {
    width: 100%;
    max-width: 360px;

    padding: 25px;

    border-radius: 25px;

    background:
        rgba(7,20,38,0.97);

    color: white;

    text-align: center;

    box-shadow:
        0 20px 50px rgba(0,0,0,0.5);
}

.panelBox h2 {
    margin-bottom: 25px;

    font-size: 22px;
}


/* =========================================
   COULEURS
========================================= */

.colorChoices {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 15px;

    margin-bottom: 25px;
}

.colorChoice {
    width: 100%;
    height: 90px;

    border: 3px solid
        rgba(255,255,255,0.15);

    border-radius: 20px;

    cursor: pointer;
}

.colorChoice:active {
    transform: scale(0.94);
}


/* =========================================
   INTENSITÉ
========================================= */

#intensityValue {
    margin-bottom: 25px;

    font-size: 30px;

    font-weight: bold;
}

#intensityRange {
    width: 100%;

    margin-bottom: 30px;

    accent-color: #4da3ff;
}


/* =========================================
   MINUTEUR
========================================= */

#timerInput {
    width: 100%;
    height: 55px;

    margin-bottom: 15px;

    padding: 0 15px;

    border: none;
    border-radius: 14px;

    outline: none;

    background:
        rgba(255,255,255,0.10);

    color: white;

    font-size: 18px;

    text-align: center;
}

#timerInput::placeholder {
    color:
        rgba(255,255,255,0.50);
}


/* =========================================
   BOUTONS PANELS
========================================= */

.startTimer,
.stopTimer,
.closePanel,
.effectChoice {
    width: 100%;

    min-height: 50px;

    margin-top: 10px;

    padding: 10px;

    border: none;

    border-radius: 14px;

    color: white;

    background:
        rgba(255,255,255,0.10);

    font-size: 15px;

    cursor: pointer;
}

.startTimer {
    background:
        rgba(30,140,255,0.75);
}

.stopTimer {
    background:
        rgba(255,70,70,0.25);
}

.closePanel {
    margin-top: 20px;
}


/* =========================================
   EFFETS
========================================= */

.effectChoice.active {
    background:
        rgba(50,150,255,0.65);
}


/* =========================================
   PLEIN ÉCRAN
========================================= */

body.fullscreenMode #controlBar {
    opacity: 0;

    transform:
        translateY(120px);

    pointer-events: none;
}

body.fullscreenMode #timerDisplay {
    opacity: 0;
}


/* =========================================
   ANIMATION RESPIRATION
========================================= */

#lightScreen.effect-breathing {
    animation:
        breathing 5s ease-in-out infinite;
}

@keyframes breathing {

    0%,
    100% {
        filter: brightness(0.65);
    }

    50% {
        filter: brightness(1);
    }
}


/* =========================================
   ANIMATION FLUIDE
========================================= */

#lightScreen.effect-wave {
    animation:
        wave 8s ease-in-out infinite;
}

@keyframes wave {

    0% {
        filter:
            brightness(0.65)
            saturate(0.9);
    }

    50% {
        filter:
            brightness(1.05)
            saturate(1.15);
    }

    100% {
        filter:
            brightness(0.65)
            saturate(0.9);
    }
}


/* =========================================
   PULSATION
========================================= */

#lightScreen.effect-pulse {
    animation:
        pulse 3.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        filter: brightness(0.65);
    }

    50% {
        filter: brightness(1.10);
    }
}


/* =========================================
   PETITS TÉLÉPHONES
========================================= */

@media (max-width: 360px) {

    #controlBar {
        left: 6px;
        right: 6px;
        bottom: 6px;

        height: 75px;
    }

    .controlButton {
        height: 62px;
    }

    .controlButton img {
        width: 25px;
        height: 25px;
    }

    .controlButton span {
        font-size: 8px;
    }
}


/* =========================================
   MOBILE : VRAI PLEIN ÉCRAN
========================================= */

@media (max-width: 430px) {

    body {
        align-items: stretch;
    }

    #lightScreen {
        max-width: none;

        width: 100%;
        height: 100dvh;

        box-shadow: none;
    }
}