/* =========================
   PAGE UPLOAD
========================= */

.upload-page {
    position: relative;

    min-height: 100svh;

    color: var(--blanc);

    background-image:
        url("../images/fond-mariage.png");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}


.upload-overlay {
    position: fixed;

    inset: 0;

    z-index: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(18, 13, 11, 0.52),
            rgba(18, 13, 11, 0.88)
        );
}


.upload-content {
    position: relative;

    z-index: 1;

    width: min(900px, calc(100% - 30px));

    margin: auto;

    padding:
        max(20px, env(safe-area-inset-top))
        0
        max(30px, env(safe-area-inset-bottom));
}


/* =========================
   HEADER
========================= */

.upload-header {
    min-height: 150px;

    display: grid;

    grid-template-columns:
        150px
        1fr
        150px;

    align-items: center;

    gap: 20px;
}


.upload-heading {
    text-align: center;
}


.upload-date {
    margin-bottom: 7px;

    font-size: 10px;

    letter-spacing: 4px;

    opacity: 0.8;
}


.upload-heading h1 {
    margin: 0;

    font-family:
        "Cormorant Garamond",
        serif;

    font-size: clamp(42px, 6vw, 68px);

    font-weight: 500;

    line-height: 1;
}


.upload-heading > p:last-child {
    margin-top: 8px;

    font-family:
        "Cormorant Garamond",
        serif;

    font-size: 20px;

    opacity: 0.9;
}


/* =========================
   NAVIGATION
========================= */

.upload-back,
.gallery-link {
    color: white;

    text-decoration: none;

    font-size: 13px;

    opacity: 0.85;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}


.upload-back {
    display: flex;

    align-items: center;

    gap: 8px;
}


.gallery-link {
    justify-self: end;

    display: flex;

    align-items: center;

    gap: 7px;
}


.upload-back:hover {
    opacity: 1;

    transform: translateX(-3px);
}


.gallery-link:hover {
    opacity: 1;

    transform: translateX(3px);
}


/* =========================
   INTRO
========================= */

.upload-intro {
    margin: 10px auto 25px;

    text-align: center;
}


.upload-intro > p:first-child {
    margin-bottom: 2px;

    font-size: 12px;

    opacity: 0.75;
}


.upload-intro h2 {
    margin: 0;

    font-family:
        "Cormorant Garamond",
        serif;

    font-size: 30px;

    font-weight: 500;
}


.upload-intro-small {
    margin-top: 6px;

    font-size: 10px;

    opacity: 0.65;
}


/* =========================
   CARTE PRINCIPALE
========================= */

.upload-card {
    width: min(620px, 100%);

    margin: auto;

    padding: 18px;

    border:
        1px solid rgba(255, 255, 255, 0.28);

    border-radius: 22px;

    background:
        rgba(42, 31, 27, 0.65);

    backdrop-filter: blur(12px);

    -webkit-backdrop-filter: blur(12px);

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.32);
}


/* =========================
   DROP ZONE
========================= */

.drop-zone {
    position: relative;

    width: 100%;

    min-height: 280px;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    border:
        1px dashed rgba(255, 255, 255, 0.42);

    border-radius: 16px;

    background:
        rgba(255, 255, 255, 0.045);

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.drop-zone:hover {
    border-color:
        rgba(255, 255, 255, 0.75);

    background:
        rgba(255, 255, 255, 0.075);
}


.drop-zone.dragging {
    transform: scale(0.99);

    background:
        rgba(132, 68, 73, 0.22);

    border-color:
        rgba(255, 255, 255, 0.8);
}


/* =========================
   DROP ZONE VIDE
========================= */

.drop-zone-empty {
    padding: 30px;

    text-align: center;
}


.camera-icon {
    width: 58px;

    height: 58px;

    margin: 0 auto 15px;

    display: flex;

    align-items: center;

    justify-content: center;

    border:
        1px solid rgba(255, 255, 255, 0.55);

    border-radius: 50%;

    font-family:
        "Cormorant Garamond",
        serif;

    font-size: 35px;
}


.drop-zone-empty h3 {
    margin: 0 0 5px;

    font-family:
        "Cormorant Garamond",
        serif;

    font-size: 30px;

    font-weight: 500;
}


.drop-zone-empty p {
    font-size: 11px;

    opacity: 0.7;
}


.formats {
    display: block;

    margin-top: 15px;

    font-size: 8px;

    letter-spacing: 2px;

    opacity: 0.45;
}


/* =========================
   APERÇU
========================= */

.photo-preview {
    display: none;

    width: 100%;
}


.photo-preview.active {
    display: block;
}


.photo-preview img {
    width: 100%;

    max-height: 500px;

    display: block;

    object-fit: contain;

    border-radius: 15px;
}


/* =========================
   INFORMATIONS PHOTO
========================= */

.photo-info {
    display: none;

    padding: 14px 4px 4px;

    align-items: center;

    justify-content: space-between;

    gap: 15px;
}


.photo-info.active {
    display: flex;
}


.photo-details {
    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 3px;
}


.photo-name {
    max-width: 300px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 10px;
}


.photo-size {
    font-size: 9px;

    opacity: 0.5;
}


.photo-actions {
    display: flex;

    gap: 5px;
}


.change-photo,
.remove-photo {
    padding: 7px 10px;

    border:
        1px solid rgba(255, 255, 255, 0.2);

    border-radius: 20px;

    color: white;

    background:
        rgba(255, 255, 255, 0.05);

    font-family:
        "Montserrat",
        sans-serif;

    font-size: 9px;

    cursor: pointer;
}


.remove-photo {
    color: #efb7b7;
}


/* =========================
   FORMULAIRE
========================= */

.upload-form {
    margin-top: 22px;
}


.form-group {
    position: relative;

    margin-bottom: 17px;
}


.form-group label {
    display: block;

    margin-bottom: 7px;

    font-size: 10px;

    letter-spacing: 0.4px;
}


.form-group label span {
    margin-left: 4px;

    font-size: 8px;

    opacity: 0.45;
}


.form-group input,
.form-group textarea {
    width: 100%;

    border:
        1px solid rgba(255, 255, 255, 0.2);

    border-radius: 11px;

    outline: none;

    color: white;

    background:
        rgba(255, 255, 255, 0.06);

    font-family:
        "Montserrat",
        sans-serif;

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}


.form-group input {
    height: 46px;

    padding: 0 14px;
}


.form-group textarea {
    min-height: 90px;

    padding: 13px 14px;

    resize: vertical;
}


.form-group input::placeholder,
.form-group textarea::placeholder {
    color:
        rgba(255, 255, 255, 0.35);
}


.form-group input:focus,
.form-group textarea:focus {
    border-color:
        rgba(255, 255, 255, 0.55);

    background:
        rgba(255, 255, 255, 0.09);
}


.character-count {
    margin-top: 5px;

    text-align: right;

    font-size: 8px;

    opacity: 0.4;
}


/* =========================
   ENVOYER
========================= */

.send-photo {
    width: 100%;

    min-height: 52px;

    margin-top: 5px;

    border:
        1px solid rgba(255, 255, 255, 0.35);

    border-radius: 999px;

    color: white;

    background:
        linear-gradient(
            135deg,
            rgba(137, 70, 76, 0.95),
            rgba(103, 52, 56, 0.95)
        );

    font-family:
        "Montserrat",
        sans-serif;

    font-size: 12px;

    cursor: pointer;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.2);

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}


