/* css/style.css */

/* Roboto Regular */
@font-face {
    font-family: 'Roboto';
    src: url('/fonts/roboto/Roboto-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Montserrat Regular */
@font-face {
    font-family: 'Montserrat';
    src: url('/fonts/Montserrat/Montserrat-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

html {
    color-scheme: dark;
}

body {
    background: #1C1B22;
    margin: 0;
    padding: 20px;
    font-family: 'Montserrat', 'Roboto', Tahoma, Verdana, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #e0e0e0;
    text-align: center;
    box-sizing: border-box;
}

#ip-display {
    font-family: 'Montserrat', 'Roboto', Tahoma, Verdana, Arial, sans-serif;
    font-size: clamp(1em, 3vw, 1.5em);
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
    letter-spacing: 0.1em;
    word-break: break-all;
    max-width: 90%;
}

#ip-display.visible {
    opacity: 1;
    visibility: visible;
}

#ip-display div {
    font-size: clamp(1.2em, 4vw, 2em);
    margin: 10px;
}

.container {
    text-align: center;
    color: #e0e0e0;
    max-width: 90%;
}

h1 {
    font-size: clamp(3em, 15vw, 6em);
    margin: 0;
    color: #ffffff;
}

h2 {
    font-size: clamp(1em, 4vw, 1.5em);
    margin: 10px 0;
    color: #95a5a6;
}

.btn {
    display: inline-block;
    padding: clamp(8px, 2vw, 10px) clamp(15px, 4vw, 20px);
    margin-top: 20px;
    font-size: clamp(0.9em, 2.5vw, 1em);
    color: #fff;
    background-color: #00ffb74f;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #00ffb776;
}

.warning-container {
    display: inline-block;
    margin: 0 auto;
    max-width: 90%;
}

.warning {
    color: #9f9e9e;
    font-size: clamp(0.75em, 2vw, 0.9em);
    margin-top: 20px;
    overflow: hidden;
    white-space: nowrap;
    border-right: 0.15em solid #9f9e9e;
    display: inline-block;
    width: 0;
    animation:
        typewriter 4s steps(60, end) forwards,
        blinkCaret 0.75s step-end infinite,
        hideCaret 0.5s 6s forwards;
    max-width: 100%;
}

@keyframes typewriter {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blinkCaret {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: #9f9e9e;
    }
}

@keyframes hideCaret {
    to {
        border-right-color: transparent;
    }
}

/* Media Queries pour les petits écrans */
@media screen and (max-width: 768px) {
    body {
        padding: 15px;
    }

    #ip-display {
        letter-spacing: 0.05em;
    }

    .warning {
        white-space: normal;
        border-right: none;
        animation: none;
        width: auto;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 10px;
    }

    h1 {
        margin-bottom: 10px;
    }

    .btn {
        width: 100%;
        max-width: 250px;
    }
}

/* Media Query pour les très grands écrans */
@media screen and (min-width: 1920px) {
    h1 {
        font-size: 7em;
    }

    #ip-display {
        font-size: 1.8em;
    }

    #ip-display div {
        font-size: 2.5em;
    }
}