/* Section Notre ADN - Styles améliorés basés sur le design moderne */

.notre-adn-section {
    --accent: #ff8a00;
    --ink: #0a3a3a;
    --muted: #35595a;
    --bg: #fff;
    --overlay: #fde7c9;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    
    font-family: 'Avenir LT Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

.notre-adn-section * {
    box-sizing: border-box;
}

.notre-adn-section h2 {
    margin: 0 0 0.75rem;
    line-height: 1.1;
    font-size: clamp(28px, 3.2vw, 42px);
    color: var(--ink);
}

.notre-adn-section p.lead {
    margin: 0.25rem 0 2rem;
    color: var(--muted);
}

/* Container limité à 1300px */
.notre-adn-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 20px 10px;
}

/* Grille responsive moderne */
.notre-adn-grid {
    display: grid;
    gap: 28px;
    grid-auto-flow: dense;
    grid-template-columns: 1fr; /* phones: 1 col */
}

@media (min-width: 700px) { /* tablets: 2 cols -> donne 2/2/1 naturellement */
    .notre-adn-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) { /* medium: système 6-col */
    .notre-adn-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (min-width: 1200px) { /* large: système 12-col -> layout 3/2 */
    .notre-adn-grid {
        grid-template-columns: repeat(12, 1fr);
    }
}

/* Utilitaires de span pour composer le layout 3/2 */
@media (min-width: 1200px) {
    .notre-adn-item:nth-child(1),
    .notre-adn-item:nth-child(2),
    .notre-adn-item:nth-child(3) {
        grid-column: span 4; /* 3 cartes par ligne (4+4+4=12) */
    }
    .notre-adn-item:nth-child(4),
    .notre-adn-item:nth-child(5) {
        grid-column: span 6; /* 2 cartes sur la ligne suivante (6+6=12) */
    }
}

@media (min-width: 900px) and (max-width: 1199.98px) {
    .notre-adn-item:nth-child(1),
    .notre-adn-item:nth-child(2),
    .notre-adn-item:nth-child(4),
    .notre-adn-item:nth-child(5) {
        grid-column: span 3; /* 2 cartes par ligne (3+3=6) */
    }
    .notre-adn-item:nth-child(3) {
        grid-column: span 6; /* pleine largeur sur grille 6-col */
    }
}

/* Carte */
.notre-adn-item {
    position: relative;
    background: var(--bg);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

/* Media avec aspect ratio */
.notre-adn-item-media {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.notre-adn-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1);
    transition: transform 0.45s ease;
}

/* Badge numéro avec pointillés */
.notre-adn-item-badge {
    position: absolute;
    z-index: 2;
    left: 18px;
    top: -24px;
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 999px;
    background: #fff;
    color: var(--accent);
    font-weight: 700;
    font-size: 28px;
    box-shadow: var(--shadow);
}

.notre-adn-item-badge::after {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 999px;
    border: 3px dotted var(--accent);
    opacity: 0.75;
}

/* Titre et sous-titre */
.notre-adn-item-title {
    text-align: center;
    padding: 14px 14px 2px;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

.notre-adn-item-subtitle {
    text-align: center;
    padding: 0 16px 18px;
    color: var(--muted);
    margin: 0;
}

/* Overlay hover/focus */
.notre-adn-item-overlay {
    position: absolute;
    inset: 0;
    background: var(--overlay);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow: auto;
    z-index: 3;
}

.notre-adn-item-overlay p {
    margin: 0;
    line-height: 1.55;
    font-size: 15px;
    color: var(--ink);
}

.notre-adn-item:hover .notre-adn-item-overlay,
.notre-adn-item:focus-within .notre-adn-item-overlay {
    opacity: 1;
    transform: translateY(0);
}

.notre-adn-item:hover .notre-adn-item-media img,
.notre-adn-item:focus-within .notre-adn-item-media img {
    transform: scale(1.04);
}

/* Lien pour rendre toute la carte focusable */
.notre-adn-item-link {
    position: absolute;
    inset: 0;
    z-index: 4;
    outline: none;
}

.notre-adn-item-link:focus {
    outline: 3px solid rgba(255, 138, 0, 0.35);
    outline-offset: -3px;
}

/* Titre de section - masqué par défaut */
.notre-adn-title,
.notre-adn-subtitle {
    display: none;
}

/* Responsive Design - déjà géré par le système de grille moderne */
@media (max-width: 480px) {
    .notre-adn-container {
        padding: 20px 15px 10px;
    }
    
    .notre-adn-grid {
        gap: 20px;
    }
    
    .notre-adn-item-badge {
        width: 60px;
        height: 60px;
        font-size: 24px;
        left: 15px;
        top: -20px;
    }
    
    .notre-adn-item-title {
        font-size: 1.1rem;
        padding: 12px 12px 2px;
    }
    
    .notre-adn-item-subtitle {
        padding: 0 12px 15px;
    }
    
    .notre-adn-item-overlay {
        padding: 15px;
    }
    
    .notre-adn-item-overlay p {
        font-size: 14px;
    }
}