/*
Theme Name:   Hello Elementor Child
Theme URI:    https://tncdc.com
Description:  Child theme for Hello Elementor - custom post types and site-specific code
Author:       TNCDC
Template:     hello-elementor
Version:      1.0.0
*/

/* Generic reusable layout classes, usable anywhere on the site */
.xao-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.xao-section {
    width: 100%;
    padding-top: 50px;
    padding-bottom: 50px;
}

/* Kill any default bottom margin/padding the parent theme (Hello Elementor)
   might add after the main content, which can create empty white space
   before the footer regardless of our own section padding */
.single-projet .site-content,
.single-projet .content-area,
.single-projet main,
.single-projet article,
.single-projet .entry-content,
.post-type-archive-projet .site-content,
.post-type-archive-projet .content-area,
.post-type-archive-projet main,
.post-type-archive-projet article,
.post-type-archive-projet .entry-content {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.single-projet .xao-container h2,
.single-projet .xao-container .project-title,
.post-type-archive-projet .xao-container h2 {
    margin-bottom: 40px;
    color: #EC926F;
}

.post-type-archive-projet .xao-container h3 {
    margin-bottom: 20px;
    color: #666;
}

.single-projet .xao-container .accent-vert,
.post-type-archive-projet .xao-container .accent-vert {
    color: #678686;
}

.single-projet .xao-container h2.accent-vert {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Section banner — shared by archive and single projet pages.
   Full-bleed: breaks out of any parent container (e.g. Hello Elementor .site-main max-width) */
.section-banner {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    margin-bottom: 0;
    height: 396px;
    overflow: hidden;
    border-radius: 0 !important;
}

/* 100vw includes the scrollbar width on Windows: clip the extra pixels
   (clip instead of hidden so position: sticky keeps working) */
body.single-projet,
body.post-type-archive-projet {
    overflow-x: clip;
}

/* Image mode: fill the banner, anchored right so the title hardcoded
   in the designer's image stays visible when cropped on smaller screens */
.section-banner.section-banner--image {
    padding: 0;
}

/* Centered: keeps the title hardcoded in the designer's image visible when cropped */
.section-banner .section-banner-image {
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 0 !important;
}

/* Gradient fallback when no image is uploaded */
.section-banner.section-banner--gradient {
    background: linear-gradient(135deg, #EC926F 0%, #E8D7A4 50%, #638485 100%);
}

/* Responsive height */
@media (max-width: 1024px) {
    .section-banner {
        height: 300px;
    }
}

@media (max-width: 767px) {
    .section-banner {
        height: 220px;
    }
}

/* Visually hidden but still read by screen readers and search engines */
.xao-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.section-map h2 {
    text-align: center;
}

.section-map {
    position: relative;
    /* No bottom padding at all — the map widget already has its own
       intrinsic height, adding padding here only stacks more empty space */
    padding-bottom: 0;
}

.section-map .xao-container {
    position: relative;
    overflow-x: auto;
}

.section-map .xao-container > *:not(h2) {
    max-width: 100%;
}

.section-categories h2 {
    text-align: center;
    margin-bottom: 30px;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 15px;
    margin-bottom: 40px;
}

.theme-grid a {
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    display: block;
    color: #666 !important;
}

.theme-grid a:hover {
    background-color: #EEE;
    color: #333 !important;
}

.theme-grid img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 10px;
}

.section-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-top: 40px;
}

.section-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.section-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.reasons-grid .reason-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
}

.section-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.section-two-col .col-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.col-info h2 {
    margin-bottom: 20px;
}

.col-info .project-description {
    margin-bottom: 20px;
}

/* Links inside project description content — dark green, darker on hover.
   Higher specificity + !important to override any Hello Elementor default link color. */
.single-projet .col-info .project-description a,
.single-projet .project-description a {
    color: #678686 !important;
    transition: color 0.25s ease;
}

.single-projet .col-info .project-description a:hover,
.single-projet .project-description a:hover {
    color: #4c6362 !important;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #e5e5e5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

@media (max-width: 782px) {
    .section-two-col {
        grid-template-columns: 1fr;
    }
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tag-chip {
    display: inline-block;
    background-color: #eddacb;
    color: #5C4A2A;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    white-space: nowrap;
}

.cdc-contact-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 4px 0;
}

.contact-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #638485;
    margin-top: 2px;
}

.contact-icon svg {
    width: 100%;
    height: 100%;
}

/* Same dark green as elsewhere, higher specificity + !important to override
   any Hello Elementor default link color */
.single-projet .cdc-contact-list a {
    color: #678686 !important;
    text-decoration: underline;
    transition: color 0.25s ease;
}

.single-projet .cdc-contact-list a:hover {
    color: #4c6362 !important;
}

.single-projet .site-web-info a {
    color: #678686 !important;
    transition: color 0.25s ease;
}

.single-projet .site-web-info a:hover {
    color: #4c6362 !important;
}

.site-web-info {
    margin-top: 20px;
    margin-bottom: 10px;
}

.section-contact-cdc-band {
    background-color: #eef4f2;
    padding-top: 60px;
    padding-bottom: 60px;
}