/**
 * naiss-sprint1.css — Sprint 1 : Partage & page invitée
 *
 * Couleurs brand Naissantiel :
 *   Vert sauge doux  #A3B9A2
 *   Rose poudré      #F4D7D6
 *   Brun terre cuite #A27864
 *   Beige sable      #F6F3EF
 *   Brun profond     #59473D
 *   Blanc cassé      #FAFAF8
 *
 * Ce fichier ne remplace aucune règle de naiss-birthlist.css.
 * Il ajoute uniquement les classes Sprint 1 nouvelles.
 */


/* ═══════════════════════════════════════════════════════════════════════════
   BLOC PARTAGE PARENT — .naiss-share-block
   ═══════════════════════════════════════════════════════════════════════════ */

.naiss-share-block {
    background: #F6F3EF;
    border: 1px solid #e8e2dc;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
    width: 100%;
}

.naiss-share-block__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #A27864;
    margin: 0 0 6px;
}

.naiss-share-block__helper {
    font-size: 0.875rem;
    color: #59473D;
    opacity: 0.8;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* ── Formulaire nom de liste ── */

.naiss-share-block__name-form {
    margin-bottom: 18px;
}

.naiss-share-block__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #59473D;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.naiss-share-block__field-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.naiss-share-block__input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #d4ccc5;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #59473D;
    background: #FAFAF8;
    font-family: inherit;
    transition: border-color 0.15s;
    min-width: 0; /* flex shrink fix */
}

.naiss-share-block__input:focus {
    outline: none;
    border-color: #A27864;
}

.naiss-share-block__input--url {
    font-size: 0.8rem;
    color: #59473D;
    opacity: 0.75;
    cursor: pointer;
    background: #fff;
}

.naiss-share-block__save-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ── URL + bouton copier ── */

.naiss-share-block__url-group {
    margin-bottom: 16px;
}

/* ── Bouton "Copier le message + lien" ── */

.naiss-share-block__message-group {
    margin-top: 4px;
}

.naiss-share-block__message-hint {
    font-size: 0.8rem;
    color: #59473D;
    opacity: 0.65;
    margin: 8px 0 0;
}

/* ── États feedback bouton copie ── */

.naiss-share-block__copy-btn--copied {
    background: #A3B9A2 !important;
    border-color: #A3B9A2 !important;
    color: #fff !important;
    cursor: default;
}

.naiss-share-block__copy-btn--error {
    background: #c97a7a !important;
    border-color: #c97a7a !important;
    color: #fff !important;
}

/* ── Responsive ── */

@media (max-width: 480px) {
    .naiss-share-block__field-row {
        flex-direction: column;
        align-items: stretch;
    }

    .naiss-share-block__save-btn,
    .naiss-share-block__copy-btn {
        width: 100%;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   PAGE INVITÉE PUBLIQUE — .naiss-shared-page
   ═══════════════════════════════════════════════════════════════════════════ */

.naiss-shared-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

/* ── En-tête ── */

.naiss-shared-page__header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e8e2dc;
}

.naiss-eyebrow--guest {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #A3B9A2;
    margin-bottom: 10px;
}

.naiss-shared-page__title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: #A27864;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.2;
}

.naiss-shared-page__intro {
    max-width: 580px;
    margin: 0 auto;
    color: #59473D;
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.85;
}

/* ── Grille produits ── */

.naiss-shared-page__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

/* ── Carte produit invité ── */

.naiss-shared-card {
    background: #FAFAF8;
    border: 1px solid #e8e2dc;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.18s, transform 0.18s;
}

.naiss-shared-card:hover {
    box-shadow: 0 6px 24px rgba(89, 71, 61, 0.1);
    transform: translateY(-2px);
}

.naiss-shared-card--gifted {
    opacity: 0.7;
}

.naiss-shared-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #F6F3EF;
}

.naiss-shared-card__image a {
    display: block;
    height: 100%;
}

.naiss-shared-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.naiss-shared-card__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #F6F3EF 0%, #F4D7D6 100%);
}

.naiss-state-badge--gifted {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #A3B9A2;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.naiss-shared-card__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.naiss-shared-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #59473D;
    margin: 0;
    line-height: 1.3;
}

