
/************* MON COMPTE / MODIFIER PROFIL / MODIFIER ADRESSE *************/

.account-page{
    min-height:70vh;
    padding:70px 6% 100px;
    background:#FFFDF9;
    color:#3F3835;
}

.account-page .container{
    max-width:1180px;
    margin:0 auto;
}

.account-message{
    max-width:1180px;
    margin:0 auto 10px;
    font-family:Georgia,"Times New Roman",serif;
    font-size:clamp(2.4rem,5vw,4rem);
    font-weight:400;
    color:#2F2F2F;
}

.account-page > h2{
    max-width:1180px;
    margin:0 auto 55px;
    color:#6B625D;
    font-size:1.1rem;
    font-weight:400;
}

.account-stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:22px;
    margin-bottom:35px;
}

.stat-card,
.account-card,
.order-card{
    background:#FFFDF9;
    border:1px solid rgba(169,99,88,.14);
    border-radius:28px;
    box-shadow:0 18px 45px rgba(63,56,53,.06);
}

.stat-card{
    padding:30px;
    text-align:center;
}

.stat-card span{
    display:block;
    font-size:2rem;
    margin-bottom:12px;
}

.stat-card strong{
    display:block;
    color:#A96358;
    font-size:1.8rem;
    margin-bottom:6px;
}

.stat-card p{
    margin:0;
    color:#6B625D;
    text-transform:uppercase;
    letter-spacing:.08em;
    font-size:.8rem;
    font-weight:700;
}

.account-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:28px;
    margin-bottom:55px;
}

.account-card{
    padding:34px;
}

.account-card h3,
.account-orders h2{
    margin:0 0 24px;
    font-family:Georgia,"Times New Roman",serif;
    font-size:2rem;
    font-weight:400;
    color:#2F2F2F;
}

.account-card p{
    display:flex;
    justify-content:space-between;
    gap:20px;
    padding:13px 0;
    margin:0;
    border-bottom:1px solid rgba(169,99,88,.12);
    color:#7A6F68;
}

.account-card strong{
    color:#3F3835;
    text-align:right;
}

.account-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-top:24px;
    padding:12px 22px;
    border:none;
    border-radius:999px;
    background:#A96358;
    color:#fff;
    text-decoration:none;
    font-weight:700;
    cursor:pointer;
    box-shadow:0 14px 30px rgba(169,99,88,.22);
    transition:.25s;
}

.account-button:hover{
    transform:translateY(-2px);
}

.orders-list{
    display:grid;
    gap:18px;
}

.order-card{
    padding:24px 28px;
    display:grid;
    grid-template-columns:1fr auto auto;
    gap:24px;
    align-items:center;
}

.order-card h3{
    margin:0 0 6px;
    color:#2F2F2F;
}

.order-card p{
    margin:0;
    color:#6B625D;
}

.order-total{
    color:#A96358 !important;
    font-weight:800;
    font-size:1.2rem;
}

.order-status{
    display:inline-flex;
    margin-top:8px;
    padding:6px 12px;
    border-radius:999px;
    background:#F8F3EE;
    color:#A96358;
    font-size:.78rem;
    font-weight:800;
    text-transform:uppercase;
}

/* Formulaires profil/adresse/modifier mot de passe */

.account-form,
.account-card form{
    display:grid;
    gap:20px;
}

.account-card label{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-bottom:18px;

    font-size:.85rem;
    font-weight:600;
    letter-spacing:.05em;
    text-transform:uppercase;
    color:#8D8179;
}

.account-card input{
    width:100%;
    padding:14px 18px;

    border:1px solid #E6DDD8;
    border-radius:14px;

    background:#FFFFFF;

    font-size:1rem;
    font-weight:300;
    color:#3F3835;

    transition:.25s ease;
}

.account-card input:focus{
    outline:none;

    border-color:#A96358;

    box-shadow:
        0 0 0 4px rgba(169,99,88,.12);

    background:#FFFDFB;
}

.account-card input::placeholder{
    color:#B8AEA8;
}

.security-card {
    display: grid;
    gap: 1.5rem;
}

.account-card__header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.account-card__icon {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    border-radius: 1rem;

    background: #f2ece8;
    color: #64544b;
}

