body {
    font-family: 'Lato', sans-serif;
}

h1, h2, h3 {
    font-family: 'Roboto Slab', serif;
}

.evakit-plan-container {
    background-color: #f8fafc;
}

.tab-button {
    transition: all 0.3s ease;
    border-bottom: 4px solid transparent;
}

.tab-button.active {
    border-color: #f59e0b;
    color: #1e293b;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.text-3xl {
    color: white;
}

/* Fix pour les inputs - s'assurer qu'ils sont cliquables et éditables */
.evakit-plan-container input[type="text"], 
.evakit-plan-container input[type="tel"], 
.evakit-plan-container input[type="checkbox"],
.evakit-plan-container textarea,
.evakit-plan-container select {
    pointer-events: auto !important;
    cursor: text !important;
    user-select: text !important;
}

.evakit-plan-container input[type="checkbox"] {
    cursor: pointer !important;
}

.evakit-plan-container input[type="text"], 
.evakit-plan-container input[type="tel"], 
.evakit-plan-container textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
}

.evakit-plan-container input[type="text"]:focus, 
.evakit-plan-container input[type="tel"]:focus, 
.evakit-plan-container textarea:focus {
    outline: none;
    ring: 2px solid #f59e0b;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.table-input {
    background-color: #f1f5f9;
}

.drawing-area {
    border: 2px dashed #64748b;
    height: 300px;
    background-color: #f1f5f9;
}

/* Print styles */
@media print {
    body {
        font-size: 10pt;
    }
    
    .no-print {
        display: none !important;
    }
    
    .print-container {
        box-shadow: none !important;
        border: none !important;
    }
    
    .tab-content {
        display: block !important;
        page-break-before: always;
    }
    
    .tab-content:first-of-type {
        page-break-before: auto;
    }
    
    h1, h2, h3 {
        color: #000 !important;
    }
    
    input[type="text"], input[type="tel"], textarea {
        border: 1px solid #ccc;
        padding: 4px;
        background-color: #fff;
    }
    
    table, th, td {
        border: 1px solid #ccc;
        border-collapse: collapse;
    }
    
    th, td {
        padding: 6px;
    }
    
    .drawing-area {
        border: 2px dashed #999;
        height: 300px;
        background-color: #fafafa;
    }
}

/* ====================================
   DOWNLOADS PAGE STYLES
   ==================================== */

