/* NotaDesk WP — Public Styles
   Palette: rose #D8B2A7, taupe #75706D, gris chaud #595F5F
   Polices: Nunito (titres), Nunito Sans (corps) — héritées du thème */

/* ===== FAQ Accordion ===== */

.notadesk-faq {
    max-width: 800px;
    margin: 0 auto;
    font-family: inherit;
}

.notadesk-faq-category {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #D8B2A7;
}

.notadesk-faq-category:first-child {
    margin-top: 0;
}

.notadesk-faq-item {
    border: 1px solid #e8e0dc;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}

.notadesk-faq-item[open] {
    box-shadow: 0 2px 8px rgba(216, 178, 167, 0.15);
    border-color: #D8B2A7;
}

.notadesk-faq-question {
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notadesk-faq-question::-webkit-details-marker {
    display: none;
}

.notadesk-faq-question::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 300;
    color: #D8B2A7;
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 1rem;
}

.notadesk-faq-item[open] .notadesk-faq-question::after {
    content: '−';
}

.notadesk-faq-question:hover {
    background: #faf7f6;
}

.notadesk-faq-answer {
    padding: 0 1.25rem 1rem;
    color: #595F5F;
    line-height: 1.7;
}

.notadesk-faq-answer a {
    color: #75706D;
    text-decoration: underline;
    text-decoration-color: #D8B2A7;
    text-underline-offset: 3px;
}

.notadesk-faq-answer a:hover {
    color: #000;
}

.notadesk-faq-empty {
    text-align: center;
    padding: 2rem;
    color: #B9BDBD;
}

/* ===== Assistant Wizard ===== */

.notadesk-assistant {
    max-width: 840px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e8e0dc;
    border-radius: 0.375rem;
    overflow: hidden;
    font-family: inherit;
}

.notadesk-assistant-header {
    background: #75706D;
    color: #fff;
    padding: 1.25rem 1.5rem;
}

.notadesk-assistant-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.01em;
}

.notadesk-assistant-body {
    padding: 1.5rem;
}

.notadesk-assistant-step {
    animation: notadesk-fade-in 0.3s ease;
}

@keyframes notadesk-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.notadesk-assistant-question {
    font-size: 1.05rem;
    font-weight: 500;
    color: #000;
    margin-bottom: 1rem;
}

.notadesk-assistant-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notadesk-assistant-option {
    display: block;
    width: 100%;
    padding: 0.875rem 1.25rem;
    text-align: left;
    background: #faf7f6;
    border: 1px solid #e8e0dc;
    border-radius: 0.375rem;
    color: #595F5F;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.notadesk-assistant-option:hover {
    background: #f3ebe7;
    border-color: #D8B2A7;
    color: #000;
}

.notadesk-assistant-back {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: none;
    border: 1px solid #e8e0dc;
    border-radius: 0.375rem;
    color: #75706D;
    font-size: 0.875rem;
    cursor: pointer;
    font-family: inherit;
}

.notadesk-assistant-back:hover {
    background: #faf7f6;
    border-color: #D8B2A7;
}

.notadesk-assistant-message {
    color: #595F5F;
    line-height: 1.7;
    font-size: 0.95rem;
}

.notadesk-assistant-link {
    color: #75706D;
    text-decoration: underline;
    text-decoration-color: #D8B2A7;
    text-underline-offset: 3px;
}

.notadesk-assistant-link:hover {
    color: #000;
}

.notadesk-assistant-cta {
    display: inline-block;
    padding: 15px 25px;
    margin: 4px 0;
    background: #67333C;
    /* !important : le thème cible les liens de contenu via
       .entry-content a:not(.btn-cta)... (spécificité élevée, sans !important)
       et forcerait sinon le texte en bordeaux + souligné, illisible sur le fond. */
    color: #fff !important;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-decoration: none !important;
    transition: background 0.2s;
}

.notadesk-assistant-cta:hover {
    background: #542a31;
    color: #fff !important;
    text-decoration: none !important;
}

.notadesk-assistant-empty {
    text-align: center;
    padding: 2rem;
    color: #B9BDBD;
}

/* ===== Booking Widget ===== */

.notadesk-booking {
    max-width: 840px;
    margin: 0 auto;
    font-family: inherit;
}

