/* ============================================================
   PROJETS EAC — Styles par domaine artistique
   Dépendance : style.css, bulles-style.css (variables de base)

   Système : la fonction get_domaine_eac_class() dans shortcodes.php
   ajoute une classe "domaine-xxx" sur les blocs .structure-projets,
   .bloc-articles-projet et .bloc-page-fille.
   Ce CSS active les bonnes variables CSS selon le domaine détecté.
   ============================================================ */


/* ============================================================
   VARIABLES PAR DOMAINE
   ============================================================ */

.domaine-musique {
    --current-bulle-color:      #0D5A90;
    --current-bulle-bg:         #A5D4F6;
    --current-bulle-bg-audio:   #64a3d1;
    --current-bulle-border:     #115384;
    --current-bulle-icone:      url('/wp-content/themes/eac78-theme/assets/icone/musique.svg');
}

.domaine-arts-plastiques {
    --current-bulle-color:      #0d8a2a;
    --current-bulle-bg:         #c8edcf;
    --current-bulle-bg-audio:   #3ea1eb;
    --current-bulle-border:     #126b27;
    --current-bulle-icone:      url('/wp-content/themes/eac78-theme/assets/icone/palette.svg');
}

.domaine-theatre {
    --current-bulle-color:      #90270d;
    --current-bulle-bg:         #fcbcac;
    --current-bulle-bg-audio:   #f6a5a5;
    --current-bulle-border:     #7a1f08;
    --current-bulle-icone:      url('/wp-content/themes/eac78-theme/assets/icone/theatre.svg');
}

.domaine-danse {
    --current-bulle-color:      #7a0d90;
    --current-bulle-bg:         #efb1fc;
    --current-bulle-bg-audio:   #e6a5f6;
    --current-bulle-border:     #62087a;
    --current-bulle-icone:      url('/wp-content/themes/eac78-theme/assets/icone/danse.svg');
}

.domaine-patrimoine {
    --current-bulle-color:      #7a5c0d;
    --current-bulle-bg:         #f5e6c0;
    --current-bulle-bg-audio:   #e8d4a0;
    --current-bulle-border:     #614808;
    --current-bulle-icone:      url('/wp-content/themes/eac78-theme/assets/icone/patrimoine.svg');
}

.domaine-cinema {
    --current-bulle-color:      #2a2a7a;
    --current-bulle-bg:         #c4c4f0;
    --current-bulle-bg-audio:   #a0a0e0;
    --current-bulle-border:     #1e1e62;
    --current-bulle-icone:      url('/wp-content/themes/eac78-theme/assets/icone/cinema.svg');
}


/* ============================================================
   LAYOUT GRILLE PROJETS
   ============================================================ */

