/**
 * NautiSphere - Welcome Modal Styles
 * FOND BLANC pour le corps de la modale (comme l'aperçu admin)
 * Header avec dégradé sombre, corps et footer sur fond blanc
 * @version 2.0.0
 */

/* ═══════════════════════════════════════════════════════════════════════════
   OVERLAY & CONTAINER
   ═══════════════════════════════════════════════════════════════════════════ */

.welcome-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 20, 50, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-modal-overlay.welcome-modal-visible {
    opacity: 1;
    visibility: visible;
}

.welcome-modal-overlay.welcome-modal-closing {
    opacity: 0;
}

/* Container principal - FOND BLANC */
.welcome-modal-container {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.welcome-modal-visible .welcome-modal-container {
    transform: scale(1) translateY(0);
}

.welcome-modal-closing .welcome-modal-container {
    transform: scale(0.95) translateY(10px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER - Dégradé sombre avec texte blanc
   ═══════════════════════════════════════════════════════════════════════════ */

.welcome-modal-header {
    position: relative;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #001e57 0%, #00b9d1 100%);
}

.welcome-modal-header-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gradient-color1, #001e57) 0%, var(--gradient-color2, #00b9d1) 100%);
}

.welcome-modal-header-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.welcome-modal-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Logo header - 64px */
.welcome-modal-logo {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: white;
}

/* [Logo-Fix] Quand un logo image est présent */
.welcome-modal-logo.has-logo-image {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.welcome-modal-logo.has-logo-image img,
.welcome-modal-logo-img {
    background: transparent !important;
    border: none !important;
    object-fit: contain !important;
    border-radius: 0 !important;
}

.welcome-modal-brand-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.welcome-modal-brand-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.025em;
}

.welcome-modal-brand-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    margin-top: 2px;
}

.welcome-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
}

.welcome-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BODY - FOND BLANC avec texte SOMBRE
   ═══════════════════════════════════════════════════════════════════════════ */

.welcome-modal-body {
    padding: 1.5rem 1.5rem 1rem;
    background: #ffffff;
}

/* Greeting Section - texte sombre sur fond blanc */
.welcome-modal-greeting {
    text-align: center;
    margin-bottom: 1rem;
}

.welcome-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.375rem 0;
    line-height: 1.3;
}

.welcome-modal-name {
    font-weight: 700;
    color: #00b9d1;
}

.welcome-modal-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

.welcome-modal-subtitle strong {
    color: #1f2937;
    font-weight: 600;
}

/* DateTime Section - fond gris très clair, texte sombre */
.welcome-modal-datetime {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #1e293b;
    border-radius: 10px;
}

.welcome-modal-date,
.welcome-modal-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #ffffff;
}

.welcome-modal-date svg,
.welcome-modal-time svg {
    color: rgba(255, 255, 255, 0.7);
    width: 16px;
    height: 16px;
}

/* Section Titles */
.welcome-modal-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem 0;
}

.welcome-modal-section-title svg {
    color: #00b9d1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATIONS CARDS - fond blanc/gris clair
   ═══════════════════════════════════════════════════════════════════════════ */

.welcome-modal-notifications {
    margin-bottom: 1rem;
}

.welcome-modal-notification-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.welcome-notification-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.welcome-notification-card:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.welcome-notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.welcome-notification-messages .welcome-notification-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.welcome-notification-appointments .welcome-notification-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.welcome-notification-alerts .welcome-notification-icon {
    background: #fee2e2;
    color: #ef4444;
}

.welcome-notification-content {
    display: flex;
    flex-direction: column;
}

.welcome-notification-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.welcome-notification-label {
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRIORITIES LIST - fond blanc
   ═══════════════════════════════════════════════════════════════════════════ */

.welcome-modal-priorities {
    margin-bottom: 1rem;
}

.welcome-priority-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.welcome-priority-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-radius: 10px;
    font-size: 0.875rem;
    color: #374151;
    border-left: 3px solid transparent;
}

.welcome-priority-item svg,
.welcome-priority-item i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.welcome-priority-warning {
    border-left-color: #f59e0b;
}

.welcome-priority-warning svg,
.welcome-priority-warning i {
    color: #f59e0b;
}

.welcome-priority-alert {
    border-left-color: #ef4444;
}

.welcome-priority-alert svg,
.welcome-priority-alert i {
    color: #ef4444;
}

.welcome-priority-info {
    border-left-color: #3b82f6;
}

.welcome-priority-info svg,
.welcome-priority-info i {
    color: #3b82f6;
}

/* Lecture en echec — DISTINCT d'un compteur a zero, et volontairement
   different des trois autres etats : ce n'est pas une priorite, c'est
   l'aveu qu'on ne sait pas. Pose le 2026-09-09 avec la regle des trois
   etats (welcome-modal.js, compterOuSignaler). */
.welcome-priority-indisponible {
    border-left-color: #94a3b8;
    border-left-style: dashed;
    color: #64748b;
    font-style: italic;
}

.welcome-priority-indisponible svg,
.welcome-priority-indisponible i {
    color: #94a3b8;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SKIPPER+ CTA - fond gris clair avec dégradé subtil
   ═══════════════════════════════════════════════════════════════════════════ */

.welcome-modal-skipper {
    margin-bottom: 0;
}

.welcome-skipper-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
}

/* Logo Skipper AI - 80px pour être impactant */
.welcome-skipper-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 185, 209, 0.2);
    border-radius: 14px;
    color: #00b9d1;
    flex-shrink: 0;
}