.naiss-shared-card__title a {
    color: inherit;
    text-decoration: none;
}

.naiss-shared-card__title a:hover {
    color: #A27864;
}

.naiss-shared-card__excerpt {
    font-size: 0.82rem;
    color: #59473D;
    opacity: 0.7;
    line-height: 1.45;
    margin: 0;
}

.naiss-shared-card__variation {
    font-size: 0.8rem;
    color: #A27864;
    font-weight: 500;
    margin: 0;
}

.naiss-shared-card__price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #59473D;
    margin-top: auto;
    padding-top: 8px;
}

.naiss-shared-card__actions {
    margin-top: 12px;
}

.naiss-shared-card__gifted-label {
    display: block;
    text-align: center;
    font-size: 0.82rem;
    color: #A3B9A2;
    font-weight: 500;
    padding: 8px 0;
}

/* ── États vide & erreur ── */

.naiss-shared-page__empty,
.naiss-shared-page--error {
    text-align: center;
    padding: 48px 20px;
    color: #59473D;
    opacity: 0.7;
}

/* ── Footer ── */

.naiss-shared-page__footer {
    margin-top: 56px;
    text-align: center;
    font-size: 0.78rem;
    color: #59473D;
    opacity: 0.45;
    border-top: 1px solid #e8e2dc;
    padding-top: 24px;
}

/* ── Responsive mobile ── */

@media (max-width: 600px) {
    .naiss-shared-page {
        padding: 20px 14px 48px;
    }

    .naiss-shared-page__grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
    }

    .naiss-shared-card__body {
        padding: 12px;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   SPRINT 1.5 — SHARE BLOCK : en-tête + état bloqué
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── En-tête avec "Vers mon compte" aligné à droite ── */

.naiss-share-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.naiss-share-block__header .naiss-share-block__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #A27864;
}

.naiss-share-block__account-link {
    font-size: 0.82rem;
    color: #59473D;
    opacity: 0.65;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
    background: none;
    border: none;
    padding: 0;
}

.naiss-share-block__account-link:hover {
    opacity: 1;
    color: #A27864;
}

/* ── État bloqué : adresse manquante ── */

.naiss-share-block--blocked .naiss-share-block__input--url,
.naiss-share-block--blocked .naiss-share-block__copy-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    pointer-events: none;
}

.naiss-share-block__address-warning {
    background: #FDF0EE;
    border: 1.5px solid #D4908C;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.naiss-share-block__address-warning-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #A27864;
    margin: 0 0 6px;
}

.naiss-share-block__address-warning-body {
    font-size: 0.85rem;
    color: #59473D;
    margin: 0 0 14px;
    line-height: 1.5;
}

.naiss-share-block__address-cta {
    display: inline-block;
    margin-bottom: 10px;
}

.naiss-share-block__address-warning-hint {
    font-size: 0.78rem;
    color: #59473D;
    opacity: 0.6;
    margin: 0;
    font-style: italic;
}

/* Suppression du titre standalone (maintenant dans __header) */
.naiss-share-block > .naiss-share-block__title {
    display: none;
}


/* ═══════════════════════════════════════════════════════════════════════════
   SPRINT 1.5 — ENCART CADEAU PANIER / CHECKOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.naiss-gift-notice {
    background: #FDF4F3;
    border: 1.5px solid #F4D7D6;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.naiss-gift-notice__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #A27864;
    margin: 0 0 6px;
}

.naiss-gift-notice__list {
    font-size: 0.88rem;
    color: #59473D;
    margin: 0 0 4px;
    line-height: 1.5;
}

.naiss-gift-notice__delivery {
    font-size: 0.84rem;
    color: #59473D;
    opacity: 0.75;
    margin: 0;
    font-style: italic;
}

.naiss-gift-notice--checkout {
    border-color: #A3B9A2;
    background: #F3F8F3;
}

.naiss-gift-notice--checkout .naiss-gift-notice__title {
    color: #7A9A79;
}


/* ═══════════════════════════════════════════════════════════════════════════
   SPRINT 1.5 — CHOIX DE LIVRAISON
   ═══════════════════════════════════════════════════════════════════════════ */

