/* ==========================================================================
   Sections Actualités et Calendrier - Design Moderne & Accessible RGAA AA
   ========================================================================== */

/* Variables pour cohérence */
:root {
    --actu-primary: #005a6a;
    --actu-primary-dark: #004552;
    --event-primary: #006d5b;
    --event-primary-dark: #005547;
    --text-dark: #1a1a1a;
    --text-muted: #6c757d;
    --border-radius: 16px;
    --transition: all 0.3s ease;
}

/* ==========================================================================
   Hero Section - Design moderne épuré sans cards
   ========================================================================== */

.hero-section {
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafb 100%);
}

/* Formes décoratives en arrière-plan */
.hero-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    filter: blur(60px);
}

.hero-shape-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--actu-primary), var(--event-primary));
    top: -200px;
    left: -200px;
}

.hero-shape-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(45deg, var(--event-primary), var(--actu-primary));
    bottom: -100px;
    right: -100px;
}

.hero-shape-3 {
    width: 300px;
    height: 300px;
    background: var(--actu-primary);
    top: 50%;
    right: 10%;
    opacity: 0.05;
}

/* En-tête de la section */
.hero-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(0, 90, 106, 0.15);
    border: 2px solid rgba(0, 90, 106, 0.25);
    border-radius: 50px;
    color: #004552;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.hero-badge:hover {
    background: rgba(0, 90, 106, 0.2);
    transform: scale(1.05);
}

.hero-badge i {
    font-size: 1rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-dark);
    margin: 0 0 1rem 0;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Contenu - Items en grille horizontale */
.hero-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.hero-item {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    background: white;
    border-radius: 24px;
    border: 2px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.hero-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--actu-primary), var(--event-primary));
    transform: scaleY(0);
    transition: transform 0.4s ease;
}

.hero-item:hover::before {
    transform: scaleY(1);
}

.hero-item:hover {
    border-color: var(--actu-primary);
    box-shadow: 0 12px 40px rgba(0, 90, 106, 0.12);
    transform: translateY(-8px);
}

/* Premier item mis en avant */
.hero-item-featured {
    background: linear-gradient(135deg, rgba(0, 90, 106, 0.02) 0%, rgba(0, 109, 91, 0.02) 100%);
    border-color: rgba(0, 90, 106, 0.15);
}

.hero-item-featured::before {
    transform: scaleY(1);
}

/* Numéro de l'item */
.hero-item-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--actu-primary), var(--actu-primary-dark));
    border-radius: 16px;
    flex-shrink: 0;
    align-self: flex-start;
}

