@import url(../style.css);

#resources {
    position: relative;
    .bloc1 {
        position: relative;
        height: 120vh;
        z-index: 1;
        isolation: isolate;
        @media screen and (max-width: 1000px) { height: 125vh; }
        .hero-bg {
            position: absolute;
            inset: 0;
            background-image: var(--resources-hero);
            background-repeat: no-repeat;
            background-size: cover;
            background-position: right;
            background-attachment: fixed;
            @media screen and (max-width: 1000px) {
                background-image: none;
                background-attachment: scroll;
            }
        }
        .bloc1-hero-media {
            position: absolute;
            inset: 0;
            z-index: 0;
            display: none;
            width: 100%;
            height: 100%;
            pointer-events: none;
            overflow: hidden;
            @media screen and (max-width: 1000px) {
                display: block;
                height: calc(var(--bloc1-hero-vh, 1vh) * 100);
            }
            img {
                display: block;
                width: 100%;
                height: 100%;
                object-fit: cover;
                object-position: right center;
            }
        }
        .contenu {
            position: sticky;
            top: 0;
            z-index: 2;
            padding-top: calc(70vh - 100px);
            padding-bottom: 20vh;

            .hero-copy {
                max-width: 720px;
                @media screen and (max-width: 1024px) { max-width: 420px; }
            }
            h1 { color: #fff; margin-bottom: 0; }
            h2 {
                color: white;
                margin-top: 23px;
                font-size: clamp(34px, 3.7vw, 64px);
                line-height: 0.98;
                font-weight: 300;
            }
        }
    }
    .bloc2 {
        position: relative;
        z-index: 2;
        background: #f9f9f9;
        margin-top: -20vh;
        padding: 90px 0 120px;
    }
	.resources-intro {
		margin-bottom: 40px;
		text-align: left;

		h2 {
			color: var(--gris);
			margin-bottom: 12px;
		}

		p {
			color: var(--gris);
			max-width: 680px;
			margin: 0;
		}
	}
    .resources-container {
        margin: 0 auto;
        padding: 0 20px;
    }
    .accordeon-group {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    .accordeon-item {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 4px;
        overflow: hidden;

        &.active {
            border-color: var(--bleu, #4698CB);
        }
    }
    .accordion-header {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 24px 30px;
        background: #ffffff;
        border: none;
        outline: none;
        cursor: pointer;
        text-align: left;
        transition: background-color 0.2s ease;
        &:hover {
            background-color: #fcfcfc;
        }
        .header-brand {
            display: flex;
            align-items: center;
            height: 32px;
        }
        .resource-logo {
            display: block;
            width: auto;
            object-fit: contain;
            object-position: left center;
        }
		.resource-logo-ecoazur {
            height: 28px; /* Était ~38px */
        }

        .resource-logo-confort {
            height: 28px; /* Était ~52px (reste proportionnel pour compenser son espace transparent) */
        }

        .resource-logo-amutech {
            height: 26px; /* Était ~36px */
        }
        .resource-logo-text {
            margin: 0;
            font-size: 26px; /* Ajusté pour correspondre à la taille visuelle des logos */
            font-weight: 700;
            color: #555555;  /* Même gris/noir doux que les autres logos */
            text-transform: uppercase;
            letter-spacing: 0.5px;
            line-height: 1;
            font-family: inherit;
        }
        .accordion-icon {
            position: relative;
            width: 20px;
            height: 20px;
            flex-shrink: 0;

            &::before, &::after {
                content: '';
                position: absolute;
                background-color: var(--bleu, #4698CB);
                transition: transform 0.3s ease;
            }

            &::before {
                top: 9px;
                left: 0;
                width: 100%;
                height: 2px;
            }

            &::after {
                top: 0;
                left: 9px;
                width: 2px;
                height: 100%;
            }
        }
    }

    .accordeon-item.active .accordion-icon::after {
        transform: rotate(90deg);
        opacity: 0;
    }
    .accordion-panel {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
        background: #ffffff;
    }
    .documents-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
        padding: 16px 30px 30px;
        border-top: 1px solid #f0f0f0;
    }
    .doc-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        background: #fff;
        border: 1px solid #4698CB;
        border-radius: 4px;
        text-decoration: none;
        transition: all 0.2s ease;
        &:hover {
            background: var(--bleu, #4698CB);
            border-color: var(--bleu, #4698CB);
            transform: translateY(-2px);
            .doc-tag {
                background: #ffffff;
                color: var(--bleu, #4698CB);
            }
            .doc-title {
                color: #ffffff;
            }
            .doc-download-icon {
                color: #ffffff;
            }
			.doc-download-icon svg {
				stroke: #fff;
			}
        }
        .doc-info {
            display: flex;
            align-items: center;
            gap: 12px;
            overflow: hidden;
        }
        .doc-tag {
            font-size: 11px;
            font-weight: 700;
            background: #e2e8f0;
            color: #475569;
            padding: 4px 8px;
            border-radius: 4px;
            text-transform: uppercase;
            transition: all 0.2s ease;
        }
        .doc-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--gris);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            transition: color 0.2s ease;
        }
        .doc-download-icon {
			display: flex;
			align-items: center;
			justify-content: center;
			flex-shrink: 0;
			margin-left: 10px;
		}
		.doc-download-icon svg {
			width: 20px;
			height: 20px;
			stroke: #4698CB;
		}
    }
    /* ADAPTATION MOBILE */
    @media screen and (max-width: 640px) {
        .accordion-header {
            .header-brand {
                height: 26px;
            }

            .resource-logo-ecoazur { height: 22px; }
            .resource-logo-confort { height: 30px; }
            .resource-logo-amutech { height: 20px; }

            .resource-logo-text {
                font-size: 20px;
            }
        }
        .documents-grid {
            grid-template-columns: 1fr;
            padding: 15px 20px 20px;
        }
		.resources-intro {
			margin-bottom: 28px;

			p {
				font-size: 14px;
			}
		}
    }
}