/* ============================================
   style.css - Festival Inscription
   Design moderne avec ambiance festive
   ============================================ */

/* ---------- RESET & BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(145deg, #1a0b2e 0%, #2d1b4e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    position: relative;
}

/* Effet de fond avec particules (optionnel) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(251, 191, 36, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ---------- CONTENEUR PRINCIPAL ---------- */
.container {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 40px;
    padding: 40px 35px;
    max-width: 820px;
    width: 100%;
    box-shadow:
        0 25px 50px -8px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.2);
    transition: 0.3s ease;
    position: relative;
    z-index: 1;
}

.container:hover {
    box-shadow:
        0 30px 60px -8px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(255, 215, 0, 0.25);
}

/* ---------- EN-TÊTE ---------- */
.header {
    text-align: center;
    margin-bottom: 35px;
}

.header .icon-fest {
    font-size: 48px;
    color: #fbbf24;
    margin-bottom: 8px;
    display: block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

.header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(251, 191, 36, 0.3);
}

.header h1 span {
    color: #fbbf24;
    position: relative;
}

.header h1 span::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #fbbf24, transparent);
    border-radius: 2px;
}

.header p {
    color: #c4b5d4;
    font-size: 16px;
    margin-top: 6px;
    letter-spacing: 0.3px;
}

/* ---------- MESSAGES ---------- */
.error-message {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.30);
    border-radius: 16px;
    padding: 14px 20px;
    color: #fca5a5;
    font-size: 14px;
    display: none;
    margin-bottom: 15px;
    animation: slideDown 0.4s ease;
}

.success-message {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.30);
    border-radius: 16px;
    padding: 18px 24px;
    color: #6ee7b7;
    text-align: center;
    font-weight: 500;
    font-size: 16px;
    display: none;
    margin-top: 20px;
    animation: slideDown 0.4s ease;
}

.error-message i,
.success-message i {
    margin-right: 12px;
    font-size: 18px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- FORMULAIRE ---------- */
form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Grille à 2 colonnes */
.row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Champs */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 14px;
    font-weight: 600;
    color: #e9dff5;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.field label i {
    color: #fbbf24;
    width: 18px;
    font-size: 15px;
}

.field label .required {
    color: #f87171;
    font-weight: 700;
    font-size: 16px;
}

.field input,
.field select,
.field textarea {
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 15px;
    color: #ffffff;
    transition: 0.3s ease;
    outline: none;
    font-family: inherit;
    width: 100%;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #9a8ab0;
    font-weight: 300;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    background: rgba(255, 255, 255, 0.09);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: #fbbf24;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.15);
    background: rgba(255, 255, 255, 0.10);
}

.field input:invalid:not(:placeholder-shown),
.field select:invalid:not(:placeholder-shown) {
    border-color: #f87171;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.1);
}

.field input:valid:not(:placeholder-shown) {
    border-color: #34d399;
}

.field textarea {
    resize: vertical;
    min-height: 70px;
}

/* Style pour le select */
.field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23fbbf24' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    cursor: pointer;
    padding-right: 45px;
}

.field select option {
    background: #2d1b4e;
    color: #fff;
    padding: 10px;
}

.field select option:hover {
    background: #3d2b5e;
}

/* ---------- ZONE D'UPLOAD PHOTO ---------- */
.upload-area {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.upload-area input[type="file"] {
    display: none;
}

.upload-btn {
    background: rgba(251, 191, 36, 0.12);
    border: 1.5px dashed #fbbf24;
    border-radius: 16px;
    padding: 14px 28px;
    color: #fbbf24;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.upload-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.1);
    transition: 0.5s ease;
    transform: translate(-50%, -50%);
}

.upload-btn:hover::before {
    width: 300px;
    height: 300px;
}

.upload-btn:hover {
    background: rgba(251, 191, 36, 0.20);
    border-color: #fcd34d;
    transform: scale(1.02);
}

.upload-btn:active {
    transform: scale(0.97);
}

.upload-btn i {
    font-size: 20px;
    position: relative;
    z-index: 1;
}

.upload-btn span {
    position: relative;
    z-index: 1;
}

#file-name {
    color: #c4b5d4;
    font-size: 14px;
    font-style: italic;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- BOUTON SOUMISSION ---------- */
.btn-submit {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: none;
    border-radius: 40px;
    padding: 18px 32px;
    font-size: 20px;
    font-weight: 700;
    color: #1a0b2e;
    cursor: pointer;
    transition: 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 10px;
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.25);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-submit::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s ease;
}