/* [Logo-Fix] Quand un logo Skipper image est présent */
.welcome-skipper-icon.has-logo-image {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    animation: none !important;
}

.welcome-skipper-icon.has-logo-image img,
.welcome-skipper-icon.has-logo-image .welcome-skipper-logo-img {
    background: transparent !important;
    border: none !important;
    object-fit: contain !important;
    border-radius: 0 !important;
}

/* Image du logo Skipper - 60px */
.welcome-skipper-logo-img {
    width: 60px;
    height: 60px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Conteneur du fallback SVG */
.welcome-skipper-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-skipper-fallback-svg {
    color: #00b9d1;
}

.welcome-skipper-content {
    flex: 1;
    min-width: 0;
}

.welcome-skipper-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.25rem 0;
}

.welcome-skipper-content p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.4;
}

.welcome-skipper-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: #00b9d1;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.welcome-skipper-btn:hover {
    background: #0891b2;
    transform: translateX(2px);
}

.welcome-skipper-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.welcome-skipper-btn:hover svg {
    transform: translateX(2px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER - FOND BLANC avec texte SOMBRE
   ═══════════════════════════════════════════════════════════════════════════ */

.welcome-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem 1.25rem;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.welcome-modal-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s ease;
}

.welcome-modal-checkbox:hover {
    color: #374151;
}

.welcome-modal-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #00b9d1;
    cursor: pointer;
}

.welcome-modal-start-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #00b9d1;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.welcome-modal-start-btn:hover {
    background: #0891b2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 185, 209, 0.3);
}

.welcome-modal-start-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.welcome-modal-start-btn:hover svg {
    transform: translateX(2px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    .welcome-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .welcome-modal-container {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 90vh;
        overflow-y: auto;
    }

    .welcome-modal-visible .welcome-modal-container {
        transform: translateY(0);
    }

    .welcome-modal-header {
        padding: 1rem;
    }

    .welcome-modal-body {
        padding: 1.25rem 1rem 1rem;
    }

    .welcome-modal-title {
        font-size: 1.25rem;
    }

    .welcome-modal-datetime {
        flex-direction: column;
        gap: 0.375rem;
        padding: 0.625rem 0.875rem;
    }

    .welcome-modal-notification-cards {
        grid-template-columns: 1fr;
    }

    .welcome-skipper-card {
        flex-direction: column;
        text-align: center;
        gap: 0.875rem;
        padding: 1rem;
    }

    .welcome-skipper-content {
        text-align: center;
    }

    /* Logos réduits sur mobile mais toujours visibles */
    .welcome-modal-logo {
        width: 56px;
        height: 56px;
    }

    .welcome-skipper-icon {
        width: 72px;
        height: 72px;
    }

    .welcome-skipper-logo-img {
        width: 54px;
        height: 54px;
    }

    .welcome-modal-footer {
        flex-direction: column;
        gap: 0.875rem;
        padding: 1rem;
    }

    .welcome-modal-start-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════════════════════ */

@media print {
    .welcome-modal-overlay {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODE APERÇU (ADMIN PREVIEW)
   ═══════════════════════════════════════════════════════════════════════════ */

.welcome-modal-preview {
    position: relative;
    padding: 0;
    background: transparent;
    opacity: 1;
    visibility: visible;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.welcome-modal-preview .welcome-modal-container {
    transform: none;
    transition: none;
}

.welcome-preview-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100%;
}

.welcome-modal-preview button:disabled {
    cursor: default;
    pointer-events: none;
}

.welcome-modal-preview .welcome-modal-close-placeholder {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

.welcome-modal-preview .welcome-modal-checkbox {
    cursor: default;
    opacity: 0.8;
}

.welcome-modal-preview .welcome-modal-checkbox input {
    cursor: default;
}

/* Conteneur d'aperçu dans l'admin */
#welcome-preview-container {
    min-height: 500px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 16px;
    padding: 1.5rem;
}