/* Le widget booking est injecté hors de .notadesk-assistant-body : lui redonner le même padding. */
#notadesk-assistant-booking {
    padding: 1.5rem;
}

.notadesk-booking-description {
    text-align: left;
    line-height: 1.6;
    color: #4a4a4a;
    font-size: 0.95rem;
    margin: 0 0 1.5rem;
}

.notadesk-booking-description.is-plain {
    white-space: pre-wrap;
}

.notadesk-booking-description h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #000;
    margin: 1.25rem 0 0.5rem;
}

.notadesk-booking-description h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    margin: 1rem 0 0.4rem;
}

.notadesk-booking-description p {
    margin: 0 0 0.75rem;
}

.notadesk-booking-description ul,
.notadesk-booking-description ol {
    padding-left: 1.5rem;
    margin: 0 0 0.75rem;
}

.notadesk-booking-description ul {
    list-style: disc;
}

.notadesk-booking-description ol {
    list-style: decimal;
}

.notadesk-booking-description li {
    margin: 0.2rem 0;
}

.notadesk-booking-description strong {
    font-weight: 700;
}

.notadesk-booking-description em {
    font-style: italic;
}

.notadesk-booking-description > :first-child {
    margin-top: 0;
}

.notadesk-booking-description > :last-child {
    margin-bottom: 0;
}

.notadesk-booking-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 0.25rem;
}

.notadesk-booking-lieu {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.35rem;
}

.notadesk-booking-subtitle {
    color: #75706D;
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}

.notadesk-booking-tz {
    margin: 0 0 1.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid #D8B2A7;
    border-radius: 0.375rem;
    background: #faf7f6;
    color: #3f3a38;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}

.notadesk-booking-slots-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notadesk-booking-slot {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #e8e0dc;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
}

.notadesk-booking-slot:hover {
    border-color: #D8B2A7;
    background: #faf7f6;
}

.notadesk-booking-slot.selected {
    border-color: #D8B2A7;
    background: #f3ebe7;
    box-shadow: 0 0 0 1px #D8B2A7;
}

.notadesk-booking-slot-date {
    font-weight: 600;
    color: #000;
    min-width: 140px;
}

.notadesk-booking-slot-time {
    color: #595F5F;
}

.notadesk-booking-loading {
    text-align: center;
    padding: 2rem;
    color: #B9BDBD;
}

.notadesk-booking-more {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: none;
    border: 1px dashed #D8B2A7;
    border-radius: 0.375rem;
    color: #75706D;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.notadesk-booking-more:hover {
    background: #faf7f6;
    border-color: #c09a8d;
}

/* Booking form */

.notadesk-booking-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notadesk-booking-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #595F5F;
    margin-bottom: 0.25rem;
}

.notadesk-booking-field input,
.notadesk-booking-field textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #e8e0dc;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: #595F5F;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.notadesk-booking-field input:focus,
.notadesk-booking-field textarea:focus {
    outline: none;
    border-color: #D8B2A7;
    box-shadow: 0 0 0 3px rgba(216, 178, 167, 0.15);
}

.notadesk-booking-modalite fieldset {
    margin: 0;
    border: 1px solid #e8e0dc;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
}

.notadesk-booking-modalite legend {
    padding: 0 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #595F5F;
}

.notadesk-booking-modalite label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.4rem 0 0;
    font-weight: 400;
}

.notadesk-booking-modalite input[type="radio"] {
    width: auto;
    margin: 0;
    padding: 0;
    box-shadow: none;
}

.notadesk-booking-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.notadesk-booking-btn-primary {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: #75706D;
    color: #fff;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.notadesk-booking-btn-primary:hover {
    background: #5e5a57;
}

.notadesk-booking-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.notadesk-booking-btn-secondary {
    padding: 0.75rem 1.25rem;
    background: #fff;
    color: #75706D;
    border: 1px solid #e8e0dc;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.notadesk-booking-btn-secondary:hover {
    background: #faf7f6;
    border-color: #D8B2A7;
}

/* Confirmation */

.notadesk-booking-success {
    text-align: center;
    padding: 2rem;
}

.notadesk-booking-check {
    width: 48px;
    height: 48px;
    color: #D8B2A7;
    margin: 0 auto 1rem;
}