.naiss-delivery-choice {
    margin: 20px 0 28px;
    padding: 20px;
    background: #F6F3EF;
    border: 1px solid #e8e2dc;
    border-radius: 12px;
}

.naiss-delivery-choice__legend {
    font-size: 0.9rem;
    font-weight: 700;
    color: #59473D;
    margin-bottom: 14px;
    display: block;
    padding: 0;
    border: none;
    width: 100%;
}

.naiss-delivery-choice__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.naiss-delivery-choice__option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #FAFAF8;
    border: 1.5px solid #e8e2dc;
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
}

.naiss-delivery-choice__option:hover {
    border-color: #A3B9A2;
}

.naiss-delivery-choice__option--selected {
    border-color: #A3B9A2;
    background: #F3F8F3;
}

.naiss-delivery-choice__radio {
    margin-top: 3px;
    accent-color: #A3B9A2;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.naiss-delivery-choice__label-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.naiss-delivery-choice__label-text strong {
    font-size: 0.9rem;
    color: #59473D;
}

.naiss-delivery-choice__hint {
    font-size: 0.8rem;
    color: #59473D;
    opacity: 0.65;
    line-height: 1.4;
}

.naiss-delivery-choice__recommended {
    font-size: 0.72rem;
    font-weight: 600;
    color: #A3B9A2;
    background: #E8F3E8;
    border-radius: 20px;
    padding: 2px 8px;
    align-self: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.naiss-delivery-choice__submit {
    margin-top: 6px;
    align-self: flex-start;
}

/* Responsive */
@media (max-width: 480px) {
    .naiss-share-block__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .naiss-delivery-choice__option {
        flex-wrap: wrap;
    }

    .naiss-delivery-choice__recommended {
        margin-top: 4px;
    }

    .naiss-delivery-choice__submit {
        width: 100%;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   SPRINT 1.5-FIX — TEXTAREA MESSAGE PERSONNALISÉ
   ═══════════════════════════════════════════════════════════════════════════ */

.naiss-share-block__message-section {
    margin-top: 20px;
    border-top: 1px solid #e8e2dc;
    padding-top: 18px;
}

.naiss-share-block__label--caps {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #A27864;
    font-weight: 700;
    margin-bottom: 8px;
}

.naiss-share-block__textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1.5px solid #d4ccc5;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #59473D;
    background: #FAFAF8;
    font-family: inherit;
    line-height: 1.55;
    resize: vertical;
    min-height: 90px;
    transition: border-color 0.15s;
    display: block;
}

.naiss-share-block__textarea:focus {
    outline: none;
    border-color: #A27864;
}

.naiss-share-block__textarea:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.naiss-share-block__message-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Bouton "Enregistrer le message" — discret, secondaire */
.naiss-share-block__message-form .naiss-btn-quiet {
    font-size: 0.8rem;
    padding: 6px 14px;
    color: #59473D;
    opacity: 0.65;
    background: none;
    border: 1px solid #d4ccc5;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.15s, border-color 0.15s;
}

.naiss-share-block__message-form .naiss-btn-quiet:hover {
    opacity: 1;
    border-color: #A27864;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPRINT 1.5-FIX — NOTICES DE CONFIRMATION DASHBOARD
   ═══════════════════════════════════════════════════════════════════════════ */

.naiss-dashboard-notice {
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.4s ease;
}

.naiss-dashboard-notice--success {
    background: #EEF6EE;
    border: 1.5px solid #A3B9A2;
    color: #3d6b3c;
}

.naiss-dashboard-notice--success::before {
    content: '✓';
    font-weight: 700;
    color: #A3B9A2;
    flex-shrink: 0;
}

.naiss-dashboard-notice--fading {
    opacity: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPRINT 2 — NOTICE ARTICLE AJOUTÉ (post-redirect success)
   ═══════════════════════════════════════════════════════════════════════════ */

.naiss-dashboard-notice--item-added {
    animation: naiss-notice-enter 0.35s ease both;
}

@keyframes naiss-notice-enter {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPRINT 1.5-FIX — RESPONSIVE MOBILE TEXTAREA + ACTIONS
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .naiss-share-block__message-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .naiss-share-block__message-actions .naiss-btn {
        width: 100%;
        text-align: center;
    }
}