.account-card__eyebrow {
    margin: 0 0 0.2rem;

    color: #8a7d75;

    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.account-card__header h2 {
    margin: 0;
    font-size: 1.35rem;
}

.security-card__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;

    padding-top: 1.25rem;

    border-top: 1px solid rgba(47, 47, 47, 0.1);
}

.security-card__information h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.security-card__information > p {
    margin: 0;
    color: #716761;
    line-height: 1.6;
}

.security-card__date {
    margin-top: 0.65rem !important;

    color: #8a7d75 !important;

    font-size: 0.82rem;
}

.account-back-link {
    display: inline-flex;
    margin-bottom: 1.5rem;

    color: #64544b;

    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.account-back-link:hover {
    text-decoration: underline;
    text-underline-offset: 0.25rem;
}

.security-form-card {
    max-width: 45rem;
}

.account-form__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.form-error {
    margin: 0.45rem 0 0;

    color: #9f3f3f;

    font-size: 0.85rem;
    line-height: 1.5;
}

.form-group input[aria-invalid="true"] {
    border-color: #b74b4b;
    outline-color: rgba(183, 75, 75, 0.2);
}

.account-check{

    display:flex;
    align-items:center;
    gap:15px;

    margin-top:20px;
    padding:18px;

    border:1px solid #E7DFDA;
    border-radius:18px;

    background:#FCFAF8;

    cursor:pointer;

    transition:.25s ease;
}

.account-check input{

    display:none;

}

.account-check .checkbox{

    width:22px;
    height:22px;

    border:2px solid #D8C8BF;

    border-radius:6px;

    background:#FFFFFF;

    flex-shrink:0;

    transform:scale(1);

    transition:
        transform .2s,
        background .25s,
        border-color .25s;
}

.account-check:hover{

    border-color:#D5A79A;

    background:#FFFDFC;
}

.account-check:hover .checkbox{

    border-color:#A96358;
}

.account-check input:checked + .checkbox{

    background:#A96358;

    border-color:#A96358;

    position:relative;

    transform:scale(1.08);
}

.account-check input:checked + .checkbox::after{

    content:"✓";

    position:absolute;

    top:50%;
    left:50%;

    transform:translate(-50%,-55%);

    color:white;

    font-size:14px;

    font-weight:bold;
}

.account-check input:focus + .checkbox{

    box-shadow:
        0 0 0 5px rgba(169,99,88,.18);

    border-color:#A96358;
}

.check-text{

    color:#6D635D;

    font-size:.95rem;

    line-height:1.5;

    font-weight:400;
}


/******** CHECKOUT FORM FINALISER MA COMMANDE. ********/

.checkout-container{
    max-width: 1280px;
    margin: 0 auto;
}

.checkout-header h1{
    color: #B56E5A;
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    letter-spacing: 0.06em;
    margin-bottom: 20px;
}

.checkout-card h2 {
    color: #B56E5A;
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.checkout-container form{
    display: grid;
    grid-template-columns: 1.2fr 1.8fr 1fr;
    gap: 40px;
}

.checkout-container input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(181, 110, 90, 0.28);
    border-radius: 999px;
    margin-bottom: 10px;
    background: #fff;
    font-size: 1rem;
}

.checkout-check{
    font-size: 1rem;
}

.checkout-container .checkout-summary{
    font-size: 1.5rem;
}

.checkout-total{
    color: #9F5F4F;
    margin-top: 30px;
}

.checkout-card button{
    display: inline-block;
    margin-top: 18px;
    padding: 12px 22px;
    border: 1px solid #B56E5A;
    border-radius: 999px;
    background: #B56E5A;
    width: 75%;
    color: #fff;
    text-decoration: none;
    transition: .2s;
}

.checkout-card button:hover {
    background: #9F5F4F;
}

.account-back-link{
    display:inline-flex;
    margin-bottom:30px;
    color:#A96358;
    text-decoration:none;
    font-weight:700;
}

.account-section-header{
    margin-bottom:35px;
}

.account-section-header p{
    margin:0 0 8px;
    color:#A96358;
    text-transform:uppercase;
    letter-spacing:.12em;
    font-size:.8rem;
    font-weight:800;
}

.account-section-header h1{
    margin:0;
    font-family:Georgia,"Times New Roman",serif;
    font-size:clamp(2.4rem,5vw,4rem);
    font-weight:400;
    color:#2F2F2F;
}

.order-status-pending{
    background:#F8F3EE;
    color:#A96358;
}

.order-status-paid,
.order-status-preparing{
    background:#EEF6EA;
    color:#51753A;
}

.order-status-shipped,
.order-status-delivered{
    background:#EEF4F8;
    color:#3D6F8A;
}

.order-status-cancelled{
    background:#F8EAEA;
    color:#B54848;
}

/* ================================
   DÉTAIL COMMANDE
================================ */

.order-detail-layout {
    display: grid;
    grid-template-columns: 1.35fr .75fr;
    gap: 32px;
    align-items: start;
}

.order-detail-main,
.order-detail-side {
    display: grid;
    gap: 24px;
}

.order-items-list {
    display: grid;
    gap: 20px;
}

.order-item-card,
.order-items-list .account-card {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 22px;
    align-items: center;
}

.order-item-image {
    width: 120px;
    height: 120px;
    border-radius: 22px;
    object-fit: cover;
    background: #F8F3EE;
    box-shadow: 0 12px 28px rgba(63,56,53,.08);
}

.order-items-list h3 {
    margin: 0 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: #2F2F2F;
}

.order-items-list p {
    margin: 4px 0;
    color: #6B625D;
}

.order-items-list strong {
    color: #A96358;
    font-size: 1.1rem;
}

.order-detail-side .account-card h3,
.order-detail-main .account-card h3 {
    margin-bottom: 18px;
}

.order-detail-side .account-card p {
    margin: 8px 0;
    color: #6B625D;
    line-height: 1.6;
}

.order-detail-side .account-card strong {
    display: block;
    margin-top: 10px;
    color: #A96358;
    font-size: 1.8rem;
}

.order-detail-side .account-card {
    background: #FFFDF9;
}

.order-detail-side .account-card:nth-child(1) {
    background: #F8F3EE;
}

.order-detail-side .account-card:nth-child(3) {
    background: #F8F3EE;
    text-align: center;
}

.order-detail-side .account-card:nth-child(3) .account-button {
    margin-top: 16px;
}

/* =========================================
   SUPPRESSION DU COMPTE
========================================= */

.account-delete-page {
    padding-top: 60px;
}

.account-delete-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 38px;
    border: 1px solid rgba(181, 72, 72, .18);
    border-radius: 28px;
    background: #fffdf9;
    box-shadow: 0 20px 55px rgba(63, 56, 53, .08);
}