.structure-projets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .structure-projets {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   BLOCS ARTICLES ET PAGES FILLES
   ============================================================ */

.bloc-articles-projet,
.structure-projets .bloc-page-fille {
    animation: fadeInProjet 0.4s ease-in;
}

@keyframes fadeInProjet {
    from { opacity: 0; transform: translateY(0.8rem); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Titres h2 avec icône domaine */
.structure-projets h2 {
    color: var(--current-bulle-color);
    border-bottom: 1px solid var(--current-bulle-color);
    position: relative;
    padding-left: 3rem;
    margin-bottom: 0.8rem;
}

.structure-projets h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    background-image: var(--current-bulle-icone);
    background-size: contain;
    background-repeat: no-repeat;
}

/* Titres h3 pages filles */
.structure-projets h3 {
    border-left: 3px solid var(--current-bulle-color);
    padding-left: 0.8rem;
    margin-bottom: 0.5rem;
}

.structure-projets h3 a {
    font-style: italic;
    font-size: 1.5rem;
    color: rgba(0, 0, 0, 0.7);
    text-decoration: none;
}

.structure-projets h3 a:hover {
    color: var(--current-bulle-color);
}


/* ============================================================
   LISTES D'ARTICLES
   ============================================================ */

.structure-projets ul {
    list-style: square;
    color: var(--current-bulle-color);
    padding-left: 1.8rem;
    margin: 0 0 1rem 0;
}

.structure-projets ul li {
    margin-bottom: 0.3rem;
}

.structure-projets ul li a {
    text-decoration: none;
    color: var(--current-bulle-color);
    font-weight: 500;
    transition: color 0.2s ease;
}

.structure-projets ul li a:hover {
    color: #000;
    text-decoration: underline;
}

/* Compositeur (si ajouté plus tard) */
.structure-projets .compositeur {
    font-style: italic;
    font-weight: 400;
    font-size: 0.9em;
    opacity: 0.75;
}


/* ============================================================
   SINGLE ARTICLE PROJET — enveloppe visuelle
   ============================================================ */

/* Badge domaine en pill */
.badge-domaine {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 14px;
    border-radius: 20px;
    background: var(--current-bulle-bg);
    color: var(--current-bulle-color);
    border: 1px solid var(--current-bulle-color);
    margin-bottom: 0.8rem;
    letter-spacing: 0.03em;
}

/* Titre projet */
.titre-projet {
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--current-bulle-color);
    border-bottom: 1px solid var(--current-bulle-color);
    padding-bottom: 1rem;
    margin: 0 0 1.5rem;
    text-align: center;
    letter-spacing: 0.05em;
}

/* Enveloppe article projet :
   accent latéral fort + bordure tiretée sur les 3 autres côtés */
article.domaine-musique,
article.domaine-arts-plastiques,
article.domaine-theatre,
article.domaine-danse,
article.domaine-patrimoine,
article.domaine-cinema {
    border-left: 6px solid var(--current-bulle-color);
    border-top: 1.5px dashed var(--current-bulle-color);
    border-right: 1.5px dashed var(--current-bulle-color);
    border-bottom: 1.5px dashed var(--current-bulle-color);
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    padding: 0 var(--spacing-md);
    margin: 1.5rem auto;
    max-width: 80rem;
}

/* H2 bandeaux dans les projets */
article.domaine-musique h2,
article.domaine-arts-plastiques h2,
article.domaine-theatre h2,
article.domaine-danse h2,
article.domaine-patrimoine h2,
article.domaine-cinema h2 {
    background-color: var(--current-bulle-color);
    color: white;
    padding: 0.6rem 1rem 0.6rem 1.2rem;
    margin: 1.5rem calc(-1 * var(--spacing-md));
    border-radius: 0;
}

/* Liens → style directionnel */
article.domaine-musique .entry-content a,
article.domaine-arts-plastiques .entry-content a,
article.domaine-theatre .entry-content a,
article.domaine-danse .entry-content a,
article.domaine-patrimoine .entry-content a,
article.domaine-cinema .entry-content a {
    color: var(--current-bulle-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

article.domaine-musique .entry-content a:hover,
article.domaine-arts-plastiques .entry-content a:hover,
article.domaine-theatre .entry-content a:hover,
article.domaine-danse .entry-content a:hover,
article.domaine-patrimoine .entry-content a:hover,
article.domaine-cinema .entry-content a:hover {
    color: #000;
    text-decoration: underline;
}


/* ============================================================
   STRUCTURE PAGES — cartes pages filles avec couleur domaine
   ============================================================ */

.structure-pages {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    margin: 1.5rem 0;
}

@media (max-width: 640px) {
    .structure-pages { grid-template-columns: 1fr; }
}

.structure-pages .page-fille {
    border: 1.5px solid var(--current-bulle-color, #7a1a1a);
    border-left: 10px solid var(--current-bulle-color, #7a1a1a);
    border-radius: 0 8px 8px 0;
    padding: 1rem;
    background: var(--color-background-primary, #fff);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.structure-pages .page-fille:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Titre h3 avec accent couleur */
.structure-pages .page-fille h3 {
    margin: 0 0 0.7rem;
    font-size: 2.1rem;
    font-style: italic;
}

.structure-pages .page-fille h3 a {
    color: var(--current-bulle-color, #7a1a1a);
    text-decoration: none;
    transition: color 0.2s ease;
}

.structure-pages .page-fille h3 a:hover {
    text-decoration: underline;
}

/* Image mise en avant */
.structure-pages .page-fille .featured-image {
    margin-bottom: 0.7rem;
    border-radius: 4px;
    overflow: hidden;
}

.structure-pages .page-fille .featured-image img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.structure-pages .page-fille:hover .featured-image img {
    transform: scale(1.03);
}

/* Extrait */
.structure-pages .page-fille p {
    font-size: 1.4rem;
    color: var(--color-text-secondary, #555);
    margin: 0;
    line-height: 1.6;
}


/* ============================================================
   STRUCTURE PROJETS — liste articles avec couleur domaine
   ============================================================ */

.structure-projets .bloc-page-fille,
.structure-projets .bloc-articles-projet {
    border-left: 5px solid var(--current-bulle-color, #7a1a1a);
    border-top: 1.5px dashed color-mix(in srgb, var(--current-bulle-color, #7a1a1a) 40%, transparent);
    border-right: 1.5px dashed color-mix(in srgb, var(--current-bulle-color, #7a1a1a) 40%, transparent);
    border-bottom: 1.5px dashed color-mix(in srgb, var(--current-bulle-color, #7a1a1a) 40%, transparent);
    border-radius: 0 8px 8px 0;
    padding: 0.8rem 1rem;
    background: var(--color-background-primary, #fff);
}

/* Titres h2 et h3 */
.structure-projets h2 {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--current-bulle-color, #7a1a1a);
    border-bottom: 1px solid var(--current-bulle-color, #7a1a1a);
    padding-bottom: 0.3rem;
    margin: 0 0 0.6rem;
    padding-left: 0;
}

.structure-projets h2::before {
    display: none; /* pas d'icône SVG dans les listes */
}

.structure-projets h2 a {
    color: var(--current-bulle-color, #7a1a1a);
    text-decoration: none;
}

.structure-projets h2 a:hover {
    text-decoration: underline;
}

.structure-projets h3 {
    font-size: 1rem;
    font-style: italic;
    color: var(--current-bulle-color, #7a1a1a);
    border-left: 3px solid var(--current-bulle-color, #7a1a1a);
    padding-left: 0.6rem;
    margin: 0 0 0.4rem;
}

.structure-projets h3 a {
    color: rgba(0,0,0,0.7);
    text-decoration: none;
}

.structure-projets h3 a:hover {
    color: var(--current-bulle-color, #7a1a1a);
}

/* Listes d'articles avec puce colorée */
.structure-projets ul {
    list-style: square;
    color: var(--current-bulle-color, #7a1a1a);
    padding-left: 1.6rem;
    margin: 0;
}

.structure-projets ul li {
    margin-bottom: 0.25rem;
}

.structure-projets ul li a {
    color: var(--current-bulle-color, #7a1a1a);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.structure-projets ul li a:hover {
    color: #000;
    text-decoration: underline;
}

.structure-projets .compositeur {
    font-style: italic;
    font-weight: 400;
    font-size: 0.88em;
    opacity: 0.7;
}

/* Sous-pages */
.structure-projets .sous-pages {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px dashed color-mix(in srgb, var(--current-bulle-color, #7a1a1a) 30%, transparent);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

@media (max-width: 640px) {
    .structure-projets .sous-pages { grid-template-columns: 1fr; }
}