.evakit-downloads-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.downloads-section {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.evacuation-plans-section {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Guides section */
.guides-download-section {
    margin-top: 1rem;
}

.guide-description {
    margin-bottom: 1.5rem;
    color: #64748b;
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.guide-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.guide-card:hover {
    border-color: var(--global-palette-btn-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.guide-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.guide-info {
    flex: 1;
}

.guide-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.guide-lang {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

.guide-download-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.625rem 1.25rem !important;
    background-color: var(--global-palette-btn-bg) !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

.guide-download-btn:hover {
    background-color: var(--global-palette-btn-bg-hover) !important;
    color: white !important;
    transform: translateY(-1px);
}

.guide-download-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Guide Download Card Styles */
.guide-download-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.guide-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.guide-card-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.language-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.language-selector label {
    font-weight: 500;
    color: #475569;
    font-size: 14px;
}

.guide-language-select {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.guide-language-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.download-guide-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.download-guide-btn:hover:not(:disabled) {
    background: #2563eb;
}

.download-guide-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
}

.download-guide-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Plans header with create button */
.plans-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.plans-header h2 {
    margin: 0 !important;
    line-height: 1;
    padding: 0;
}

/* Create plan button - styled as theme button */
.create-plan-btn,
a.create-plan-btn,
a.create-plan-btn:link,
a.create-plan-btn:visited {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    background-color: var(--global-palette-btn-bg) !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    text-align: center !important;
    vertical-align: middle !important;
    align-self: center !important;
}

/* Plans Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Plan card */
.plan-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.plan-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.plan-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.plan-icon {
    font-size: 2rem;
    line-height: 1;
}

.plan-info {
    flex: 1;
}

.plan-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
    font-family: 'Roboto Slab', serif;
}

.plan-date {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

/* Action buttons */
.plan-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.plan-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: white;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: 'Lato', sans-serif;
}

.plan-action-btn .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.plan-action-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.plan-action-btn:active {
    transform: translateY(0);
}

.view-btn:hover {
    background: #eeeeee;
    border-color: #7c7c7c;
    color: initial;
}

/* Rename button */
.rename-btn {
    border-color: #3b82f6;
    color: #3b82f6;
}

.rename-btn:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

.rename-btn .dashicons {
    color: inherit;
}

/* Print button */
.print-btn {
    border-color: #10b981;
    color: #10b981;
}

.print-btn:hover {
    background: #ecfdf5;
    border-color: #059669;
    color: #059669;
}

.print-btn .dashicons {
    color: inherit;
}

/* Delete button */
.delete-btn {
    border-color: #ef4444;
    color: #ef4444;
}

.delete-btn:hover {
    background: #fef2f2;
    border-color: #dc2626;
    color: #dc2626;
}

.delete-btn .dashicons {
    color: inherit;
}

/* Modal Viewer */
.plan-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.plan-viewer-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-width: 90vw;
    max-height: 90vh;
}

.plan-viewer-large {
    width: 95vw;
    height: 95vh;
}

.plan-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #1e293b;
    color: white;
    flex-shrink: 0;
}

.plan-viewer-title,
#plan-viewer-title,
.plan-viewer-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.plan-viewer-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.plan-viewer-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.plan-viewer-content {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

.plan-viewer-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.plan-viewer-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.plan-viewer-spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.plan-viewer-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f1f5f9;
    border-radius: 0 0 8px 8px;
    flex-shrink: 0;
}

.plan-viewer-footer button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-viewer-print {
    background-color: #f59e0b;
    color: white;
}

.plan-viewer-print:hover {
    background-color: #d97706;
}

.plan-viewer-download {
    background-color: #10b981;
    color: white;
}

.plan-viewer-download:hover {
    background-color: #059669;
}

.plan-viewer-btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.plan-viewer-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.plan-viewer-btn-download {
    background: #3b82f6;
    color: white;
}

.plan-viewer-btn-download:hover {
    background: #2563eb;
}

/* Loading state */
.plan-card.deleting {
    opacity: 0.5;
    pointer-events: none;
}

/* ====================================
   UNIFIED NOTIFICATION STYLES
   ==================================== */
.evakit-notification {
    position: fixed !important;
    top: 20px !important;
    left: 20px !important;
    padding: 16px 24px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 2147483647 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    min-width: 300px !important;
    max-width: 500px !important;
    transform: translateX(400px) !important;
    opacity: 0 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: white !important;
    visibility: hidden !important;
}

.evakit-notification.show {
    transform: translateX(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.evakit-notification.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-left: 4px solid #047857 !important;
}

.evakit-notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border-left: 4px solid #b91c1c !important;
}

.evakit-notification .notification-icon {
    font-size: 18px !important;
    font-weight: bold !important;
    flex-shrink: 0 !important;
}

.evakit-notification .notification-message {
    flex: 1 !important;
    line-height: 1.4 !important;
}

/* Animation d'apparition pour les notifications */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Responsive design pour les petits écrans */
@media (max-width: 768px) {
    .evakit-notification {
        top: 10px !important;
        left: 10px !important;
        min-width: auto !important;
        max-width: none !important;
        transform: translateY(-100px) !important;
    }
    
    .evakit-notification.show {
        transform: translateY(0) !important;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
    }
    
    .downloads-section,
    .evacuation-plans-section {
        padding: 1rem;
    }
    
    .plan-viewer-container {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .plan-viewer-header,
    .plan-viewer-footer {
        border-radius: 0;
    }
}

/* Amélioration pour très grands écrans */
@media (min-width: 1920px) {
    .plan-viewer-large {
        width: 90vw;
        height: 90vh;
    }
}

/* Support pour les thèmes WordPress avec z-index élevé */
.evakit-notification {
    z-index: 999999 !important;
}

/* Styles pour assurer la compatibilité avec les plugins de cache */
.evakit-notification * {
    box-sizing: border-box;
}

/* Force les notifications à apparaître même avec des conflits CSS */
.evakit-notification {
    display: flex !important;
    position: fixed !important;
    z-index: 2147483647 !important; /* Maximum z-index possible */
}

.evakit-notification.show {
    visibility: visible !important;
}

/* Responsive design */
@media (max-width: 640px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
    
    .plan-card-actions {
        gap: 0.375rem;
    }
    
    .plan-action-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
}

/* Empty state */
.woocommerce-message--info {
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
}

.woocommerce-message--info p {
    margin: 0 0 1rem 0;
}

.woocommerce-message--info a.button {
    background: #96588a;
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    transition: background 0.2s ease;
}

.woocommerce-message--info a.button:hover {
    background: #7a4670;
}