/* ============================================================
   style-h2.css — Styles communs aux pages portails (h2)
   ============================================================ */

/* ---- Section portail ---- */
.section {
    width: 100%;
    padding: 120px 60px;
    min-height: 400px;
    scroll-margin-top: 0;
    border-bottom: 1px solid var(--gris-2);
}

/* ---- Galerie ---- */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2%;
    margin-bottom: 80px;
}

/* Coins gauches arrondis sur image 2 */
.gallery-item:nth-child(2) {
    margin-left: 3.6%;
    border-radius: 12px 0 0 12px;
    overflow: hidden;
}

/* Photos 2, 3, 4 — angles droits */
.gallery-item {
    border-radius: 0;
    overflow: hidden;
}

/* Logo — angles arrondis, pas d'effet hover */
.gallery-item:first-child {
    border-radius: 12px;
    overflow: visible;
    aspect-ratio: 1;
}

.gallery-item:first-child a {
    display: block;
}

.gallery-item:first-child img {
    border: 1px solid var(--gris-2);
    display: block;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    object-fit: contain;
    box-sizing: border-box;
}

/* Toutes les images */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dézoom au chargement — photos 2, 3, 4 */
.gallery-item:not(:first-child) img {
    transform: scale(1.08);
    transition: transform 6s ease-out;
}

.section.zoom-actif .gallery-item:nth-child(2) img {
    transform: scale(1);
    transition-delay: 0s;
}

.section.zoom-actif .gallery-item:nth-child(3) img {
    transform: scale(1);
    transition-delay: 0.4s;
}

.section.zoom-actif .gallery-item:nth-child(4) img {
    transform: scale(1);
    transition-delay: 0.8s;
}

/* ---- Zones de texte ---- */
.text-zones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.texte-contenu {
    color: var(--gris-6);
    line-height: 1.8;
    text-align: justify;
    font-size: var(--font-size-2);
}

.texte-contenu p:first-child {
    margin-top: 0;
}

.texte-contenu p {
    margin-bottom: 1em;
}

.texte-contenu p:last-child {
    margin-bottom: 0;
}

.texte-contenu ul {
    margin-top: 0;
    margin-left: 1.5em;
    margin-bottom: 1.8em;
}

.texte-contenu ul:last-child {
    margin-bottom: 0;
}

.texte-contenu li {
    margin-bottom: 0.5em;
}

.texte-contenu li:last-child {
    margin-bottom: 0;
}


.texte-contenu strong:first-child {
    font-size: var(--font-size-2);
}

/* ---- Tags série 1 et 2 ---- */
.bloc-tags { margin-bottom: 60px; }
.bloc-tags:not(:has(span)) { display: none; }
.tag-serie1 { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 0; }
.tag-serie2 { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 0; }
.tag-serie1:not(:has(span)) { display: none; }
.tag-serie2:not(:has(span)) { display: none; }
.tag-serie1:has(span) { margin-bottom: 20px; }

.tag-s1 {
    font-size: var(--font-size-1);
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid var(--gris-5);
    color: var(--gris-5);
}

.tag-s2 {
    font-size: var(--font-size-1);
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid var(--gris-4);
    color: var(--gris-4);
}

/* Quand tag-serie1 est vide, tag-serie2 prend le style foncé */
.tag-serie1:not(:has(span)) + .tag-serie2 .tag-s2 {
    border-color: var(--gris-5);
    color: var(--gris-5);
}

/* ---- Bloc identité ---- */
.bloc-identite {
    margin: 0 0 20px;
    font-size: var(--font-size-2);
    font-weight: 700;
    color: var(--gris-5);
    line-height: 1.9;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tag-serie1:not(:has(span)) + .tag-serie2:not(:has(span)) + .bloc-identite {
    margin-top: 0;
}

.bloc-identite .statut {
    color: var(--gris-5);
    display: inline-block;
}

.bloc-identite .date {
    color: var(--gris-4);
    display: inline-block;
}

/* ---- Bloc labels ---- */
.bloc-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    padding-left: 24px;
    min-height: 32px;
}

.bloc-label:not(:has(span))::before {
    display: none;
}

.bloc-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, #7a4f00, #b8860b, #ffd700, #daa520, #7a4f00);
    background-size: 100% 300%;
    animation: irise3-v 10s ease infinite;
}

.bloc-label span {
    display: inline-block;
    font-size: var(--font-size-2);
    font-weight: 700;
    line-height: 1.9;
    background: linear-gradient(90deg, #7a4f00, #b8860b, #ffd700, #daa520, #7a4f00);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: irise3 10s ease infinite;
}


/* ---- Irisé 3 — doré (zones claires) ---- */
.texte-irise3 {
    background: linear-gradient(90deg, #7a4f00, #b8860b, #ffd700, #daa520, #7a4f00);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: irise3 10s ease infinite;
}

.bloc-label.infobulle-active::before {
    bottom: var(--bordure-extension, 0px);
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .text-zones {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .content {
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}

/* ---- Section fin de page portails ---- */
.section-fin-portails {
    background: var(--gris-1);
    padding: 80px 60px;
}

.section-fin-inner {
    margin-left: 25%;
    margin-right: 25%;
}

.section-fin-inner p {
    font-size: var(--font-size-1);
    color: var(--gris-6);
    line-height: 1.9;
    text-align: justify;
    margin: 0 0 10px 0;
}

.section-fin-inner p:last-child {
    margin-bottom: 0;
}
