/* Logo + texte dans le bouton */
.glass-content {
    position: relative;
    z-index: 4;
    color: var(--text);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    gap: 0;

    font-weight: 500;
    font-size: 24px;

    transition: gap 0.35s ease;
}

/* Logo caché par défaut */
.button-logo {
    width: 12px;
    height: 12px;
    opacity: 0;

    object-fit: contain;

    transition:
        width 0.35s ease,
        height 0.35s ease,
        opacity 0.25s ease,
        margin-top 0.35s ease;

    margin-top: 0;
}

/* Bouton Liquid Glass */

.main-buttons {
    display: flex;
    gap: 50px;
}

#menuButtons {
    gap: 50px;
    justify-content: center;
    align-items: center;
}

#menuButtons.hidden {
    display: none !important;
}

#menuButtons:not(.hidden) {
    display: flex;
}

.glass-button {
    --bg-color: rgba(255, 255, 255, 0.25);
    --highlight: rgba(255, 255, 255, 0.75);
    --text: #ffffff;

    position: relative;

    width: 200px;
    height: 80px;

    border: none;
    border-radius: 18px;

    cursor: pointer;
    overflow: hidden;

    background: transparent;

    transition:
        width 0.35s ease,
        height 0.35s ease,
        transform 0.2s ease;

    outline: none;
}

/* Boutons qui s'agrandissent */
.expand-on-hover:hover {
    width: 200px;
    height: 115px;
    transform: scale(1.05);
}

.expand-on-hover:hover .button-logo {
    width: 32px;
    height: 32px;
    opacity: 1;
    margin-top: 10px;
}

.expand-on-hover:hover .glass-content {
    gap: 10px;
}

/* Front */
@font-face {
    font-family: "Coolvetica";
    src: url("Fronts/Coolvetica Rg.otf") format("opentype");
}

* {
    font-family: "Coolvetica", sans-serif;
}
/* Liquid glass */
.glass-filter,
.glass-overlay,
.glass-specular {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

.glass-filter {
    z-index: 1;

    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);

    filter: url(#glass-distortion);
}

.glass-overlay {
    z-index: 2;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,0.22),
            rgba(255,255,255,0.08)
        );

    border: 1px solid rgba(255,255,255,0.18);
}

.glass-specular {
    z-index: 3;

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,0.35) 0%,
            rgba(255,255,255,0.10) 35%,
            rgba(255,255,255,0.02) 100%
        );

    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.45),
        inset 0 -1px 1px rgba(255,255,255,0.08),
        0 8px 32px rgba(0,0,0,0.18);
}

/* Dark mode styles */
@media (prefers-color-scheme: dark) {
  .glass-button {
    --bg-color: rgba(0, 0, 0, 0.25);
    --highlight: rgba(255, 255, 255, 0.15);
  }
}
body {
    margin: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Vidéo de fond */
#background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}
/* Window liquid glass */
.glass-modal {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(15px);
    background: rgba(0,0,0,0.3);
    z-index: 100;
}

.glass-modal.hidden {
    display: none;
}

.glass-modal-content {
    width: 400px;
    padding: 30px;
    border-radius: 25px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
}

.glass-modal-content input {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    color: white;
    outline: none;
    box-sizing: border-box;
}

.glass-modal-content input::placeholder {
    color: rgba(255,255,255,0.7);
}

.buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

#cancelBtn {
    transition: background 0.2s ease, color 0.2s ease;
}

#cancelBtn:hover {
    background: rgba(255, 0, 0, 0.25);
    border: 1px solid rgba(255, 80, 80, 0.4);
    color: #ffb0b0;
}

.buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    color: white;
    backdrop-filter: blur(10px);
    cursor: pointer;
}
#downloadBtn {
    transition: background 0.2s ease, color 0.2s ease;
}

#downloadBtn:hover {
    background: rgba(0, 255, 0, 0.25);
    border: 1px solid rgba(80, 255, 80, 0.4);
    color: #b0ffb0;
}
/* */
.glass-error {
    margin-top: 15px;
    padding: 12px 16px;

    border-radius: 12px;

    background: rgba(255, 80, 80, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border: 1px solid rgba(255, 100, 100, 0.25);

    color: white;
    text-align: center;

    animation: fadeIn 0.2s ease;
}

.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
