/* ============================================================
   theme-h1.css — Styles communs aux pages thématiques (h1)
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
}

@keyframes irise1 {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.palette-1 {
    background: linear-gradient(90deg, #7a5230, #3a9a5c, #3a9a5c, #1a6a9a, #2e8a50, #7a5230);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: irise1 10s ease infinite;
}

.palette-2 {
    background: linear-gradient(90deg, #7a5230, #3a9a5c, #3a9a5c, #1a6a9a, #2e8a50, #7a5230);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: irise1 10s ease infinite;
}

/* ---- Photo thème ---- */
.theme-photo {
    width: 100%;
    height: 420px;
    overflow: hidden;
}

.theme-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.08);
    transition: transform 6s ease-out;
}

.theme-photo img.zoom-out {
    transform: scale(1);
}

/* ---- Section Repères ---- */
.reperes-section {
    background: var(--gris-1);
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--gris-2);
}

.reperes-bande {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 60px;
    height: 96px;
}

.reperes-bande-gauche {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex: 1;
    margin-right: 16px;
    align-self: flex-end;
    padding-bottom: 1px;
    transition: opacity 1s ease;
}

.reperes-titre {
    font-size: var(--font-size-4);
    font-weight: 700;
    color: var(--gris-5);
    user-select: none;
    line-height: 1.2;
}

.reperes-lecture {
    font-size: var(--font-size-1);
    color: var(--gris-5);
    margin-top: 12px;
}

.reperes-bande.inactif .reperes-lecture,
.reperes-bande.inactif .reperes-titre {
    display: none;
}

.reperes-toggle {
    display: flex;
    cursor: pointer;
    flex-shrink: 0;
}

.reperes-corps {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 60px 60px 60px 60px;
    overflow: hidden;
    max-height: 3000px;
    opacity: 1;
    transition: opacity 1s ease, max-height 2s linear;
}

.reperes-corps.inactif {
    visibility: hidden;
}

.reperes-vide {
    width: 25%;
    flex-shrink: 0;
}

.reperes-droite {
    width: 50%;
    flex-shrink: 0;
}

.reperes-gauche {
    width: 25%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 40px;
}

.reperes-toggle-track {
    width: 48px;
    height: 24px;
    border-radius: 12px;
    position: relative;
    transition: background 0.4s;
    background: linear-gradient(90deg, #7a5230, #3a9a5c, #3a9a5c, #1a6a9a, #2e8a50, #7a5230);
    background-size: 300% 300%;
    animation: irise1 10s ease infinite;
}

.reperes-toggle-track.inactif {
    background: var(--gris-3);
    animation: none;
}

.reperes-toggle-thumb {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 26px;
    transition: left 0.4s;
}

.reperes-toggle-track.inactif .reperes-toggle-thumb {
    left: 2px;
}

.onglets-liste {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
}

.onglets-liste.visible {
    display: flex;
}

.onglet-titre {
    background: none;
    border: none;
    border-top: 1px solid var(--gris-2);
    text-align: left;
    padding: 13px 0;
    font-size: var(--font-size-3);
    font-weight: 700;
    background: linear-gradient(90deg, #7a5230, #3a9a5c, #3a9a5c, #1a6a9a, #2e8a50, #7a5230);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: irise1 10s ease infinite;
    cursor: pointer;
    width: 100%;
}

.onglet-titre.inactif {
    background: linear-gradient(90deg, #7a5230, #3a9a5c, #3a9a5c, #1a6a9a, #2e8a50, #7a5230);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: irise1 10s ease infinite;
}

.onglet-titre.inactif:hover {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--gris-6);
    background-clip: unset;
    animation: none;
    color: var(--gris-6);
}

.onglet-titre.actif {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--gris-6);
    background-clip: unset;
    animation: none;
    color: var(--gris-6);
}

.onglet-titre:not(.actif):not(.inactif):hover {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--gris-6);
    background-clip: unset;
    animation: none;
    color: var(--gris-6);
}


.reperes-cadre {
    padding: 0;
}

.onglets-contenu {
    opacity: 0;
    transition: opacity 0.5s ease;
    display: none;
    padding-top: 13px;
}

.onglets-contenu.visible {
    display: block;
    opacity: 1;
}

.onglets-contenu p {
    color: var(--gris-6);
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 15px;
    padding-bottom: 5px;
}

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

/* ---- Sections catégories ---- */
.cat-section {
    width: 100%;
    display: flex;
    align-items: stretch;
    background: white;
    border-bottom: 1px solid var(--gris-2);
    padding: 80px 0;
}

.cat-image {
    width: 25%;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0 60px;
    box-sizing: border-box;
}

.cat-image-inner {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 0 12px 12px 0;
}

.cat-image-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.08);
    transition: transform 6s ease-out;
}

.cat-image-inner img.zoom-out {
    transform: scale(1);
}

.cat-contenu {
    width: 50%;
    flex-shrink: 0;
    padding: 0 60px 0 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.cat-fin {
    width: 25%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px 0 0;
    box-sizing: border-box;
    border-left: 1px solid var(--gris-2);
}

.cat-nom {
    font-size: var(--font-size-5);
    font-weight: 700;
    line-height: 1.4;
    padding-bottom: 0.1em;
    margin-bottom: 16px;
    display: block;
    text-decoration: none;
    background: linear-gradient(90deg, #7a5230, #3a9a5c, #3a9a5c, #1a6a9a, #2e8a50, #7a5230);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: irise1 10s ease infinite;
}

.cat-nom:hover {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--gris-6);
    background-clip: unset;
    animation: none;
    color: var(--gris-6);
}

.cat-droite {
    display: none;
}

.cat-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 24px;
    border-radius: 8px;
    border: 1.5px solid #2e8a50;
    cursor: pointer;
    text-decoration: none;
    gap: 4px;
    width: 100%;
    background: linear-gradient(90deg, #7a5230, #3a9a5c, #3a9a5c, #1a6a9a, #2e8a50, #7a5230);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: irise1 10s ease infinite;
}

.cat-action:hover {
    -webkit-background-clip: unset;
    -webkit-text-fill-color: white;
    background-clip: unset;
    border-color: transparent;
}

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

ul.cat-texte {
    margin-left: 1.5em;
    padding-left: 0;
}

ul.cat-texte li {
    color: var(--gris-5);
    line-height: 1.8;
    font-size: var(--font-size-2);
    margin-bottom: 0.5em;
}

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

.cat-compte {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cat-compte-chiffre {
    font-size: var(--font-size-5);
    font-weight: 700;
    line-height: 1.2;
    color: var(--vert-3);
}

.cat-compte-label {
    font-size: var(--font-size-3);
    line-height: 1.4;
    margin-top: 8px;
    color: var(--gris-5);
}

.cat-compte-vide {
    height: 1rem;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .cat-section {
        flex-direction: column;
        gap: 30px;
        padding: 60px 30px;
    }

    .cat-contenu-legacy {
        width: 100%;
    }

    .cat-nom {
        font-size: 2.4rem;
    }

    .reperes-section {
        flex-direction: column;
        padding: 40px 30px;
    }

    .reperes-gauche {
        width: 100%;
        padding-right: 0;
        align-items: flex-start;
        text-align: left;
        margin-bottom: 30px;
    }

    .reperes-droite {
        width: 100%;
    }

    .theme-photo {
        height: 240px;
    }
}