.btn-submit:hover::after {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(251, 191, 36, 0.40);
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
}

.btn-submit:active {
    transform: scale(0.97) translateY(0);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-submit i {
    font-size: 22px;
}

/* ---------- LIENS ---------- */
.field .help-text {
    color: #9a8ab0;
    font-size: 13px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.field .help-text i {
    color: #fbbf24;
    font-size: 12px;
}

/* ---------- SCROLLBAR PERSONNALISÉE ---------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #fcd34d;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .container {
        padding: 28px 18px;
        border-radius: 28px;
    }

    .row-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .header h1 {
        font-size: 26px;
    }

    .header .icon-fest {
        font-size: 38px;
    }

    .upload-area {
        flex-direction: column;
        align-items: stretch;
    }

    .upload-btn {
        justify-content: center;
    }

    #file-name {
        text-align: center;
        max-width: 100%;
    }

    .btn-submit {
        font-size: 17px;
        padding: 16px 20px;
    }

    .btn-submit i {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 12px;
        border-radius: 20px;
    }

    .field input,
    .field select,
    .field textarea {
        padding: 12px 14px;
        font-size: 14px;
    }

    .header h1 {
        font-size: 22px;
    }

    .header p {
        font-size: 14px;
    }

    .field label {
        font-size: 13px;
    }

    .btn-submit {
        font-size: 15px;
        padding: 14px 16px;
        border-radius: 30px;
    }

    .upload-btn {
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* ---------- ANIMATIONS ---------- */
/* Animation d'entrée du formulaire */
.container {
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation de chargement pour le bouton */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 0.8s linear infinite;
}

/* ---------- EFFET DE GLOW SUR LES CHAMPS ---------- */
.field input:focus,
.field select:focus,
.field textarea:focus {
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.15);
    }

    to {
        box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.25);
    }
}

/* ---------- ÉTAT DE CHARGEMENT ---------- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 11, 46, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: #fbbf24;
}

.loading-spinner i {
    font-size: 60px;
    animation: spin 1s linear infinite;
}

.loading-spinner p {
    margin-top: 20px;
    font-size: 18px;
    color: #e9dff5;
}

/* ---------- IMPRESSION ---------- */
@media print {
    body {
        background: white;
        padding: 20px;
    }

    .container {
        box-shadow: none;
        border: 1px solid #ddd;
        background: white;
    }

    .header h1 {
        color: #1a0b2e;
    }

    .header h1 span {
        color: #f59e0b;
    }

    .btn-submit {
        display: none;
    }

    .upload-btn {
        display: none;
    }

    .field input,
    .field select,
    .field textarea {
        border-color: #ddd;
        color: #333;
        background: #f9f9f9;
    }

    .field select option {
        color: #333;
        background: white;
    }

    .error-message,
    .success-message {
        display: none !important;
    }
}
/* Bouton Fiche */
.btn-small-edit {
    background: #4f46e5;
    color: white;
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.btn-small-edit:hover {
    background: #4338ca;
    transform: scale(1.05);
}

:root {
    --primary-color: #fbbf24;
    /* Jaune */
    --primary-dark: #f59e0b;
    /* Jaune foncé */
    --bg-dark: #1a0b2e;
    /* Fond sombre */
    --bg-card: #2d1b4e;
    /* Fond du card */
    --text-light: #e9dff5;
    /* Texte clair */
    --text-muted: #9a8ab0;
    /* Texte grisé */
    --border-color: rgba(255, 215, 0, 0.2);
}