.account-delete-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.account-delete-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #f8eaea;
    font-size: 1.6rem;
}

.account-delete-header p {
    margin: 0 0 5px;
    color: #b54848;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.account-delete-header h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 400;
    color: #2f2f2f;
}

.account-delete-warning {
    margin-bottom: 28px;
    padding: 24px;
    border-radius: 20px;
    background: #fdf5f3;
    color: #665b56;
    line-height: 1.7;
}

.account-delete-warning h2 {
    margin: 0 0 12px;
    color: #b54848;
    font-size: 1.1rem;
}

.account-delete-warning p {
    margin: 8px 0;
}

.account-delete-error {
    margin-bottom: 22px;
    padding: 14px 18px;
    border: 1px solid rgba(181, 72, 72, .22);
    border-radius: 14px;
    background: #f8eaea;
    color: #9f3737;
    font-weight: 700;
}

.account-delete-form {
    display: grid;
    gap: 22px;
}

.account-delete-form > label:not(.account-check) {
    display: grid;
    gap: 9px;
    color: #786d67;
    font-size: .86rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.account-delete-form input[type="password"] {
    width: 100%;
    padding: 14px 17px;
    border: 1px solid #e4d9d3;
    border-radius: 14px;
    background: #fff;
    color: #3f3835;
    font: inherit;
    font-weight: 400;
}

.account-delete-form input[type="password"]:focus {
    outline: none;
    border-color: #b54848;
    box-shadow: 0 0 0 4px rgba(181, 72, 72, .12);
}

.account-delete-confirm {
    border-color: rgba(181, 72, 72, .18);
    background: #fffafa;
}

.account-delete-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.account-cancel-button,
.account-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.account-cancel-button {
    border: 1px solid rgba(169, 99, 88, .2);
    background: #fffdf9;
    color: #6b625d;
}

.account-delete-button {
    border: none;
    background: #b54848;
    color: #fff;
    box-shadow: 0 14px 30px rgba(181, 72, 72, .22);
    transition: .25s ease;
}

.account-delete-button:hover {
    transform: translateY(-2px);
    background: #a23e3e;
}

/* Zone sensible dans mon-compte.php */

.account-danger-zone {
    max-width: 1180px;
    margin: 60px auto 0;
    padding: 26px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    border: 1px solid rgba(181, 72, 72, .16);
    border-radius: 22px;
    background: #fffafa;
}

.account-danger-zone h2 {
    font-size: .7rem;
    margin: 0 0 7px;
    color: #2f2f2f;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
}

.account-danger-zone p {
    font-size: small;
    font-style: italic;
    margin: 0;
    color: #786d67;
}

.account-danger-link {
    flex-shrink: 0;
    color: #b54848;
    font-size: 0.8rem;
    text-decoration: none;
}

.account-danger-link:hover {
    text-decoration: underline;
}

/******* INDICATEUR DE FORCE DU MOT DE PASSE *******/

.password-strength {
    margin: 0.75rem 0 1.5rem;
    padding: 1rem;
    border: 1px solid rgba(47, 47, 47, 0.12);
    border-radius: 1rem;
    background: #faf7f4;
}

.password-strength__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
    font-size: 0.9rem;
}

