/* =========================
   RESET & STYLES GLOBAUX
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    font-family: Arial, sans-serif;
    background-color: #2c2c2c;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden; /* Empêche le débordement dû au défilement */
    background-image: url('/BGpattern.jpg');
}

h3 {
    font-size: 3rem;
}

p {
    font-size: 1.5rem;
}

/* =========================
   STRUCTURE PRINCIPALE
   ========================= */
.container {
    display: flex;
    height: 100%;
    width: 100%;
    padding-top: 100px;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%; /* Double largeur pour accueillir deux images */
    height: 100%;
    display: flex;
    z-index: 1;
    opacity: 0;
    animation: slideBackground 20s linear 1s infinite, opacity 3s ease-in-out 1.5s forwards;
}

.background-container img {
    width: 50%;
    height: 100%;
    object-fit: cover;
}

/* =========================
   HEADER
   ========================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 20px;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(-120%);
    opacity: 0;
    transition: none;
    animation: header-slide-down 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.2s;
}

.logo {
    height: 90px;
    animation: candle-flicker 5s ease-in-out infinite;
}

/* =========================
   BOUTONS
   ========================= */
.button {
    position: relative;
    width: 80%;
    height: 80%;
    max-height: 800px;
    border-radius: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 32px 0 rgba(0,0,0,0.3);
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-120%);
    opacity: 0;
    animation: button-slide-down 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.8s;
}

.button:hover {
    box-shadow: 0 8px 64px 0 rgba(0,0,0,0.6);
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/emby.jpg');
    background-repeat: repeat-x;
    background-size: 1440px auto;
    z-index: 0;
    animation: defilement-bg 30s linear infinite;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

.button:hover::before {
    transform: scale(1.2);
}

.button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0);
    transition: background 0.5s ease;
    z-index: 1;
}

.button:hover::after {
    background: rgba(0,0,0,0.5);
}

.button .content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    opacity: 0;
    transform: translateY(30px);
    animation: button-content-fade-in 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 1.1s;
    text-shadow: 0 6px 32px rgba(0,0,0,0.95), 0 2px 8px rgba(0,0,0,0.7), 0 1px 0 #000;
}

.internal-button {
    position: relative;
    bottom: 100px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 10px 20px;
    margin-left: 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1rem;
    z-index: 1000;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    transform: translateY(120%);
    opacity: 0;
    animation: internal-button-slide-up 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 1.6s;
}

.internal-button:hover {
    color: #000;
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0px 0px 25px rgba(0, 0, 0, 1);
}

.paypal-button {
    display: inline-flex;
    height: 50px;
    border-radius: 25px;
    align-items: center;
    background-color: white;
    color: #0070ba;
    padding: 10px 20px;
    font-size: 20px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid #0070ba;
    transition: background-color 0.3s ease, color 0.3s ease;
    animation: paypal-jiggle 8s cubic-bezier(0.4, 0, 0.2, 1) 2s infinite;
}

.paypal-button:hover {
    background-color: #0070ba;
    color: white;
}

.paypal-logo {
    width: 80px;
    height: auto;
    margin-right: 20px;
}
/* =========================
   Barre d'icones
   ========================= */
.icon-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    padding: 20px 40px;
    border-radius: 100px;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 4px 32px 0 rgba(0,0,0,0.3);
    transition: box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(120%);
    opacity: 0;
    animation: internal-button-slide-up 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 1.3s;
}

.icon-bar .icon {
    width: 70px;
    height: 40px;
    transition: transform 0.2s;
}

.icon-bar a:hover .icon {
    transform: scale(1.2);
    filter: brightness(1.2);
}

.icon-bar:hover {
    box-shadow: 0 8px 64px 0 rgba(0,0,0,0.6);
}
/* =========================
   FORMULAIRES
   ========================= */
.form-container {
    position: relative;
    background-color: rgba(29, 29, 29, 0.95);
    padding: 50px;
    border-radius: 100px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    z-index: 2;
    transform: translateY(-120%);
    opacity: 0;
    animation: button-slide-down 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 1.2s;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-height: 900px; /* valeur initiale, à ajuster si besoin */
}

.form-container h1 {
    text-align: center;
    color: #ffffff;
}

.form-group {
    margin-bottom: 15px;
}

label {
    font-weight: bold;
}

input, select, textarea, button {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 25px;
}

textarea {
    resize: vertical;
}

button {
    background-color: #15bd39;
    color: #fff;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}

button:hover {
    background-color: #10882a;
}

/* =========================
   MESSAGES & CONFIRMATIONS
   ========================= */
.confirmation {
    text-align: center;
}

.confirmation button {
    width: auto;
    margin: 5px;
    padding: 10px 20px;
}

.error {
    text-align: center;
}

.error button {
    width: auto;
    margin: 5px;
    padding: 10px 20px;
}

.errorFetch {
    background-color: #dc011f;
    padding: 5px;
    color: white;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 10px;
    margin-top: 5px;
}

#responseMessageWrong {
    color: #dc011f;
}

.hidden {
    display: none;
}

.admin {
    position: fixed;
    bottom: 20px;
    right: 20px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    transition: color 0.3s ease;
    z-index: 3;
}

.admin:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* =========================
   ANIMATIONS
   ========================= */
@keyframes header-slide-down {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes button-slide-down {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes internal-button-slide-up {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes button-content-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes defilement-bg {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: -1440px 0;
    }
}

@keyframes paypal-jiggle {
    0%, 90%, 100% { transform: translateX(0) rotate(0); }
    92% { transform: translateX(-4px) rotate(-3deg); }
    94% { transform: translateX(6px) rotate(3deg); }
    96% { transform: translateX(-3px) rotate(-2deg); }
    98% { transform: translateX(2px) rotate(1deg); }
}

@keyframes candle-flicker {
    0%   { filter: brightness(1); }
    10%  { filter: brightness(0.85); }
    20%  { filter: brightness(1.1); }
    30%  { filter: brightness(0.8); }
    40%  { filter: brightness(1.15); }
    50%  { filter: brightness(0.9); }
    60%  { filter: brightness(1.2); }
    70%  { filter: brightness(0.8); }
    80%  { filter: brightness(1.1); }
    90%  { filter: brightness(0.95); }
    100% { filter: brightness(1); }
}

@keyframes slideBackground {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes opacity {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* =========================
   MEDIA QUERIES
   ========================= */
@media (max-width: 768px) {
    .paypal-text {
        display: none;
    }
    .paypal-logo {
        margin-right: 0;
    }
    /* Ajoutez ici vos styles responsives */
}