.send-photo span {
    margin-right: 5px;
}


.send-photo:hover:not(:disabled) {
    transform: translateY(-2px);
}


.send-photo:disabled {
    opacity: 0.3;

    cursor: not-allowed;
}


.upload-notice {
    margin-top: 11px;

    text-align: center;

    font-size: 8px;

    opacity: 0.45;
}


/* =========================
   APRÈS UPLOAD
========================= */

.after-upload {
    margin: 28px auto 0;

    text-align: center;
}


.after-upload p {
    margin-bottom: 7px;

    font-size: 10px;

    opacity: 0.55;
}


.after-upload a {
    color: white;

    text-decoration: none;

    font-family:
        "Cormorant Garamond",
        serif;

    font-size: 20px;
}


.after-upload a span {
    margin-left: 5px;
}


/* =========================
   FOOTER
========================= */

.upload-footer {
    padding: 35px 0 10px;

    text-align: center;

    font-family:
        "Cormorant Garamond",
        serif;

    font-size: 17px;

    opacity: 0.7;
}


.upload-footer span {
    margin: 0 5px;
}


/* =========================
   MODALE
========================= */

.upload-modal {
    position: fixed;

    inset: 0;

    z-index: 3000;

    padding: 20px;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        rgba(8, 6, 5, 0.88);

    backdrop-filter: blur(8px);

    opacity: 0;

    visibility: hidden;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}


.upload-modal.active {
    opacity: 1;

    visibility: visible;
}


.upload-modal-content {
    width: min(420px, 100%);

    padding: 35px 25px;

    text-align: center;

    border:
        1px solid rgba(255, 255, 255, 0.25);

    border-radius: 22px;

    color: white;

    background: #332522;
}


.success-heart {
    font-family:
        "Cormorant Garamond",
        serif;

    font-size: 50px;
}


.upload-modal h2 {
    margin: 0 0 8px;

    font-family:
        "Cormorant Garamond",
        serif;

    font-size: 38px;

    font-weight: 500;
}


.upload-modal p {
    margin-bottom: 22px;

    font-size: 11px;

    line-height: 1.6;

    opacity: 0.7;
}


.upload-modal button {
    width: 100%;

    padding: 12px;

    border: none;

    border-radius: 999px;

    color: white;

    background: #88464c;

    font-family:
        "Montserrat",
        sans-serif;

    font-size: 11px;

    cursor: pointer;
}


.upload-modal a {
    display: inline-block;

    margin-top: 15px;

    color: white;

    font-size: 10px;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

    .upload-page {
        background-attachment: scroll;
    }


    .upload-content {
        width: calc(100% - 20px);
    }


    .upload-header {
        min-height: auto;

        padding: 15px 0 12px;

        grid-template-columns:
            45px
            1fr
            45px;
    }


    .upload-back span,
    .gallery-link span {
        display: none;
    }


    .upload-back {
        font-size: 26px;
    }


    .gallery-link {
        font-size: 22px;
    }


    .upload-date {
        font-size: 7px;

        letter-spacing: 2px;
    }


    .upload-heading h1 {
        font-size: 37px;
    }


    .upload-heading > p:last-child {
        font-size: 16px;
    }


    .upload-intro {
        margin: 18px auto;
    }


    .upload-card {
        padding: 10px;

        border-radius: 17px;
    }


    .drop-zone {
        min-height: 240px;

        border-radius: 13px;
    }


    .drop-zone-empty h3 {
        font-size: 27px;
    }


    .photo-info {
        align-items: flex-start;

        flex-direction: column;
    }


    .photo-name {
        max-width: 250px;
    }


    .photo-actions {
        width: 100%;
    }


    .change-photo,
    .remove-photo {
        flex: 1;
    }


    .upload-form {
        margin-top: 18px;

        padding: 0 3px 5px;
    }

}