.hero-item-number span {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

/* Image/Visuel */
.hero-item-visual {
    width: 100%;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.hero-item-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-item:hover .hero-item-visual img {
    transform: scale(1.1);
}

/* Corps du contenu */
.hero-item-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.hero-item-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
}

.hero-item-text {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-item-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--actu-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.hero-item-link:hover,
.hero-item-link:focus {
    color: var(--actu-primary-dark);
    gap: 1rem;
    text-decoration: none;
}

.hero-item-link:focus {
    outline: 3px solid var(--actu-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

.hero-item-link i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.hero-item-link:hover i {
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 991px) {
    .hero-section {
        padding: 4rem 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hero-item {
        padding: 1.5rem;
    }
    
    .hero-header {
        margin-bottom: 3rem;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-item-number {
        width: 60px;
        height: 60px;
    }
    
    .hero-item-number span {
        font-size: 1.5rem;
    }
    
    .hero-item-visual {
        height: 180px;
    }
    
    .hero-item-title {
        font-size: 1.5rem;
    }
    
    .hero-item-text {
        font-size: 1rem;
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-header {
        margin-bottom: 2.5rem;
    }
    
    .hero-badge {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-content {
        gap: 1.5rem;
    }
    
    .hero-item {
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .hero-item:hover {
        transform: none;
    }
    
    .hero-item-number {
        width: 60px;
        height: 60px;
    }
    
    .hero-item-number span {
        font-size: 1.5rem;
    }
    
    .hero-item-visual {
        width: 100%;
        height: 200px;
    }
    
    .hero-item-title {
        font-size: 1.35rem;
    }
    
    .hero-item-text {
        font-size: 0.95rem;
        -webkit-line-clamp: 3;
    }
    
    .hero-item-link {
        font-size: 0.95rem;
    }
}

/* Conteneur des cards */
.row.g-4 {
    row-gap: 1.5rem !important;
    margin-bottom: 3rem;
}

/* ==========================================================================
   Cards Modernes - Base
   ========================================================================== */

.card-modern {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-modern:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* Headers des cards */
.card-modern-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    color: white;
    border-bottom: none;
}

.card-modern-header i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.card-modern-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

/* Actualités - Header */
.actu-header {
    background: linear-gradient(135deg, var(--actu-primary) 0%, var(--actu-primary-dark) 100%);
}

/* Événements - Header */
.event-header {
    background: linear-gradient(135deg, var(--event-primary) 0%, var(--event-primary-dark) 100%);
}

/* Body des cards */
.card-modern-body {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Items Modernes (Articles/Événements)
   ========================================================================== */

.modern-item {
    border-bottom: 1px solid #f0f0f0;
}

.modern-item:last-child {
    border-bottom: none;
}

.modern-item-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    position: relative;
}

.modern-item-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: var(--transition);
}

.actu-item .modern-item-link:hover::before,
.actu-item .modern-item-link:focus::before {
    background: var(--actu-primary);
}

.event-item .modern-item-link:hover::before,
.event-item .modern-item-link:focus::before {
    background: var(--event-primary);
}

.modern-item-link:hover,
.modern-item-link:focus {
    background: #f8f9fa;
    text-decoration: none;
}

.modern-item-link:focus {
    outline: 3px solid var(--actu-primary);
    outline-offset: -3px;
}

.modern-item-content {
    flex: 1;
    min-width: 0;
}

.modern-item-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    transition: var(--transition);
}

.modern-item-link:hover .modern-item-title,
.modern-item-link:focus .modern-item-title {
    color: var(--actu-primary);
}

.event-item .modern-item-link:hover .modern-item-title,
.event-item .modern-item-link:focus .modern-item-title {
    color: var(--event-primary);
}

.modern-item-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 0.75rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Méta-informations (date) */
.modern-item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.modern-item-meta i {
    font-size: 0.875rem;
}

/* Badge de date pour événements */
.event-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 109, 91, 0.15);
    border: 1px solid rgba(0, 109, 91, 0.3);
    border-radius: 8px;
    color: #004840;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.event-date-badge i {
    font-size: 0.875rem;
}

/* Flèche de navigation */
.modern-item-arrow {
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.modern-item-link:hover .modern-item-arrow,
.modern-item-link:focus .modern-item-arrow {
    color: var(--actu-primary);
    transform: translateX(4px);
}

.event-item .modern-item-link:hover .modern-item-arrow,
.event-item .modern-item-link:focus .modern-item-arrow {
    color: var(--event-primary);
}

/* ==========================================================================
   Footer des cards
   ========================================================================== */

.card-modern-footer {
    padding: 1.25rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.card-modern-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--actu-primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.event-card .card-modern-link {
    color: var(--event-primary);
}

.card-modern-link:hover,
.card-modern-link:focus {
    color: var(--actu-primary-dark);
    text-decoration: none;
    gap: 0.75rem;
}

.event-card .card-modern-link:hover,
.event-card .card-modern-link:focus {
    color: var(--event-primary-dark);
}

.card-modern-link:focus {
    outline: 3px solid var(--actu-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.card-modern-link i {
    transition: var(--transition);
}

.card-modern-link:hover i,
.card-modern-link:focus i {
    transform: translateX(4px);
}

/* ==========================================================================
   Responsive Mobile
   ========================================================================== */

@media screen and (max-width: 767px) {
    .card-modern {
        border-radius: 12px;
    }
    
    .card-modern-header {
        padding: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .card-modern-header i {
        font-size: 1.25rem;
    }
    
    .card-modern-header h2 {
        font-size: 1.25rem;
    }
    
    .modern-item-link {
        padding: 1.25rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .modern-item-title {
        font-size: 1rem;
    }
    
    .modern-item-arrow {
        align-self: flex-end;
    }
    
    .card-modern-footer {
        padding: 1rem 1.25rem;
    }
    
    .card-modern:hover {
        transform: none;
    }
}

/* ==========================================================================
   Préférence utilisateur : Réduction des animations
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .card-modern:hover {
        transform: none;
    }
    
    .modern-item-link:hover .modern-item-arrow {
        transform: none;
    }
    
    .card-modern-link:hover i {
        transform: none;
    }
}