.password-strength__label {
    font-size: 0.85rem;
    font-weight: 600;
}

.password-strength__bar {
    height: 0.45rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(47, 47, 47, 0.1);
}

.password-strength__bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #9b8c83;
    transition:
        width 250ms ease,
        background-color 250ms ease;
}

.password-strength[data-score="1"] .password-strength__bar span {
    background: #b54848;
}

.password-strength[data-score="2"] .password-strength__bar span {
    background: #c97943;
}

.password-strength[data-score="3"] .password-strength__bar span {
    background: #c49a3a;
}

.password-strength[data-score="4"] .password-strength__bar span {
    background: #6c9271;
}

.password-strength[data-score="5"] .password-strength__bar span {
    background: #397a51;
}

.password-rules {
    display: grid;
    gap: 0.45rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    color: #746a64;
    font-size: 0.85rem;
}

.password-rules li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 200ms ease;
}

.password-rules li span {
    display: inline-flex;
    width: 1.15rem;
    height: 1.15rem;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    font-weight: 700;
}

.password-rules li.is-valid {
    color: #397a51;
}

.password-rules li.is-valid span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #fff;
    background: #397a51;

    font-size: 0.75rem;
    font-weight: 700;
}

/* Responsive */

@media screen and (max-width: 900px) {

    .account-stats,
    .account-grid{
        grid-template-columns:1fr;
    }

    .order-card{
        grid-template-columns:1fr;
    }

    .order-detail-layout {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {

    .security-card__content {
        align-items: stretch;
        flex-direction: column;
    }

    .security-card__content .button {
        justify-content: center;
        width: 100%;
    }

    .account-form__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .account-form__actions .button {
        justify-content: center;
        width: 100%;
    }

    .account-page{
        padding:45px 5% 70px;
    }

    .account-card,
    .stat-card,
    .order-card{
        border-radius:22px;
        padding:24px;
    }

    .account-card p{
        display:block;
    }

    .account-card strong{
        display:block;
        margin-top:4px;
        text-align:left;
    }

    .order-item-card,
    .order-items-list .account-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .order-item-image {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .order-items-list .account-button {
        margin-inline: auto;
    }
    .account-delete-card {
        padding: 25px;
        border-radius: 22px;
    }

    .account-delete-header {
        align-items: flex-start;
    }

    .account-delete-actions,
    .account-danger-zone {
        flex-direction: column;
        align-items: stretch;
    }

    .account-cancel-button,
    .account-delete-button {
        width: 100%;
    }

    .account-danger-link {
        text-align: center;
    }
}