.guest-upload-section {
    padding-block: clamp(3rem, 8vw, 5rem);
}

.guest-upload-inner {
    width: 90%;
    max-width: 32em;
    margin-inline: auto;
    text-align: center;
}

.guest-upload-inner h2 {
    font-family: var(--font-titre, var(--font-corps));
    color: var(--color-orange-clair);
    font-weight: 400;
    margin-bottom: 0.4em;
}

.guest-upload-inner > p {
    color: var(--color-texte);
    line-height: 1.7;
    margin-bottom: 2rem;
}

#guest-upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    text-align: left;
}

/* -------- Champ prénom (floating label) -------- */
.floating-label {
    position: relative;
    padding-top: 1.3rem;
}

#guest-upload-form .floating-label label {
    position: absolute;
    left: 0.2rem;
    top: 1.9rem;
    margin: 0;
    font-family: var(--font-corps);
    font-weight: 400;
    color: var(--color-texte);
    pointer-events: none;
    transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease;
    font-size: 16px;
    padding-bottom: 5px;
}

.required-asterisk {
    color: #C1443B;
    margin-left: 0.15rem;
}

#guest-name {
    width: 100%;
    border: none;
    border-bottom: 2px solid var(--color-sauge);
    border-radius: 10px;
    padding: 10px 0 9px 10px;
    font-family: inherit;
    font-weight: 400;
    font-size: 16px;
    color: var(--color-texte);
    box-shadow: none;
    appearance: none;
    background-color: transparent;
}

#guest-name:hover{
    outline: none;
    box-shadow: none;
}

#guest-name:active,
#guest-name:focus,
#guest-name:-moz-ui-invalid {
    outline: none;
    box-shadow: none;
    border-bottom-color: var(--color-orange-clair);
}

#guest-name:focus-visible{
    outline : 2px solid var(--color-terracotta);
    outline-offset: 1px;
}

#guest-name:focus{
    border-color: var(--color-terracotta);
    color: var(--color-texte);
}

#guest-name:focus ~ label,
#guest-name:not(:placeholder-shown) ~ label {
    top: 0;
    font-size: 0.75rem;
    color: var(--color-texte);
}

.field-error {
    display: block;
    margin-top: 0.4rem;
    color: #E51919;
    font-size: 12px;
    font-family: inherit;
    font-weight: 500;
}

/* -------- Zone de sélection de fichiers -------- */
.guest-files-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.4rem 1rem;
    border: 2px dashed var(--color-sauge);
    border-radius: 1rem;
    background: rgba(140, 154, 91, 0.08);
    color: var(--color-texte);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.guest-files-label:hover,
.guest-files-label:focus-within {
    background: rgba(140, 154, 91, 0.14);
    border-color: var(--color-orange-clair);
}

.guest-files-label i,
.guest-files-label svg {
    width: 1.3rem;
    height: 1.3rem;
    color: var(--color-sauge);
    flex-shrink: 0;
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

.guest-files-label span {
    line-height: 1.3rem;
}

.guest-files-summary {
    margin: 0.6rem 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-sauge);
}

/* -------- Liste des fichiers sélectionnés -------- */
.guest-files-list {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.guest-files-list li {
    font-size: 0.8rem;
    background: #fff;
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    color: var(--color-texte);
    box-shadow: var(--ombre-douce, 0 2px 6px rgba(58,52,43,0.12));
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* -------- Bouton d'envoi -------- */
#guest-upload-form button[type="submit"] {
    align-self: center;
    margin-top: 0.5rem;
    background: var(--color-sauge);
    color: #fff;
    border: 2px solid var(--color-sauge);
    box-sizing: border-box;
    padding: 1rem 2.6rem;
    border-radius: 999px;
    font-family: var(--font-corps);
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: var(--ombre-douce, 0 6px 16px rgba(58,52,43,0.18));
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

#guest-upload-form button[type="submit"]:hover:not(:disabled),
#guest-upload-form button[type="submit"]:active:not(:disabled) {
    background: transparent;
    color: var(--color-sauge);
    border-color: var(--color-sauge);
    transform: translateY(-2px);
    box-shadow: none;
}

#guest-upload-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* -------- Barre de progression -------- */
.upload-progress {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upload-progress-track {
    width: 100%;
    height: 0.5rem;
    background: rgba(58, 52, 43, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--color-sauge);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.upload-progress-text {
    margin: 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-texte);
    opacity: 0.75;
}

/* -------- Messages de statut -------- */
.upload-message {
    margin: 0;
    padding: 0.9rem 1.1rem;
    border-radius: 0.8rem;
    font-size: 0.9rem;
    text-align: center;
    display: none;
}

.upload-message:empty {
    display: none;
}

.upload-message--success {
    display: block;
    background: rgba(140, 154, 91, 0.14);
    color: #4d5a2e;
}

.upload-message--warning {
    display: block;
    background: rgba(230, 139, 136, 0.16);
    color: #8a3a37;
}

.upload-message--error {
    display: block;
    background: rgba(220, 122, 51, 0.14);
    color: #93441a;
}

/* -------- Desktop -------- */
@media screen and (min-width: 48em) {
    .guest-upload-inner {
        max-width: 36em;
    }

    #guest-upload-form {
        gap: 1.5rem;
    }
}
/* ==========================================================
   OVERLAY D'ATTENTE — à coller à la fin de guest-upload.css
   ========================================================== */

.upload-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(58, 52, 43, 0.82);
    backdrop-filter: blur(2px);
}

/* Corrige un bug de spécificité : sans cette règle, [hidden] du
   navigateur (priorité "user agent") perd face à .upload-overlay
   (priorité "auteur") même à spécificité égale, et l'overlay reste
   visible en permanence malgré l'attribut hidden. */
.upload-overlay[hidden] {
    display: none;
}

.upload-overlay-content {
    background: var(--color-creme);
    border-radius: 1.2rem;
    padding: 2.2rem 1.8rem;
    max-width: 22em;
    text-align: center;
    box-shadow: var(--ombre-douce, 0 12px 32px rgba(0,0,0,0.3));
}

.upload-overlay-spinner {
    width: 2.6rem;
    height: 2.6rem;
    margin: 0 auto 1.2rem;
    border-radius: 50%;
    border: 3px solid rgba(140, 154, 91, 0.25);
    border-top-color: var(--color-sauge);
    animation: upload-spin 0.9s linear infinite;
}

@keyframes upload-spin {
    to { transform: rotate(360deg); }
}

.upload-overlay-title {
    font-family: var(--font-titre, var(--font-corps));
    font-size: 1.2rem;
    color: var(--color-orange-clair);
    margin: 0 0 0.5rem;
}

.upload-overlay-text {
    font-size: 0.9rem;
    color: var(--color-texte);
    line-height: 1.6;
    margin: 0;
}

/* Champ groupé (label + input) réutilisé dans le formulaire */
.guest-upload-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
