/* =========================================================
   MON ESPACE
========================================================= */

.espace-page {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 60px 0 100px;
}


/* =========================================================
   HEADER
========================================================= */

.espace-header {
    position: relative;
    min-height: 330px;

    display: flex;
    align-items: center;

    padding: 55px 60px;

    overflow: hidden;

    border-radius: 32px;

    background:
        linear-gradient(
            135deg,
            var(--cream-soft, #f6e8ce),
            var(--cream, #fbf1de)
        );

    box-shadow:
        0 20px 60px rgba(91, 66, 39, 0.08);
}


.espace-header-content {
    position: relative;
    z-index: 2;

    max-width: 620px;
}


.espace-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 20px;

    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;

    color: var(--moss, #6b7f4f);
}


.espace-eyebrow-icon {
    display: grid;
    place-items: center;

    width: 28px;
    height: 28px;

    border-radius: 50%;

    background: rgba(107, 127, 79, 0.12);

    font-size: 14px;
}


.espace-header h1 {
    margin: 0;

    font-family: var(--font-display, "DM Serif Display", serif);

    font-size: clamp(2.8rem, 6vw, 4.8rem);
    line-height: 0.98;

    letter-spacing: -0.04em;

    color: var(--cognac, #c1693b);
}


.espace-header h1 span {
    color: var(--moss, #6b7f4f);
}


.espace-header p {
    max-width: 540px;

    margin: 25px 0 0;

    font-size: 1.05rem;
    line-height: 1.7;

    color: #675d52;
}


/* =========================================================
   DECORATION
========================================================= */

.espace-header-decoration {
    position: absolute;

    right: -60px;
    top: -70px;

    width: 470px;
    height: 470px;

    pointer-events: none;
}


.decoration-circle {
    position: absolute;

    border-radius: 50%;
}


.circle-one {
    width: 350px;
    height: 350px;

    right: 0;
    top: 50px;

    background: rgba(232, 163, 61, 0.14);
}


.circle-two {
    width: 230px;
    height: 230px;

    right: 100px;
    top: 130px;

    background: rgba(107, 127, 79, 0.12);
}


.decoration-house {
    position: absolute;

    right: 155px;
    top: 180px;

    font-size: 6rem;

    color: var(--cognac, #c1693b);

    transform: rotate(-5deg);

    opacity: 0.7;
}


/* =========================================================
   MESSAGES
========================================================= */

.espace-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;

    margin-top: 25px;
}


.espace-alert {
    display: flex;
    align-items: flex-start;
    gap: 15px;

    padding: 18px 20px;

    border-radius: 18px;

    border: 1px solid transparent;
}


.espace-alert p {
    margin: 4px 0 0;

    font-size: 0.92rem;
}


.alert-success {
    background: rgba(107, 127, 79, 0.09);
    border-color: rgba(107, 127, 79, 0.18);
}


.alert-warning {
    background: rgba(232, 163, 61, 0.1);
    border-color: rgba(232, 163, 61, 0.2);
}


.alert-icon {
    display: grid;
    place-items: center;

    flex-shrink: 0;

    width: 32px;
    height: 32px;

    border-radius: 50%;

    font-weight: 800;
}


.alert-success .alert-icon {
    background: var(--moss, #6b7f4f);
    color: white;
}


.alert-warning .alert-icon {
    background: var(--honey, #e8a33d);
    color: white;
}


/* =========================================================
   CONTENT
========================================================= */

.espace-content {
    margin-top: 70px;
}


.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 30px;
}


.section-kicker {
    display: block;

    margin-bottom: 8px;

    font-size: 0.75rem;
    font-weight: 800;

    letter-spacing: 0.13em;
    text-transform: uppercase;

    color: var(--honey-deep, #d4872a);
}


.section-heading h2 {
    margin: 0;

    font-family: var(--font-display, "DM Serif Display", serif);

    font-size: clamp(2rem, 4vw, 3rem);

    line-height: 1.1;

    color: #40382f;
}


.reservation-counter {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 16px;

    border-radius: 50px;

    background: var(--cream-soft, #f6e8ce);
}


.counter-number {
    font-weight: 900;
    color: var(--cognac, #c1693b);
}


.counter-label {
    font-size: 0.85rem;
    color: #675d52;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.empty-state {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 40px;
    align-items: center;

    padding: 50px;

    border-radius: 28px;

    background: white;

    border: 1px solid rgba(91, 66, 39, 0.08);

    box-shadow:
        0 20px 50px rgba(91, 66, 39, 0.06);
}


.empty-state-icon {
    display: grid;
    place-items: center;

    width: 150px;
    height: 150px;

    border-radius: 50%;

    background: var(--cream-soft, #f6e8ce);

    font-size: 4rem;
}


.empty-state-content h3 {
    margin: 0 0 12px;

    font-family: var(--font-display, "DM Serif Display", serif);

    font-size: 2rem;

    color: #40382f;
}


.empty-state-content p {
    max-width: 620px;

    margin: 0 0 25px;

    line-height: 1.7;

    color: #71675c;
}


/* =========================================================
   RESERVATIONS
========================================================= */

.reservations-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}


.reservation-card {
    overflow: hidden;

    border-radius: 26px;

    background: white;

    border: 1px solid rgba(91, 66, 39, 0.08);

    box-shadow:
        0 15px 45px rgba(91, 66, 39, 0.06);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.reservation-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 20px 55px rgba(91, 66, 39, 0.1);
}


/* =========================================================
   CARD TOP
========================================================= */

.reservation-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
    gap: 20px;

    padding: 25px 28px;

    border-bottom: 1px solid rgba(91, 66, 39, 0.07);
}


.reservation-house {
    display: flex;
    align-items: center;
    gap: 16px;
}


.house-icon {
    display: grid;
    place-items: center;

    width: 55px;
    height: 55px;

    flex-shrink: 0;

    border-radius: 16px;

    background: var(--cream-soft, #f6e8ce);

    font-size: 1.7rem;
}


.reservation-label {
    display: block;

    margin-bottom: 3px;

    font-size: 0.7rem;
    font-weight: 800;

    letter-spacing: 0.12em;
    text-transform: uppercase;

    color: var(--honey-deep, #d4872a);
}


.reservation-house h3 {
    margin: 0;

    font-size: 1.35rem;

    color: #40382f;
}


/* =========================================================
   STATUS
========================================================= */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 8px 13px;

    border-radius: 50px;

    font-size: 0.78rem;
    font-weight: 800;

    white-space: nowrap;
}


.status-badge > span {
    width: 7px;
    height: 7px;

    border-radius: 50%;
}


.status-confirmed {
    background: rgba(107, 127, 79, 0.1);
    color: var(--moss, #6b7f4f);
}


.status-confirmed > span {
    background: var(--moss, #6b7f4f);
}


.status-cancelled {
    background: rgba(193, 105, 59, 0.1);
    color: var(--cognac, #c1693b);
}


.status-cancelled > span {
    background: var(--cognac, #c1693b);
}


.status-other {
    background: rgba(91, 66, 39, 0.08);
    color: #675d52;
}


/* =========================================================
   DETAILS
========================================================= */

.reservation-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    padding: 28px;
}


.reservation-detail {
    /* display: flex;
    align-items: center; */
    gap: 13px;

    padding: 5px 20px;

    border-right: 1px solid rgba(91, 66, 39, 0.08);
}


.reservation-detail:first-child {
    padding-left: 0;
}


.reservation-detail:last-child {
    padding-right: 0;
    border-right: 0;
}


.detail-icon {
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    width: 40px;
    height: 40px;

    /* flex-shrink: 0; */

    border-radius: 12px;

    background: var(--cream, #fbf1de);

    font-size: 0.95rem;
}


.detail-label {
    display: block;

    margin-bottom: 5px;

    font-size: 0.72rem;

    color: #8b8176;
}


.reservation-detail strong {
    display: block;

    font-size: 0.92rem;

    color: #40382f;
}


.reservation-price strong {
    font-size: 1.05rem;

    color: var(--cognac, #c1693b);
}


/* =========================================================
   CARD FOOTER
========================================================= */

.reservation-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px;
    gap: 20px;

    padding: 17px 28px;

    background: rgba(246, 232, 206, 0.35);
}


.reservation-reference {
    font-size: 0.75rem;

    color: #91877b;
}


.reservation-actions {
    display: flex;
    align-items: center;
}


/* =========================================================
   BUTTONS
========================================================= */

.btn-espace {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-height: 48px;

    padding: 12px 21px;

    border-radius: 14px;

    text-decoration: none;

    font-size: 0.9rem;
    font-weight: 800;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.btn-espace:hover {
    transform: translateY(-2px);
}


.btn-primary {
    background: var(--cognac, #c1693b);
    color: white;
    box-shadow:
        0 8px 20px rgba(193, 105, 59, 0.2);
    border: none;
}


.btn-primary:hover {
    background: var(--honey-deep, #d4872a);
}


.btn-secondary {
    background: var(--cream-soft, #f6e8ce);
    color: var(--cognac, #c1693b);
}


.btn-cancel {
    padding: 9px 14px;

    border: 0;
    border-radius: 10px;

    background: transparent;

    color: #a45d46;

    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.btn-cancel:hover {
    background: rgba(193, 105, 59, 0.1);
    color: var(--cognac, #c1693b);
}


.btn-cancel:focus-visible,
.btn-espace:focus-visible {
    outline: 3px solid rgba(232, 163, 61, 0.5);
    outline-offset: 3px;
}


.cancelled-message {
    font-size: 0.78rem;
    font-weight: 700;

    color: #91877b;
}


/* =========================================================
   RESERVATION ANNULEE
========================================================= */

.reservation-cancelled {
    opacity: 0.78;
}


.reservation-cancelled .house-icon {
    filter: grayscale(0.6);
}


/* =========================================================
   HELP
========================================================= */

.espace-help {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-top: 70px;
    padding: 30px 35px;
    border-radius: 24px;
    background: var(--cream);
    box-shadow:
        0 20px 50px rgba(107, 127, 79, 0.18);
}


.help-icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 1.7rem;
}


.help-content {
    flex: 1;
}


.help-content .section-kicker {
    margin-bottom: 5px;
    color: var(--bark-deep);
}


.help-content h2 {
    margin: 0 0 5px;
    font-family: var(--font-display, "DM Serif Display", serif);
    font-size: 1.6rem;
    color: var(--bark-deep);
}


.help-content p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--bark-deep);
}


.espace-help .btn-secondary {
    background: var(--white);
    color: var(--moss, #6b7f4f);
}


/* =========================================================
   RESPONSIVE — MON ESPACE
========================================================= */


/* =========================================================
   TABLETTE
========================================================= */

@media (max-width: 1050px) {

    .espace-page {
        width: min(100% - 40px, 900px);
        padding: 45px 0 80px;
    }

    /* HEADER */

    .espace-header {
        min-height: 300px;
        padding: 45px;
    }

    .espace-header-content {
        max-width: 560px;
    }

    .espace-header h1 {
        font-size: clamp(2.6rem, 6vw, 4.3rem);
    }

    .espace-header p {
        font-size: 1rem;
    }

    .espace-header-decoration {
        right: -100px;
        opacity: .55;
    }


    /* CONTENT */

    .espace-content {
        margin-top: 55px;
    }


    /* RESERVATIONS */

    .reservation-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .reservation-detail {
        padding: 5px 15px;
        border-right: 0;
    }

    .reservation-detail:nth-child(odd) {
        border-right: 1px solid rgba(91, 66, 39, 0.08);
    }

    .reservation-detail:first-child {
        padding-left: 0;
    }

    .reservation-detail:last-child {
        padding-right: 0;
        border-right: 0;
    }


    /* HELP */

    .espace-help {
        gap: 20px;
        padding: 28px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .espace-page {
        width: calc(100% - 24px);
        padding: 25px 0 60px;
    }


    /* HEADER */

    .espace-header {
        min-height: 0;
        padding: 38px 25px;
        border-radius: 24px;
    }

    .espace-header-content {
        max-width: 100%;
    }

    .espace-eyebrow {
        margin-bottom: 16px;
        font-size: .72rem;
    }

    .espace-eyebrow-icon {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }

    .espace-header h1 {
        font-size: clamp(2.5rem, 11vw, 3.8rem);
        line-height: .95;
    }

    .espace-header p {
        margin-top: 20px;
        font-size: .95rem;
        line-height: 1.7;
    }

    .espace-header-decoration {
        right: -180px;
        top: -100px;
        opacity: .2;
    }


    /* MESSAGES */

    .espace-messages {
        margin-top: 18px;
    }

    .espace-alert {
        gap: 12px;
        padding: 15px;
        border-radius: 15px;
    }

    .espace-alert p {
        font-size: .85rem;
        line-height: 1.5;
    }

    .alert-icon {
        width: 29px;
        height: 29px;
    }


    /* CONTENT */

    .espace-content {
        margin-top: 50px;
    }

    .section-heading {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        margin-bottom: 25px;
    }

    .section-heading h2 {
        font-size: clamp(1.9rem, 9vw, 2.7rem);
    }

    .reservation-counter {
        align-self: flex-start;
    }


    /* EMPTY STATE */

    .empty-state {
        display: flex;
        flex-direction: column;
        gap: 25px;
        padding: 28px 22px;
        text-align: center;
        border-radius: 22px;
    }

    .empty-state-icon {
        width: 100px;
        height: 100px;
        margin: 0 auto;
        font-size: 3rem;
    }

    .empty-state-content h3 {
        font-size: 1.7rem;
    }

    .empty-state-content p {
        font-size: .9rem;
        line-height: 1.7;
    }

    .empty-state-content .btn-espace {
        width: 100%;
    }


    /* RESERVATION CARD */

    .reservations-list {
        gap: 18px;
    }

    .reservation-card {
        border-radius: 22px;
    }

    .reservation-card:hover {
        transform: none;
        box-shadow:
            0 15px 45px rgba(91, 66, 39, 0.06);
    }


    /* CARD TOP */

    .reservation-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }

    .reservation-house {
        width: 100%;
        gap: 13px;
    }

    .house-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        font-size: 1.4rem;
    }

    .reservation-house h3 {
        font-size: 1.2rem;
    }

    .status-badge {
        font-size: .72rem;
    }


    /* DETAILS */

    .reservation-details {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 18px 20px;
    }

    .reservation-detail,
    .reservation-detail:nth-child(odd),
    .reservation-detail:first-child,
    .reservation-detail:last-child {
        display: flex;
        align-items: center;
        gap: 13px;
        padding: 13px 0;
        border-right: 0;
        border-bottom: 1px solid rgba(91, 66, 39, 0.08);
    }

    .reservation-detail:last-child {
        border-bottom: 0;
    }

    .detail-icon {
        margin-bottom: 0;
        width: 38px;
        height: 38px;
        flex-shrink: 0;
        border-radius: 10px;
    }

    .reservation-detail > div {
        flex: 1;
    }

    .detail-label {
        margin-bottom: 3px;
        font-size: .68rem;
    }

    .reservation-detail strong {
        font-size: .88rem;
    }

    .reservation-price strong {
        font-size: 1rem;
    }


    /* CARD FOOTER */

    .reservation-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
        padding: 16px 20px;
    }

    .reservation-reference {
        font-size: .7rem;
        overflow-wrap: anywhere;
    }

    .reservation-actions {
        width: 100%;
    }

    .reservation-actions .btn-espace,
    .reservation-actions .btn-cancel {
        width: 100%;
    }


    /* BUTTONS */

    .btn-espace {
        min-height: 46px;
        padding: 11px 18px;
        font-size: .85rem;
    }


    /* HELP */

    .espace-help {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
        margin-top: 50px;
        padding: 25px 22px;
        border-radius: 20px;
    }

    .help-icon {
        width: 52px;
        height: 52px;
        border-radius: 15px;
        font-size: 1.4rem;
    }

    .help-content h2 {
        font-size: 1.4rem;
    }

    .help-content p {
        font-size: .85rem;
        line-height: 1.6;
    }

    .espace-help .btn-espace {
        width: 100%;
    }
}


/* =========================================================
   PETITS TÉLÉPHONES
========================================================= */

@media (max-width: 430px) {

    .espace-page {
        width: calc(100% - 20px);
        padding-top: 20px;
    }

    .espace-header {
        padding: 32px 20px;
        border-radius: 20px;
    }

    .espace-header h1 {
        font-size: clamp(2.25rem, 11vw, 3.2rem);
    }

    .espace-header p {
        font-size: .9rem;
    }

    .espace-content {
        margin-top: 40px;
    }

    .section-heading h2 {
        font-size: 2rem;
    }

    .reservation-counter {
        padding: 9px 14px;
    }

    .counter-label {
        font-size: .78rem;
    }

    .reservation-top {
        padding: 18px;
    }

    .reservation-details {
        padding: 15px 18px;
    }

    .reservation-footer {
        padding: 15px 18px;
    }

    .empty-state {
        padding: 25px 18px;
    }

    .empty-state-icon {
        width: 85px;
        height: 85px;
        font-size: 2.5rem;
    }

    .espace-help {
        padding: 22px 18px;
    }
}


/* =========================================================
   TRÈS PETITS ÉCRANS
========================================================= */

@media (max-width: 360px) {

    .espace-page {
        width: calc(100% - 16px);
    }

    .espace-header {
        padding: 28px 17px;
    }

    .espace-header h1 {
        font-size: 2.1rem;
    }

    .reservation-house h3 {
        font-size: 1.1rem;
    }

    .reservation-detail strong {
        font-size: .84rem;
    }

    .empty-state-content h3 {
        font-size: 1.5rem;
    }
}