* {
    box-sizing: border-box;
}


body {
    margin: 0;

    color: white;

    background: #111;
}


.guestbook-page {
    position: relative;

    min-height: 100svh;

    background-image:
        url("../images/fond-mariage.png");

    background-size: cover;

    background-position: center;

    background-repeat: no-repeat;

    background-attachment: fixed;
}


.guestbook-overlay {
    position: fixed;

    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(18, 13, 11, 0.55),
            rgba(18, 13, 11, 0.88)
        );

    z-index: 0;
}


.guestbook-content {
    position: relative;

    z-index: 1;

    width:
        min(
            900px,
            calc(100% - 30px)
        );

    margin: auto;

    padding:
        25px 0
        60px;
}


/* HEADER */

.guestbook-header {
    display: grid;

    grid-template-columns:
        120px
        1fr
        120px;

    align-items: center;

    min-height: 180px;
}


.guestbook-back {
    color: white;

    text-decoration: none;

    font-family:
        Montserrat,
        Arial,
        sans-serif;

    font-size: 13px;

    opacity: 0.9;
}


.guestbook-heading {
    text-align: center;
}


.guestbook-date {
    margin-bottom: 8px;

    font-family:
        Montserrat,
        Arial,
        sans-serif;

    font-size: 10px;

    letter-spacing: 4px;
}


.guestbook-heading h1 {
    margin: 0;

    font-family:
        "Cormorant Garamond",
        serif;

    font-size:
        clamp(
            55px,
            8vw,
            85px
        );

    font-weight: 500;

    line-height: 1;
}


.guestbook-heading > p:last-child {
    margin-top: 8px;

    font-family:
        "Cormorant Garamond",
        serif;

    font-size: 21px;
}


/* FORMULAIRE */

.guestbook-form-card {
    padding: 30px;

    margin-bottom: 50px;

    border:
        1px solid
        rgba(255, 255, 255, 0.28);

    border-radius: 24px;

    background:
        rgba(97, 58, 57, 0.70);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);
}


.guestbook-form-card h2 {
    margin:
        0 0 24px;

    text-align: center;

    font-family:
        "Cormorant Garamond",
        serif;

    font-size: 32px;

    font-weight: 500;
}


.guestbook-form-card label {
    display: block;

    margin:
        16px 0 7px;

    font-family:
        Montserrat,
        Arial,
        sans-serif;

    font-size: 12px;
}


.guestbook-form-card input,
.guestbook-form-card textarea {
    width: 100%;

    padding: 14px 16px;

    border:
        1px solid
        rgba(255, 255, 255, 0.28);

    border-radius: 14px;

    outline: none;

    background:
        rgba(20, 15, 14, 0.35);

    color: white;

    font-family:
        Montserrat,
        Arial,
        sans-serif;

    font-size: 15px;
}


.guestbook-form-card textarea {
    min-height: 140px;

    resize: vertical;
}


.guestbook-form-card input::placeholder,
.guestbook-form-card textarea::placeholder {
    color:
        rgba(
            255,
            255,
            255,
            0.55
        );
}


.guestbook-form-bottom {
    display: flex;

    align-items: center;

    justify-content:
        space-between;

    gap: 15px;

    margin-top: 18px;
}


#characterCount {
    font-family:
        Montserrat,
        Arial,
        sans-serif;

    font-size: 11px;

    opacity: 0.7;
}


#guestbookSubmit {
    padding:
        12px 24px;

    border:
        1px solid
        rgba(255, 255, 255, 0.45);

    border-radius: 999px;

    background:
        rgba(126, 69, 71, 0.95);

    color: white;

    font-family:
        Montserrat,
        Arial,
        sans-serif;

    cursor: pointer;
}


#guestbookSubmit:disabled {
    opacity: 0.55;

    cursor: default;
}


.guestbook-status {
    min-height: 20px;

    margin:
        17px 0 0;

    text-align: center;

    font-family:
        Montserrat,
        Arial,
        sans-serif;

    font-size: 12px;
}


/* MESSAGES */

.messages-heading {
    margin-bottom: 25px;

    text-align: center;
}


.messages-heading h2 {
    margin: 0;

    font-family:
        "Cormorant Garamond",
        serif;

    font-size: 43px;

    font-weight: 500;
}


.messages-heading p {
    margin-top: 5px;

    font-family:
        Montserrat,
        Arial,
        sans-serif;

    font-size: 12px;

    opacity: 0.75;
}


.messages-list {
    display: flex;

    flex-direction: column;

    gap: 14px;
}


.guestbook-message {
    padding: 22px;

    border:
        1px solid
        rgba(255, 255, 255, 0.22);

    border-radius: 18px;

    background:
        rgba(55, 39, 35, 0.62);

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);
}


.message-header {
    display: flex;

    align-items: center;

    justify-content:
        space-between;

    gap: 10px;

    margin-bottom: 12px;
}


.message-name {
    font-family:
        "Cormorant Garamond",
        serif;

    font-size: 24px;
}


.message-date {
    font-family:
        Montserrat,
        Arial,
        sans-serif;

    font-size: 10px;

    opacity: 0.6;
}


.message-text {
    margin: 0;

    white-space: pre-wrap;

    overflow-wrap: anywhere;

    font-family:
        Montserrat,
        Arial,
        sans-serif;

    font-size: 14px;

    line-height: 1.6;

    color:
        rgba(
            255,
            255,
            255,
            0.9
        );
}


.guestbook-empty {
    padding: 40px;

    text-align: center;

    border:
        1px solid
        rgba(255, 255, 255, 0.2);

    border-radius: 18px;

    background:
        rgba(40, 30, 27, 0.5);
}


.guestbook-empty span {
    font-size: 35px;
}


/* MOBILE */

@media (max-width: 650px) {

    .guestbook-page {
        background-attachment:
            scroll;
    }


    .guestbook-content {
        width:
            calc(100% - 20px);
    }


    .guestbook-header {
        grid-template-columns:
            70px
            1fr
            70px;

        min-height: 160px;
    }


    .guestbook-heading h1 {
        font-size: 54px;
    }


    .guestbook-heading > p:last-child {
        font-size: 17px;
    }


    .guestbook-date {
        font-size: 8px;

        letter-spacing: 2px;
    }


    .guestbook-back {
        font-size: 11px;
    }


    .guestbook-form-card {
        padding:
            24px 16px;

        border-radius: 20px;
    }


    .guestbook-form-card h2 {
        font-size: 27px;
    }


    .guestbook-form-bottom {
        align-items:
            flex-end;
    }


    .guestbook-message {
        padding: 17px;
    }


    .message-name {
        font-size: 21px;
    }

}