/* ==========================================================================
   Guides de tailles génériques — modal HTML5 <dialog> custom DA Leavah
   ========================================================================== */

/* Lien "(Guide des tailles)" à côté du label Taille */
.modal-sizes-guide-link {
    background: none;
    border: none;
    cursor: pointer;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: #b8960c;
    text-decoration: underline;
    text-decoration-color: rgba(184, 150, 12, 0.5);
    text-underline-offset: 3px;
    padding: 2px 6px;
    margin-left: 8px;
    vertical-align: baseline;
    transition: color 0.18s ease, text-decoration-color 0.18s ease;
}
.modal-sizes-guide-link:hover {
    color: #8b7000;
    text-decoration-color: #8b7000;
}
.modal-sizes-guide-link:focus-visible {
    outline: 2px solid #b8960c;
    outline-offset: 2px;
}

/* ===== Modal <dialog> ===== */
.size-guide {
    /* Centrage explicite via translate (le margin:auto natif du <dialog>
       avec .showModal() est capricieux selon les navigateurs quand on
       fixe une largeur sur le contenu interne). */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    border: none;
    padding: 0;
    background: transparent;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
}
.size-guide:not([open]) {
    display: none;
}
.size-guide::backdrop {
    background: rgba(26, 26, 26, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.size-guide[open] {
    animation: size-guide-fade-in 0.22s cubic-bezier(0.2, 0.7, 0.3, 1);
}
@keyframes size-guide-fade-in {
    from { opacity: 0; transform: scale(0.98) translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.size-guide__inner {
    position: relative;
    width: min(640px, calc(100vw - 32px));
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: #faf8f5;
    color: #1a1a1a;
    padding: 36px 40px 32px;
    border: 1px solid rgba(184, 150, 12, 0.3);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.55;
}

.size-guide__close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    color: #888;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.15s ease;
}
.size-guide__close:hover { color: #1a1a1a; }

/* ─── Header ─── */
.size-guide__header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(184, 150, 12, 0.25);
}
.size-guide__eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #b8960c;
    margin: 0 0 8px;
}
.size-guide__title {
    font-family: 'Linux Libertine', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.6rem;
    color: #1a1a1a;
    margin: 0 0 10px;
}
.size-guide__intro {
    font-size: 0.92rem;
    color: #555;
    margin: 0;
}

/* ─── Sections ─── */
.size-guide__section {
    margin-bottom: 26px;
}
.size-guide__h3 {
    font-family: 'Linux Libertine', Georgia, serif;
    font-size: 1.05rem;
    font-style: italic;
    color: #b8960c;
    margin: 0 0 14px;
    letter-spacing: 0.02em;
}

/* ─── Tableau ─── */
.size-guide__table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(184, 150, 12, 0.2);
}
.size-guide__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.size-guide__table th {
    background: rgba(184, 150, 12, 0.08);
    color: #1a1a1a;
    font-family: inherit;
    font-weight: 600;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(184, 150, 12, 0.25);
    text-align: left;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}
.size-guide__table td {
    padding: 9px 14px;
    border-bottom: 1px solid rgba(184, 150, 12, 0.1);
}
.size-guide__table tbody tr:last-child td { border-bottom: none; }
.size-guide__table tbody tr:hover { background: rgba(184, 150, 12, 0.04); }

/* ─── Méthodes ─── */
.size-guide__method {
    margin-bottom: 14px;
    padding-left: 14px;
    border-left: 2px solid rgba(184, 150, 12, 0.4);
}
.size-guide__h4 {
    font-family: 'Linux Libertine', Georgia, serif;
    font-size: 0.95rem;
    font-style: italic;
    color: #1a1a1a;
    margin: 0 0 4px;
    letter-spacing: 0.01em;
}
.size-guide__method p {
    margin: 0;
    font-size: 0.88rem;
    color: #444;
    line-height: 1.6;
}

/* ─── Tips ─── */
.size-guide__tips {
    margin-top: 24px;
    padding: 14px 18px;
    background: rgba(184, 150, 12, 0.06);
    border-left: 3px solid #b8960c;
    font-size: 0.85rem;
    color: #444;
    line-height: 1.55;
}
.size-guide__tips p { margin: 0; }
.size-guide__tips strong {
    color: #b8960c;
    font-style: italic;
}

/* ─── Responsive mobile ─── */
@media (max-width: 600px) {
    .size-guide__inner {
        padding: 28px 22px 24px;
        width: calc(100vw - 16px);
        max-height: calc(100vh - 24px);
    }
    .size-guide__title {
        font-size: 1.35rem;
    }
    .size-guide__table {
        font-size: 0.82rem;
    }
    .size-guide__table th,
    .size-guide__table td {
        padding: 8px 10px;
    }
}