.notadesk-booking-lieu {
    display: none;
    font-style: normal;
    line-height: 1.6;
    margin: 1rem auto 0;
    padding: 0.75rem 1rem;
    max-width: 22rem;
    border: 1px solid #ecdcd6;
    border-radius: 8px;
    background: #fbf6f4;
    text-align: center;
}

.notadesk-booking-lieu__ligne {
    display: block;
}

.notadesk-booking-lieu__lien {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 600;
}

.notadesk-booking-note {
    color: #B9BDBD;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Error */

.notadesk-booking-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.375rem;
    padding: 1rem;
    color: #dc2626;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ===== Responsive ===== */

@media (max-width: 640px) {
    .notadesk-faq,
    .notadesk-assistant,
    .notadesk-booking {
        margin: 0 1rem;
    }

    .notadesk-booking-slot {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .notadesk-booking-actions {
        flex-direction: column;
    }
}

.notadesk-contact-intro:not(:empty) {
    margin: 0 0 1.5rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid #4f46e5;
    background: #f5f5ff;
    font-size: 1rem;
    line-height: 1.5;
    white-space: pre-line;
}

/* ===== Tarifs ===== */

.notadesk-tarifs { --nd-bordeaux: #67333C; --nd-rose: #D7B2A8; max-width: 640px; margin-left: auto; margin-right: auto; }
.notadesk-tarifs-groupe { margin-bottom: 2rem; }
.notadesk-tarifs-titre {
    color: var(--nd-bordeaux);
    border-bottom: 2px solid var(--nd-rose);
    padding-bottom: .3rem;
    margin-bottom: .75rem;
}
.notadesk-tarifs-liste { list-style: none; margin: 0; padding: 0; }
.notadesk-tarifs-ligne {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: .5rem 0;
    border-bottom: 1px solid #eee;
}
.notadesk-tarifs-nom { display: flex; flex-direction: column; }
.notadesk-tarifs-note { color: #888; font-size: .85em; }
.notadesk-tarifs-prix { color: var(--nd-bordeaux); font-weight: 600; white-space: nowrap; }

/* ===== Confirmation de rendez-vous ===== */

.notadesk-confirmation {
    --nd-bordeaux: #67333C;
    --nd-rose: #D7B2A8;
    max-width: 32rem;
    margin: 1rem auto;
    padding: 1.5rem;
    border: 1px solid #e8e0dc;
    border-radius: 0.5rem;
    background: #fff;
    text-align: center;
}

.notadesk-confirmation__loading {
    color: #888;
    font-size: 0.95rem;
}

.notadesk-confirmation__objet {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--nd-bordeaux);
    margin: 0 0 1.25rem;
}

.notadesk-confirmation__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.notadesk-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.notadesk-btn--primary {
    background: var(--nd-bordeaux);
    color: #fff;
    border: none;
}

.notadesk-btn--primary:hover {
    background: #542a31;
}

.notadesk-btn--secondary {
    background: #fff;
    color: var(--nd-bordeaux);
    border: 1px solid #e8e0dc;
}

.notadesk-btn--secondary:hover {
    background: #faf7f6;
    border-color: var(--nd-rose);
}

.notadesk-confirmation__message:not(:empty) {
    margin: 1rem 0 0;
    font-size: 1rem;
    color: #333;
}

.notadesk-confirmation__message--echec {
    color: #b45309;
}

/* ===== Dépôt sécurisé ===== */

.notadesk-depot-securise {
    max-width: 480px;
    margin: 0 auto;
    font-family: inherit;
}

.notadesk-depot-securise-intro {
    margin: 0 0 1.5rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid #4f46e5;
    background: #f5f5ff;
    font-size: 1rem;
    line-height: 1.5;
}

.notadesk-depot-securise-turnstile {
    display: flex;
    justify-content: center;
}

@media (max-width: 640px) {
    .notadesk-confirmation__actions { flex-direction: column; }
    .notadesk-btn { width: 100%; }
}
.notadesk-tarifs-avis { color: #888; font-size: .9em; margin-bottom: 1.25rem; }


/* ===== Formulaire Contact Form 7 (nœud « Formulaire » de l'assistant) ===== */

.notadesk-formulaire {
    --nd-bordeaux: #67333C;
    --nd-rose: #D7B2A8;
    max-width: 42rem;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    background: #fff;
    border: 1px solid #e8e0dc;
    border-radius: 0.75rem;
    box-sizing: border-box;
}

.notadesk-formulaire *,
.notadesk-formulaire *::before,
.notadesk-formulaire *::after { box-sizing: border-box; }

.notadesk-formulaire .wpcf7-form > p {
    margin: 0 0 1.75rem;
    line-height: 1.6;
}

.notadesk-formulaire .wpcf7-form label {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.5;
    color: #2b2b2b;
    margin: 0 0 1.75rem;
}

.notadesk-formulaire .wpcf7-form-control-wrap {
    display: block;
    margin-top: 0.5rem;
}

.notadesk-formulaire small {
    display: block;
    margin-top: 0.25rem;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #6b6360;
}

.notadesk-formulaire input[type="text"],
.notadesk-formulaire input[type="email"],
.notadesk-formulaire input[type="tel"],
.notadesk-formulaire input[type="date"],
.notadesk-formulaire textarea,
.notadesk-formulaire select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    font: inherit;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
    color: #2b2b2b;
    background-color: #fff;
    border: 1px solid #d9cfca;
    border-radius: 0.5rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.notadesk-formulaire textarea { min-height: 7rem; resize: vertical; }

.notadesk-formulaire select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 3rem;
    cursor: pointer;
    text-overflow: ellipsis;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2367333C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.notadesk-formulaire input:focus,
.notadesk-formulaire textarea:focus,
.notadesk-formulaire select:focus {
    outline: none;
    border-color: var(--nd-bordeaux);
    box-shadow: 0 0 0 3px rgba(215, 178, 168, 0.55);
}

/* Cases à cocher : une option par ligne, zone de clic généreuse */
.notadesk-formulaire .wpcf7-checkbox,
.notadesk-formulaire .wpcf7-acceptance { display: block; }

.notadesk-formulaire .wpcf7-list-item {
    display: block;
    margin: 0 0 0.5rem;
}

.notadesk-formulaire .wpcf7-list-item label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0;
    padding: 0.75rem 1rem;
    font-weight: 400;
    border: 1px solid #e8e0dc;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.notadesk-formulaire .wpcf7-list-item label:hover { background: #faf7f6; border-color: var(--nd-rose); }

.notadesk-formulaire input[type="checkbox"] {
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0.15rem 0 0;
    accent-color: var(--nd-bordeaux);
}

.notadesk-formulaire .wpcf7-acceptance .wpcf7-list-item label {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #4a4542;
}

.notadesk-formulaire input[type="submit"] {
    display: inline-block;
    width: 100%;
    padding: 0.9rem 1.5rem;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--nd-bordeaux);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.15s;
}

.notadesk-formulaire input[type="submit"]:hover { background: #542a31; }

.notadesk-formulaire .wpcf7-not-valid { border-color: #b45309; }

.notadesk-formulaire .wpcf7-not-valid-tip {
    margin-top: 0.4rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: #b45309;
}

.notadesk-formulaire .wpcf7-response-output {
    margin: 1.5rem 0 0;
    padding: 0.9rem 1rem;
    border-radius: 0.5rem;
}

@media (min-width: 640px) {
    .notadesk-formulaire { padding: 2.5rem 2.5rem; }
    .notadesk-formulaire input[type="submit"] { width: auto; min-width: 14rem; }
}

.notadesk-formulaire .nd-si[hidden] { display: none; }

/* ===== Paiement d'une facture en ligne ===== */

.notadesk-paiement {
    --nd-bordeaux: #67333C;
    --nd-rose: #D7B2A8;
    max-width: 40rem;
    margin: 1rem auto;
    padding: 1.5rem;
    border: 1px solid #e8e0dc;
    border-radius: 0.5rem;
    background: #fff;
}

.notadesk-paiement__titre {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    color: var(--nd-bordeaux);
}

.notadesk-paiement__message {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: #333;
}

.notadesk-paiement__message--succes {
    color: var(--nd-bordeaux);
    font-weight: 600;
}

.notadesk-paiement__resume {
    margin: 0 0 1rem;
}

.notadesk-paiement__resume > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f1ebe8;
}

.notadesk-paiement__resume dt {
    color: #666;
}

.notadesk-paiement__resume dd {
    margin: 0;
    text-align: right;
    white-space: nowrap;
}

.notadesk-paiement__solde {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0 0 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    background: #faf7f6;
    border-left: 4px solid var(--nd-rose);
}

.notadesk-paiement__solde strong {
    font-size: 1.6rem;
    color: var(--nd-bordeaux);
    white-space: nowrap;
}

.notadesk-paiement__alerte {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    background: #fff7ed;
    color: #b45309;
}

.notadesk-paiement__form {
    margin: 0;
    text-align: center;
}

.notadesk-paiement__payer {
    min-width: 14rem;
}

.notadesk-paiement__payer:disabled {
    opacity: 0.6;
    cursor: wait;
}

.notadesk-paiement__mention {
    margin: 0.5rem 0 1.5rem;
    font-size: 0.85rem;
    color: #888;
    text-align: center;
}

.notadesk-paiement__apercu iframe {
    width: 100%;
    height: 32rem;
    border: 1px solid #e8e0dc;
    border-radius: 0.375rem;
}

.notadesk-paiement__liens {
    margin: 0.75rem 0 0;
    text-align: center;
}

.notadesk-paiement__liens a {
    color: var(--nd-bordeaux);
}

.notadesk-paiement__liens a.notadesk-btn {
    display: inline-block;
    text-decoration: none;
}

@media (max-width: 640px) {
    .notadesk-paiement { padding: 1rem; }
    .notadesk-paiement__payer { width: 100%; min-width: 0; }
    .notadesk-paiement__resume dd { white-space: normal; }
}

/* ===== Espace client ===== */

.notadesk-espace {
    --nd-bordeaux: #67333C;
    --nd-rose: #D7B2A8;
    max-width: 40rem;
    margin: 1rem auto;
    padding: 1rem;
    border: 1px solid #e8e0dc;
    border-radius: 0.5rem;
    background: #fff;
    color: #333;
}

.notadesk-espace__titre {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    color: var(--nd-bordeaux);
}

.notadesk-espace__entete { margin: 0 0 0.75rem; }

.notadesk-espace__message { margin: 0 0 1rem; font-size: 1rem; }

.notadesk-espace__message--succes { color: var(--nd-bordeaux); font-weight: 600; }

.notadesk-espace__alerte {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    background: #fff7ed;
    color: #b45309;
}

.notadesk-espace__discret { margin: 0; font-size: 0.9rem; color: #666; }

.notadesk-espace__ouvrir { margin: 0; text-align: center; }

.notadesk-espace__session {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0 0 1rem;
    border-bottom: 1px solid #f1ebe8;
    font-size: 0.9rem;
    color: #666;
}

.notadesk-espace__session form { margin: 0; }

.notadesk-espace__email { overflow-wrap: anywhere; }

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

.notadesk-espace__lien { color: var(--nd-bordeaux); }

.notadesk-espace__dossiers,
.notadesk-espace__liste {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.notadesk-espace__dossiers li { margin: 0 0 0.5rem; }

.notadesk-espace__dossiers a {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e8e0dc;
    border-radius: 0.375rem;
    color: inherit;
    text-decoration: none;
}

.notadesk-espace__dossiers a:hover { background: #faf7f6; border-color: var(--nd-rose); }

.notadesk-espace__dossiers strong { color: var(--nd-bordeaux); }

.notadesk-espace__dossiers span { font-size: 0.9rem; color: #666; }

.notadesk-espace__section { margin: 1.25rem 0 0; }

.notadesk-espace__section h3 {
    margin: 0 0 0.5rem;
    padding: 0 0 0.25rem;
    font-size: 1.05rem;
    color: var(--nd-bordeaux);
    border-bottom: 2px solid var(--nd-rose);
}

.notadesk-espace__rdv,
.notadesk-espace__piece {
    padding: 0.6rem 0;
    border-bottom: 1px solid #f1ebe8;
}

.notadesk-espace__rdv p,
.notadesk-espace__piece p { margin: 0 0 0.15rem; }

.notadesk-espace__rdv-quand,
.notadesk-espace__piece-libelle { font-weight: 600; }

.notadesk-espace__liste--passes .notadesk-espace__rdv { opacity: 0.75; }

.notadesk-espace__etiquette {
    display: inline-block;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: #faf7f6;
    font-size: 0.8rem;
    color: var(--nd-bordeaux);
}

.notadesk-espace__consigne { font-size: 0.9rem; }

.notadesk-espace__piece--fournie .notadesk-espace__piece-libelle { font-weight: 500; }

/* RDV : vignette façon agenda (jour de la semaine en rouge, numéro du jour). */
.notadesk-espace__rdv { display: flex; gap: 0.85rem; align-items: flex-start; }

.notadesk-espace__rdv-texte { min-width: 0; }

.notadesk-espace__calendrier {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 3.4rem;
    overflow: hidden;
    border-radius: 0.6rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    line-height: 1;
}

.notadesk-espace__calendrier-haut {
    width: 100%;
    padding: 0.25rem 0 0.15rem;
    background: #e5383b;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.notadesk-espace__calendrier-jour {
    padding: 0.3rem 0 0.4rem;
    color: #1d1d1f;
    font-size: 1.6rem;
    font-weight: 300;
}

.notadesk-espace__fuseau { margin-left: 0.25rem; font-size: 0.9rem; font-weight: 400; color: #666; }

/* Pièces : check vert si fournie, croix rouge sinon. */
.notadesk-espace__piece { display: flex; gap: 0.6rem; align-items: flex-start; }

.notadesk-espace__piece-texte { min-width: 0; }

.notadesk-espace__statut { flex: none; width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; }

.notadesk-espace__statut--ok { fill: #2e7d32; }

.notadesk-espace__statut--manque { fill: #c62828; }

/* Onglets de la vue dossier : liens rendus côté serveur (?onglet=). */
.notadesk-espace__onglets {
    display: flex;
    gap: 0.25rem;
    margin: 1rem 0 0;
    border-bottom: 2px solid var(--nd-rose);
    overflow-x: auto;
}

.notadesk-espace__onglet {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    color: #555;
    text-decoration: none;
    white-space: nowrap;
}

.notadesk-espace__onglet:hover { color: var(--nd-bordeaux); background: #faf7f6; }

.notadesk-espace__onglet:focus-visible { outline: 2px solid var(--nd-bordeaux); outline-offset: -2px; }

.notadesk-espace__onglet--actif {
    border-color: var(--nd-rose);
    background: #fff;
    color: var(--nd-bordeaux);
    font-weight: 600;
    margin-bottom: -2px;
    border-bottom: 2px solid #fff;
}

/* Nombre de documents encore à fournir, dans l'en-tête de l'onglet Documents. */
.notadesk-espace__compteur {
    min-width: 1.4rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--nd-bordeaux);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4rem;
    text-align: center;
}

.notadesk-espace .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Fiche du dossier (onglet « Mon dossier »). */
.notadesk-espace__fiche {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 1rem;
    margin: 0 0 1rem;
}

.notadesk-espace__fiche dt { color: #666; }

.notadesk-espace__fiche dd { margin: 0; font-weight: 600; }

.notadesk-espace__parties { list-style: none; margin: 0; padding: 0; }

.notadesk-espace__parties li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f1ebe8;
}

/* « Envoyer des documents » : un seul bouton, sous la liste. */
.notadesk-espace__envoyer { margin: 1rem 0 0; }

.notadesk-espace__envoyer .notadesk-espace__discret { margin: 0 0 0.5rem; }

/* « Écrire à la notaire » */
.notadesk-espace__ecrire label { display: block; margin: 0 0 0.25rem; font-weight: 600; }
.notadesk-espace__ecrire input[type="text"],
.notadesk-espace__ecrire textarea { width: 100%; box-sizing: border-box; font: inherit; }
.notadesk-espace__ecrire .cf-turnstile { margin: 0.5rem 0; }

@media (max-width: 640px) {
    /* Les trois onglets se partagent la largeur, titre sur deux lignes au besoin. */
    .notadesk-espace__onglet {
        flex: 1 1 0;
        justify-content: center;
        padding: 0.45rem 0.35rem;
        font-size: 0.85rem;
        line-height: 1.2;
        text-align: center;
        white-space: normal;
    }
}

@media (min-width: 641px) {
    .notadesk-espace { padding: 1.5rem; }
    .notadesk-espace .notadesk-btn { width: auto; min-width: 14rem; }
    .notadesk-espace__session { flex-direction: row; align-items: center; justify-content: space-between; }
    .notadesk-espace__session .notadesk-btn { min-width: 0; padding: 0.5rem 1rem; }
}
