/**
 * Anacoluthe - Cards Styles
 * Design V251204 - Style pastel avec emoji débordant
 */

/* ===========================================
   FILTRES - SWITCHER
   =========================================== */

.filters {
    display: flex;
    gap: 0.25rem;
    max-width: 100%;
    width: fit-content;
    margin: 0 auto 2rem auto;
    background: #F3F4F6; /* gray-100 */
    padding: 0.25rem;
    border-radius: 2rem;
    border: 1px solid var(--border-light);
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

@media (max-width: 768px) {
    .filters {
        margin: 0 auto 1rem auto;
    }
    
    /* Réduire l'espace header sur page jeu */
    header {
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
    }
    
    /* Réduire l'espace en bas de la galerie */
    .cards-gallery-container {
        margin-bottom: 1rem;
    }
    
    /* Réduire le padding-bottom du main */
    main {
        padding-bottom: 2rem;
    }
}

.filters::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.filter-btn {
    flex-shrink: 0;
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* État inactif - couleurs légères */
.filter-btn[data-filter="all"] {
    color: #6B7280; /* gray-500 */
}
.filter-btn[data-filter="all"]:hover {
    color: #374151; /* gray-700 */
    background: rgba(255,255,255,0.5);
}
.filter-btn[data-filter="all"].active {
    background: var(--blanc);
    color: #1F2937; /* gray-800 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-btn[data-filter="role"] {
    color: var(--amber-100);
    color: #D97706; /* amber-600 light */
}
.filter-btn[data-filter="role"]:hover {
    color: var(--amber-700);
    background: rgba(255,255,255,0.5);
}
.filter-btn[data-filter="role"].active {
    background: var(--blanc);
    color: var(--amber-700);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-btn[data-filter="moment"] {
    color: #5EADA8; /* teal-400 */
}
.filter-btn[data-filter="moment"]:hover {
    color: var(--teal-700);
    background: rgba(255,255,255,0.5);
}
.filter-btn[data-filter="moment"].active {
    background: var(--blanc);
    color: var(--teal-700);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-btn[data-filter="sos"] {
    color: #E53935; /* brick light */
}
.filter-btn[data-filter="sos"]:hover {
    color: #C62828; /* brick-700 */
    background: rgba(255,255,255,0.5);
}
.filter-btn[data-filter="sos"].active {
    background: var(--blanc);
    color: #C62828; /* brick-700 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ===========================================
   GALERIE DE CARTES - WRAPPER FULLWIDTH
   =========================================== */

.cards-gallery-container {
    /* Sortir du conteneur main (800px) pour full-width avec padding 2rem */
    max-width: none;
    margin-left: calc(-50vw + 50% + 4rem);
    margin-right: calc(-50vw + 50% + 4rem);
}

/* ===========================================
   GALERIE DE CARTES
   =========================================== */

.cards-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 1.5rem; /* Plus d'espace vertical pour l'emoji débordant */
    
    /* Limiter la largeur max et centrer */
    max-width: 1200px;
    margin: 0 auto;
}

/* ===========================================
   TUILES DE CARTES (galerie)
   =========================================== */

.card-tile {
    position: relative;
    border-radius: var(--radius-card);
    overflow: visible; /* Pour permettre l'emoji débordant */
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 1.5rem;
    padding-top: 2.5rem; /* Espace pour l'emoji */
    margin-top: 1.5rem; /* Espace pour l'emoji débordant */
}

.card-tile:hover {
    transform: translateY(-4px);
}

/* Emoji débordant */
.card-emoji {
    position: absolute;
    top: -1.5rem;
    left: 1rem;
    font-size: 3.5rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.06));
    z-index: 5;
}

/* ===========================================
   COULEURS PAR TYPE DE CARTE
   =========================================== */

/* RÔLES (Ambre/Orange) */
.card-tile[data-type="role"] {
    background-color: var(--amber-50);
    border: 1px solid var(--teal-700);
}
.card-tile[data-type="role"]:hover {
    box-shadow: 0 6px 16px rgba(201, 106, 48, 0.15);
}
.card-tile[data-type="role"] .card-tile-title {
    color: var(--amber-700);
}
.card-tile[data-type="role"] .card-type-badge {
    background-color: var(--amber-100);
    color: var(--amber-700);
}

/* MOMENTS (Teal) */
.card-tile[data-type="moment"] {
    background-color: var(--teal-50);
    border: 1px solid var(--amber-700);
}
.card-tile[data-type="moment"]:hover {
    box-shadow: 0 6px 16px rgba(61, 139, 135, 0.15);
}
.card-tile[data-type="moment"] .card-tile-title {
    color: var(--teal-700);
}
.card-tile[data-type="moment"] .card-type-badge {
    background-color: var(--teal-100);
    color: var(--teal-700);
}

/* SOS (Brick - rouge brique) */
.card-tile[data-type="sos"] {
    background-color: #FFEBEE; /* brick-50 */
    border: 1px solid var(--teal-700);
}
.card-tile[data-type="sos"]:hover {
    box-shadow: 0 6px 16px rgba(198, 40, 40, 0.15);
}
.card-tile[data-type="sos"] .card-tile-title {
    color: #C62828; /* brick-700 */
}
.card-tile[data-type="sos"] .card-type-badge {
    background-color: #FFCDD2; /* brick-100 */
    color: #C62828; /* brick-700 */
}

/* ===========================================
   CONTENU DES TUILES
   =========================================== */

.card-tile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0;
}

.card-tile-title {
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
}

.card-badges {
    position: absolute;
    top: -0.7rem;
    right: 1rem;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.card-type-badge {
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

.badge-proto {
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    background: #FEF3C7;
    color: #92400E;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.card-tile-body {
    padding-top: 0.25rem;
}

.card-tile-subtitle {
    font-family: 'Merriweather', serif;
    font-size: 0.9rem;
    font-style: italic;
    margin: 0 0 0.75rem 0;
    text-align: left;
}

/* Couleur subtitle opposée par type */
.card-tile[data-type="role"] .card-tile-subtitle {
    color: var(--teal-700);
}
.card-tile[data-type="moment"] .card-tile-subtitle {
    color: var(--amber-700);
}
.card-tile[data-type="sos"] .card-tile-subtitle {
    color: #0066AD; /* bleu Glénans - accent SOS */
}
.card-tile[data-type="affiche"] .card-tile-subtitle {
    color: #C62828; /* brick-700 - accent affiche */
}

.card-tile-description {
    font-family: 'Merriweather', serif;
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--text-dark);
    margin: 0 0 1rem 0;
    text-align: left;
    line-height: 1.5;
}

/* Section tags */
.card-tile-tags {
    background: rgba(255,255,255,0.5);
    border-radius: var(--radius-small);
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.card-tile-tags-title {
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* Couleur du titre des tags par type */
.card-tile[data-type="role"] .card-tile-tags-title {
    color: var(--amber-700);
}
.card-tile[data-type="moment"] .card-tile-tags-title {
    color: var(--teal-700);
}
.card-tile[data-type="sos"] .card-tile-tags-title {
    color: #C62828; /* brick-700 */
}

.card-tile-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.card-tile-tag {
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}

/* Couleur des tags par type */
.card-tile[data-type="role"] .card-tile-tag {
    background-color: var(--amber-100);
    color: var(--amber-700);
}
.card-tile[data-type="moment"] .card-tile-tag {
    background-color: var(--teal-100);
    color: var(--teal-700);
}
.card-tile[data-type="sos"] .card-tile-tag {
    background-color: #FFCDD2; /* brick-100 */
    color: #C62828; /* brick-700 */
}

/* ===========================================
   ÉTATS SPÉCIAUX
   =========================================== */

.card-tile.card-unavailable {
    opacity: 0.6;
    cursor: not-allowed;
}

.card-tile.card-unavailable:hover {
    transform: none;
    box-shadow: none;
}

.badge-unavailable {
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    background: #E2E8F0;
    color: #475569;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

/* ===========================================
   MODALE
   =========================================== */

.card-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh; /* Dynamic viewport height - tient compte des barres navigateur */
    z-index: 1000;
}

.card-modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Safe areas pour iPhone/Android avec encoches */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.card-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.card-modal-content {
    position: relative;
    background: var(--blanc);
    width: 90%;
    max-width: 700px;
    max-height: 85dvh; /* dvh au lieu de vh */
    max-height: 85vh; /* fallback navigateurs anciens */
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

@supports (height: 100dvh) {
    .card-modal-content {
        max-height: 85dvh;
    }
}

.card-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: var(--gris-glenans);
    color: var(--blanc);
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    transition: background 0.2s ease;
}

.card-modal-close:hover {
    background: var(--rouge-glenans);
}

/* Fond modale - crème uniforme */
.card-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    background-color: var(--bg-cream);
}

/* ===========================================
   CONTENU DE CARTE (Markdown rendu)
   =========================================== */

.card-content {
    font-family: 'Merriweather', serif;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-dark);
}

/* Tous les titres en Sans */
.card-content h1,
.card-content h2,
.card-content h3,
.card-content h4,
.card-content h5,
.card-content h6 {
    font-family: 'Merriweather Sans', sans-serif;
}

.card-content h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.25rem 0;
    padding-right: 3rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.card-content h2 {
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    margin: 2rem 0 1.5rem 0;
    padding-top: 1rem;
    border-top: 2px solid var(--border-light);
}

/* Border H2 par type (couleur accent-200) */
.modal-role .card-content h2 { border-top-color: #a3d4d0; /* teal-200 */ }
.modal-moment .card-content h2 { border-top-color: #fcd9b8; /* amber-200 */ }
.modal-sos .card-content h2 { border-top-color: #90caf9; /* glenans-200 */ }
.modal-affiche .card-content h2 { border-top-color: #EF9A9A; /* brick-200 */ }

/* Premier H2 (en tête de contenu) : pas de border-top */
.card-content > h2:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.card-content h3 {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1.5rem 0 0.75rem 0;
}

.card-content h4 {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    margin: 1.25rem 0 0.5rem 0;
}

/* H6 = sous-titre de carte */
.card-content h6 {
    font-size: 1.4rem;
    font-weight: 400;
    font-style: italic;
    margin: 0 0 2rem 0;
}

/* Couleurs opposées pour H6 */
.modal-role .card-content h6 {
    color: var(--teal-700);
}
.modal-moment .card-content h6 {
    color: var(--amber-700);
}
.modal-sos .card-content h6 {
    color: #0066AD; /* bleu Glénans - accent SOS */
}

.card-content p {
    margin: 0 0 1rem 0;
    text-align: left;
}

.card-content strong {
    font-weight: 700;
}

.card-content em {
    font-style: italic;
}

.card-content hr {
    border: none;
    border-top: 2px solid var(--border-light);
    margin: 1.5rem auto;
    width: 50%;
}

/* Couleur hr par type (principal-300) */
.modal-role .card-content hr { border-top-color: #f5b078; /* amber-300 */ }
.modal-moment .card-content hr { border-top-color: #7ec4bf; /* teal-300 */ }
.modal-sos .card-content hr { border-top-color: #E57373; /* brick-300 */ }
.modal-affiche .card-content hr { border-top-color: #7A9CC6; /* navy-300 */ }

.card-content ul {
    margin: 0 0 1rem 1.5rem;
    padding: 0;
}

.card-content li {
    margin: 0;
}

.card-content blockquote {
    background: var(--blanc);
    border-radius: var(--radius-small);
    border-left: 4px solid var(--border-light);
    margin: 0 0 1.5rem 0;
    padding: 1rem 1.25rem;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.6;
}

.card-content blockquote p {
    margin: 0;
}

/* Couleur de la bordure blockquote selon type (accent) */
.modal-role .card-content blockquote {
    border-left-color: var(--teal-700);
}
.modal-moment .card-content blockquote {
    border-left-color: var(--amber-700);
}
.modal-sos .card-content blockquote {
    border-left-color: #0066AD; /* bleu Glénans */
}

/* Couleurs titres modale selon type */
.modal-role .card-content h1,
.modal-role .card-content h2,
.modal-role .card-content h3,
.modal-role .card-content h4 {
    color: var(--amber-700);
}

.modal-moment .card-content h1,
.modal-moment .card-content h2,
.modal-moment .card-content h3,
.modal-moment .card-content h4 {
    color: var(--teal-700);
}

.modal-sos .card-content h1,
.modal-sos .card-content h2 {
    color: #C62828; /* brick-700 */
}

.modal-sos .card-content h3,
.modal-sos .card-content h4 {
    color: #0066AD; /* bleu Glénans - accent SOS */
}

/* ===========================================
   SECTIONS SPÉCIALES (contenu carte)
   =========================================== */

.card-section {
    background: rgba(255,255,255,0.5);
    border-radius: var(--radius-small);
    padding: 1rem;
    margin-top: 1rem;
}

.card-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* ===========================================
   ÉTATS
   =========================================== */

.loading {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 2rem;
}

.error {
    text-align: center;
    color: #C62828; /* brick-700 */
    padding: 2rem;
}

.modal-message {
    text-align: center;
    font-size: 1.1rem;
    padding: 2rem;
    color: var(--text-dark);
}

.no-cards {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    grid-column: 1 / -1;
    padding: 2rem;
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media (max-width: 1024px) {
    .cards-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .filters {
        gap: 0.4rem;
    }
    
    .filter-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
    
    .cards-gallery-container {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        padding: 0 1rem;
    }
    
    .cards-gallery {
        grid-template-columns: 1fr;
        gap: 2rem 1rem;
        max-width: none;
    }
    
    .card-emoji {
        font-size: 2.5rem;
        top: -1rem;
    }
    
    .card-tile {
        padding-top: 2rem;
        margin-top: 1rem;
    }
    
    .card-modal-content {
        width: 98%;
        max-height: 90dvh;
        max-height: 90vh; /* fallback */
        border-radius: var(--radius-small);
    }
    
    @supports (height: 100dvh) {
        .card-modal-content {
            max-height: 90dvh;
        }
    }
    
    .card-modal-body {
        padding: 1.25rem;
    }
    
    .card-content h1 {
        font-size: 1.5rem;
    }
    
    .card-content h2 {
        font-size: 1.3rem;
    }
    
    .card-content h6 {
        font-size: 1.1rem;
    }
}

/* ===========================================
   NAV-HEAD (Entête de carte)
   - Mobile/Tablette : scroll avec le contenu
   - Desktop : fixe en haut
   =========================================== */

.nav-head {
    background: var(--bg-cream);
    padding: 1.5rem 2rem 1rem 2rem;
    border-bottom: 1px solid var(--border-light);
    margin: -2rem -2rem 1.5rem -2rem; /* Compense le padding du modal-body */
    width: calc(100% + 4rem);
}

/* H1 dans nav-head */
.nav-head h1 {
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 0.25rem 0;
    padding-right: 3rem; /* Espace pour le bouton close */
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* H6 sous-titre dans nav-head */
.nav-head h6 {
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    margin: 0;
}

/* Couleurs selon type - fond accent-50 */
.modal-role .nav-head {
    background: var(--amber-50);
}
.modal-role .nav-head h1 { color: var(--amber-700); }
.modal-role .nav-head h6 { color: var(--teal-700); }

.modal-moment .nav-head {
    background: var(--teal-50);
}
.modal-moment .nav-head h1 { color: var(--teal-700); }
.modal-moment .nav-head h6 { color: var(--amber-700); }

.modal-sos .nav-head {
    background: #FFEBEE; /* brick-50 */
}
.modal-sos .nav-head h1 { color: #C62828; /* brick-700 */ }
.modal-sos .nav-head h6 { color: #0066AD; /* bleu Glénans */ }

.modal-affiche .nav-head {
    background: #E8EDF4; /* navy-50 */
}
.modal-affiche .nav-head h1 { color: #1E3A5F; }
.modal-affiche .nav-head h6 { color: #4A6A8A; }

/* ===========================================
   DESKTOP : Nav-head sticky
   =========================================== */
@media (min-width: 1025px) {
    .card-modal-body.has-nav-head .nav-head {
        position: sticky;
        top: -2rem; /* Compense le padding négatif */
        z-index: 5;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
}

/* ===========================================
   MOBILE/TABLETTE : Nav-head scroll normal
   =========================================== */
@media (max-width: 1024px) {
    .nav-head {
        margin: -1.25rem -1.25rem 1.25rem -1.25rem;
        width: calc(100% + 2.5rem);
        padding: 1rem 1.25rem 0.75rem 1.25rem;
    }
    
    .nav-head h1 {
        font-size: 1.4rem;
    }
    
    .nav-head h6 {
        font-size: 1rem;
    }
}

/* ===========================================
   NAVIGATION SECTIONS (fil d'ariane)
   =========================================== */

.card-section-nav {
    background: var(--blanc);
    border-top: 1px solid var(--border-light);
    padding: 0.75rem 1rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    border-radius: 0 0 var(--radius-card) var(--radius-card);
}

.section-nav-inner {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding-bottom: 0.25rem;
}

.section-nav-inner::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.section-nav-link {
    flex-shrink: 0;
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

/* Couleurs selon type */
.nav-role .section-nav-link {
    background: var(--amber-100);
    color: var(--amber-700);
}
.nav-role .section-nav-link:hover {
    background: var(--amber-700);
    color: var(--blanc);
}

.nav-moment .section-nav-link {
    background: var(--teal-100);
    color: var(--teal-700);
}
.nav-moment .section-nav-link:hover {
    background: var(--teal-700);
    color: var(--blanc);
}

.nav-sos .section-nav-link {
    background: #FFCDD2; /* brick-100 */
    color: #C62828; /* brick-700 */
}
.nav-sos .section-nav-link:hover {
    background: #C62828; /* brick-700 */
    color: var(--blanc);
}

/* État actif (scroll spy) */
.section-nav-link.active {
    font-weight: 700;
}

.nav-role .section-nav-link.active {
    background-color: var(--amber-700);
    color: var(--blanc);
}

.nav-moment .section-nav-link.active {
    background-color: var(--teal-700);
    color: var(--blanc);
}

.nav-sos .section-nav-link.active {
    background-color: #C62828; /* brick-700 */
    color: var(--blanc);
}

/* Masquer sur grand écran si souhaité */
/* Pour l'instant on le laisse visible partout */

/* Responsive mobile */
@media (max-width: 768px) {
    .card-section-nav {
        margin: 1rem -1.25rem 0 -1.25rem;
        padding: 0.6rem 0.75rem;
        padding-bottom: 0.75rem;
        border-radius: 0;
    }
    
    .section-nav-link {
        font-size: 0.7rem;
        padding: 0.35rem 0.6rem;
    }
}

/* ===========================================
   HEADER LINK
   =========================================== */

.header-link {
    text-decoration: none;
    border: none;
}

.header-link:hover {
    border: none;
}

.header-link:hover .site-title {
    color: var(--rouge-glenans);
}

/* ===========================================
   TYPE AFFICHE (Bleu marine)
   =========================================== */

/* Variables bleu marine */
/* --navy-50: #E8EDF4 */
/* --navy-100: #C9D5E3 */
/* --navy-700: #1E3A5F */

/* Filtre bouton */
.filter-btn[data-filter="affiche"] {
    color: #4A6A8A; /* navy intermédiaire */
}
.filter-btn[data-filter="affiche"]:hover {
    color: #1E3A5F; /* navy-700 */
    background: rgba(255,255,255,0.5);
}
.filter-btn[data-filter="affiche"].active {
    background: var(--blanc);
    color: #1E3A5F; /* navy-700 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Tuile carte affiche */
.card-tile[data-type="affiche"] {
    background-color: #E8EDF4; /* navy-50 */
    border: 1px solid #C62828; /* brick-700 - accent */
}
.card-tile[data-type="affiche"]:hover {
    box-shadow: 0 6px 16px rgba(30, 58, 95, 0.15);
}
.card-tile[data-type="affiche"] .card-tile-title {
    color: #1E3A5F; /* navy-700 */
}
.card-tile[data-type="affiche"] .card-type-badge {
    background-color: #C9D5E3; /* navy-100 */
    color: #1E3A5F; /* navy-700 */
}
.card-tile[data-type="affiche"] .card-tile-tags-title {
    color: #2D4A6A; /* navy-600 */
}
.card-tile[data-type="affiche"] .card-tile-tag {
    background-color: #C9D5E3; /* navy-100 */
    color: #1E3A5F; /* navy-700 */
}

/* Modale affiche */
.modal-affiche .card-content h1,
.modal-affiche .card-content h2,
.modal-affiche .card-content h3,
.modal-affiche .card-content h4 {
    color: #1E3A5F; /* navy-700 */
}

.modal-affiche .card-content h6 {
    color: #4A6A8A; /* navy intermédiaire */
}

.modal-affiche .card-content blockquote {
    border-left-color: #1E3A5F; /* navy-700 */
}

/* Navigation affiche */
.nav-affiche .section-nav-link {
    background: #C9D5E3; /* navy-100 */
    color: #1E3A5F; /* navy-700 */
}
.nav-affiche .section-nav-link:hover {
    background: #1E3A5F; /* navy-700 */
    color: var(--blanc);
}
.nav-affiche .section-nav-link.active {
    background-color: #1E3A5F; /* navy-700 */
    color: var(--blanc);
}

/* ===========================================
   BOUTON ATELIER (footer modale desktop)
   =========================================== */

.card-actions-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.atelier-link-btn,
.suggestion-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-small);
    text-decoration: none;
    background: var(--bg-cream);
    color: var(--text-muted);
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.atelier-link-btn:hover,
.suggestion-link-btn:hover {
    background: #E2E8F0;
    color: var(--text-dark);
    border-color: #CBD5E1;
}

/* Mobile et tablette : masquer uniquement le bouton atelier */
@media (max-width: 1024px) {
    .atelier-link-btn {
        display: none;
    }
}

/* ===========================================
   EMBED VIDÉO YOUTUBE
   =========================================== */

.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    margin: 1.5rem 0;
    border-radius: var(--radius-small);
    background: #000;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius-small);
}

/* ===========================================
   TWEMOJI - Emojis convertis en images SVG
   =========================================== */

img.emoji {
    height: 1.2em !important;
    width: 1.2em !important;
    max-width: 1.2em !important;
    margin: 0 0.05em 0 0.1em;
    vertical-align: -0.1em;
    display: inline !important;
}

/* Emoji dans nav-head H1 */
.nav-head h1 img.emoji {
    height: 1em !important;
    width: 1em !important;
    max-width: 1em !important;
    vertical-align: -0.05em;
}

/* Emoji dans les titres H1 (hors nav-head) */
.card-content h1 img.emoji {
    height: 1em !important;
    width: 1em !important;
    max-width: 1em !important;
    vertical-align: -0.05em;
}

/* Emoji dans les titres H2 */
h2 img.emoji {
    height: 1.1em !important;
    width: 1.1em !important;
    max-width: 1.1em !important;
    vertical-align: -0.1em;
}

/* ========================================
   MARQUEURS SKIP - Masquage conditionnel (web)
   ======================================== */
/* En mode web, on affiche les blocs SKIP-PRINT */
.skip-print {
    display: block;
}

/* En mode web, on masque les blocs SKIP-WEB */
.skip-web {
    display: none;
}

/* ========================================
   VIDEO EMBED - YouTube responsive
   ======================================== */
.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    margin: 1rem 0;
    border-radius: var(--radius-small);
    background: #000;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius-small);
}
