/**
 * Styles pour les shortcodes
 */

:root {
    --primary: #253d89;
    --accent: #dc2626;
    --text: #1f2937;
    --border: #e5e7eb;
    --bg: #f9fafb;
}

/* === TYPES GRID === */
.archives-types-grid {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.type-card {
    background: white;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    border: 2px solid var(--border);
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.type-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(37, 61, 137, 0.15);
}

.type-icon {
    font-size: 50px;
    display: block;
    margin-bottom: 15px;
}

.type-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: var(--primary);
}

.type-count {
    color: #6b7280;
    font-size: 14px;
}

.type-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
}

.type-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === THÉMATIQUES === */
.archives-thematiques-grid {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.thematique-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.thematique-card:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.thematique-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    color: var(--primary);
}

.thematique-card a {
    text-decoration: none;
    color: inherit;
}

.thematique-count {
    color: #6b7280;
    font-size: 14px;
}

.thematique-children {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.thematique-children li {
    margin-bottom: 8px;
}

.thematique-children a {
    color: #4b5563;
    font-size: 14px;
}

.thematique-children a:hover {
    color: var(--primary);
}

/* === DOCUMENTS RÉCENTS === */
.archives-recent-grid {
    display: grid;
    gap: 25px;
    margin: 30px 0;
}

.recent-archive-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.recent-archive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.recent-archive-card:hover .card-image img {
    transform: scale(1.05);
}

.card-placeholder {
    height: 200px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    opacity: 0.5;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: var(--text);
    line-height: 1.4;
}

.card-author {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 10px 0;
}

.card-excerpt {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.card-date {
    color: #9ca3af;
    font-size: 13px;
}

/* === STATISTIQUES === */
.archives-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.stat-box.total {
    border-left: 5px solid var(--primary);
}

.stat-box.types {
    border-left: 5px solid #10b981;
}

.stat-box.themes {
    border-left: 5px solid var(--accent);
}

.stat-icon {
    font-size: 40px;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    color: #6b7280;
    font-size: 14px;
}

/* === INDEX ALPHABÉTIQUE === */
.archives-alphabet-index {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    margin: 30px 0;
}

.archives-alphabet-index h3 {
    margin: 0 0 20px 0;
    color: var(--primary);
}

.alphabet-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.alphabet-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s;
}

.alphabet-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.1);
}

/* === RECHERCHE === */
.archives-search-widget {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    margin: 30px 0;
}

.search-input-group {
    display: flex;
    gap: 10px;
}

.search-field {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
}

.search-field:focus {
    outline: none;
    border-color: var(--primary);
}

.search-submit {
    padding: 15px 30px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-submit:hover {
    background: #1e2f6b;
}

/* === PAR ANNÉE === */
.archives-by-year {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    margin: 30px 0;
}

.archives-by-year h3 {
    margin: 0 0 20px 0;
    color: var(--primary);
}

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

.years-list li {
    border-bottom: 1px solid var(--border);
}

.years-list li:last-child {
    border-bottom: none;
}

.years-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

.years-list a:hover {
    background: var(--bg);
    color: var(--primary);
    padding-left: 25px;
}

.years-list .year {
    font-weight: 600;
    font-size: 18px;
}

.years-list .count {
    color: #6b7280;
    font-size: 14px;
}

/* === SLIDER === */
.archives-slider {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 30px 0;
}

.slider-container {
    position: relative;
    height: 500px;
}

.slide {
    display: none;
    position: relative;
    height: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 40px;
}

.slide-content h2 {
    margin: 0 0 15px 0;
    font-size: 2em;
}

.slide-content p {
    margin: 0 0 20px 0;
    font-size: 1.1em;
    opacity: 0.9;
}

.slide-link {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s;
}

.slide-link:hover {
    background: var(--accent);
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.slider-prev:hover,
.slider-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .archives-types-grid,
    .archives-thematiques-grid,
    .archives-recent-grid {
        grid-template-columns: 1fr !important;
    }
    
    .archives-stats-container {
        grid-template-columns: 1fr;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .alphabet-letters {
        gap: 5px;
    }
    
    .alphabet-link {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .slider-container {
        height: 400px;
    }
    
    .slide-content {
        padding: 20px;
    }
    
    .slide-content h2 {
        font-size: 1.5em;
    }
    
    .slider-prev,
    .slider-next {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}

/* === WIDGETS ELEMENTOR === */
.elementor-archives-filters-widget {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(37, 61, 137, 0.1);
}

.widget-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.widget-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
}

.widget-search-input:focus {
    outline: none;
    border-color: #253d89;
}

.widget-search-button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #253d89, #3b5bb8);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.widget-search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 61, 137, 0.3);
}

.widget-filters-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.widget-filter-group {
    display: flex;
    flex-direction: column;
}

.widget-filter-group label {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 14px;
}

.widget-filter-select,
.widget-date-input {
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.widget-filter-select:focus,
.widget-date-input:focus {
    outline: none;
    border-color: #253d89;
}

.widget-date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-date-range span {
    font-weight: bold;
    color: #6b7280;
}

.widget-apply-button {
    padding: 14px;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.widget-apply-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.3);
}

.elementor-archives-grid {
    margin-top: 20px;
}

.elementor-archives-grid .loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #6b7280;
}

.elementor-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}