@import url('variables.css');
@import url('base.css');
@import url('layout.css');
@import url('pages-services.css');

/* =========================================
   GENERAL
   ========================================= */

h1 {
    font-family: var(--In);
    color: var(--couleur-noir);
    font-weight: 200;
    letter-spacing: -0.03em;
}

h2{
    font-family: var(--Ms);
    font-weight: 500;
    color: var(--couleur-noir);
    letter-spacing: -0.03em;
}

h3{
    font-family: var(--Ms);
    font-weight: 500;
    color: var(--couleur-bleu);
    letter-spacing: -0.03em;
}


p {
    font-family: var(--Ms);
    color: var(--couleur-gris);
    font-weight: 300;
    letter-spacing: -0.03em;
}

.savoirs-faires, .realisation, .methode {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    text-align: center;
    font-size: 20px;
}

.entete-savoirs-faires, .entete-realisation, .entete-methode {
    flex: 1;
}

.savoirs-faires h3, .realisation h3, .methode h3 {
    color: var(--couleur-bleu);
    font-size: 18px;
    letter-spacing: -0.05em;
    margin-bottom: 15px;
}

.savoirs-faires h2, .realisation h2, .methode h2{
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 25px;
    font-family: var(--Ms);
}

.savoirs-faires p, .realisation p, .methode p {
    font-size: 18px;
    color: var(--couleur-gris);
    line-height: 1.6;
    margin-bottom: 40px;
}

/* =========================================
   HEADER
   ========================================= */

header {
    width: 100%;
    min-height: 825px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}


header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(271deg, rgba(0, 0, 0, 0) 1%, rgba(0, 0, 0, 0.63) 99%);
    z-index: 2;
}

#page-accueil header {
    background-image: url('../assets/images/pages-services/charpente/Image_Charpente_HD.webp');
    background-size: cover;
    background-position: center;
}

.header-content {
    position: relative;
    z-index: 3;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 35px;
    text-align: left;
    padding-bottom: 60px;
}

.header-content > h1 {
    margin: 0;
    width: 100%;
    max-width: 900px;
    font-size: clamp(36px, 7vw, 75px);
    line-height: 1.1;
    text-align: left;
    color: var(--couleur-blanc);
}

.header-content > h1 > i {
    font-family: var(--Pd);
    font-style: italic;
    font-weight: 300;
    color: var(--couleur-blanc);
}

#page-accueil .header-content button {
    width: 100%;
    max-width: 247px;
    padding: 20px 30px;
    border-radius: 100px;
    background-color: var(--couleur-bleu);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--In);
    font-size: 20px;
    color: var(--couleur-blanc);
    cursor: pointer;
    border : none;
}

/* =========================================
   SECTION À PROPOS
   ========================================= */

.a-propos {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    margin: 0 auto;
}

/* --- BLOC TEXTE (GAUCHE) --- */
.entete-a-propos {
    flex: 1;
    max-width: 600px;
}

.entete-a-propos h3 {
    color: var(--couleur-bleu);
    font-size: 18px;
    margin-bottom: 15px;
}

.entete-a-propos h2 {
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 25px;
    font-family: var(--Ms);
}

.entete-a-propos p {
    font-size: 18px;
    color: var(--couleur-gris);
    line-height: 1.6;
    margin-bottom: 40px;
}

/* --- STATS --- */
.stats {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background-color: var(--couleur-violet);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon img {
    width: 24px;
}

.stat-contenue {
    display: flex;
    flex-direction: column;
}

.stat-nombre {
    font-size: 22px;
    font-weight: 500;
}

.stat-label {
    font-size: 14px;
    color: var(--couleur-gris);
}

/* --- BLOC VISUEL (DROITE) --- */
.a-propos-visuel {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.image-wrapper {
    position: relative;
    width: 450px;
    height: 400px;
}

.img-back {
    position: absolute;
    top: 0;
    right: 0;
    width: 330px;
    height: 310px;
    border-radius: 24px;
    object-fit: cover;
    background-color: #ccc;
    z-index: 1;
}

.img-front {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 330px;
    height: 310px;
    border-radius: 24px;
    object-fit: cover;
    background-color: #ccc;
    border: 3px solid var(--couleur-blanc);
    z-index: 2;
}


/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .a-propos {
        flex-direction: column;
        text-align: center;
    }

    .a-propos-visuel {
        justify-content: center;
        margin-top: 50px;
    }
}

/* =========================================
   SECTION DES SAVOIRS-FAIRES
   ========================================= */

/* --- GRILLE VISUELLE --- */
.savoirs-faires-grid-haut {
    display: grid;
    grid-template-columns: 1.5fr 1fr 0.8fr;
    gap: 24px;
    width: 100%;
    max-width: 1400px;
}

.savoirs-faires-grid-bas {
    padding-top: 24px;
    display: grid;
    grid-template-columns: 0.8fr 1fr 1.5fr;
    gap: 24px;
    width: 100%;
    max-width: 1400px;
}

.sf-card {
    position: relative;
    height: 340px;
    border-radius: 24px;
    overflow: hidden;
    margin: 0;
    cursors: pointer;
}

.sf-card img:not(.btn-icone) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sf-card:hover img:not(.btn-icone) {
    transform: scale(1.1);
}

.sf-card:hover .sf-bouton {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.sf-bouton {
    position: absolute;
    bottom: 15px;
    left: 10px;
    right: 10px;
    height: 63px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-radius: 100px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.sf-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 5px;
}

.span-titre {
    font-weight: 500;
    font-size: 18px;
    color: white;
}

.span-description {
    font-size: 13px;
}

.btn-icone {
    width: 43px;
    height: 43px;
}

/* =========================================
   SECTION REALISATION
   ========================================= */

/* --- GRILLE VISUELLE --- */
.realisation-container {
    display: flex;
    justify-content: center;
    gap: 24px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.col-real {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px; /
}

.col-real figure {
    margin: 0;
    border-radius: 24px;
    overflow: hidden;
    background-color: #d9d9d9;
    width: 100%;
}

.col-real img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.grande-img {
    height: 450px;
}

.petite-img {
    height: 280px;
}

.realisation-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
}

.realisation-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.realisation-label {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 150%);

    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    padding: 10px 25px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-family: var(--In);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;

    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 5;
}

.realisation-card:hover .realisation-label {
    transform: translate(-50%, 0);
}

.realisation-card:hover img {
    transform: scale(1.08);
}

/* =========================================
   SECTION METHODE
   ========================================= */

.entete-methode, .methode h2 {
    color: var(--couleur-blanc);
}
.entete-methode {
    text-align: center;
    width: 100%;
}

.methode p{
    color: var(--couleur-blanc);
    opacity: 0.6;
}

.methode {
    width: 100%;
    background-color: var(--couleur-bleu_minuit);
    background-image:
            linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    color: white;
    text-align: left;
}

.methode-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid-methode {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: none;
}

.etape-card:nth-child(3n) {
    border-right: none;
}

.etape-card:nth-child(n+4) {
    border-bottom: none;
}

.etape-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 40px;
    gap: 20px;
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: var(--couleur-bleu_minuit);
    transition: background-color 0.4s ease;
    overflow: hidden;
    cursor: pointer;
}

.etape-card:hover {
    background-color: #181C25;
}

.etape-card:hover .stat-icon {
    background-color: var(--couleur-bleu);
}

.etape-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--couleur-bleu);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.etape-card:hover::after {
    width: 100%;
}

.etape-card:hover .numero-etape {
    color: rgba(255, 255, 255, 0.15);
    transition: color 0.4s ease;
}

.numero-etape {
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.06);
    line-height: 1;
    margin: 0;
}

.icone-wrapper {
    width: 48px;
    height: 48px;
    background: var(--couleur-bleu_clair);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icone-wrapper img {
    width: 24px;
}

.card-contenue h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.card-contenue p {
    color: var(--couleur-blanc);
    opacity: 0.6;
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

/* =========================================
   SYSTÈME RESPONSIVE COMPLET
   ========================================= */

@media (max-width: 1100px) {
    .span-description {
        display: none !important;
    }

    .span-titre {
        font-size: 17px;
        letter-spacing: 1px;
    }

    .sf-card {
        height: 250px;
    }
}

@media (max-width: 768px) {

    /* --- RÉGLAGES GÉNÉRAUX --- */
    .container, header, footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .nav-links { display: none; }

    /* --- SECTION À PROPOS (INDEX) & PAGES SERVICES (STRUCTURE 1 & 2) --- */
    .a-propos,
    #page-squelette .structure-1,
    #page-squelette .structure-2 {
        flex-direction: column !important;
        align-items: flex-start;
        text-align: left;
        padding-top: 80px;
        gap: 40px;
    }

    #page-squelette .structure-2 .entete-structure-2 { order: 1; }
    #page-squelette .structure-2 .st-visuel { order: 2; }

    .entete-a-propos, .entete-structure-1, .entete-structure-2 {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .stats {
        width: 100%;
        flex-direction: row;
        justify-content: space-around;
        gap: 10px;
    }

    .stat-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }

    .a-propos-visuel, .st-visuel, .image-wrapper {
        width: 100%;
        height: auto;
        position: static;
    }

    .img-back { display: none; }

    .img-front {
        position: static !important;
        width: 100% !important;
        height: 300px !important;
        border-radius: 16px !important;
        object-fit: cover;
        border: none !important;
        transform: none !important;
    }

    /* --- SECTION SAVOIRS-FAIRES : GRILLE 2-2-2 --- */

    .savoirs-faires .container > article:last-child {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .savoirs-faires-grid-haut,
    .savoirs-faires-grid-bas {
        display: contents !important;
    }

    .sf-card { height: 200px; }

    .span-description { display: none; }

    .span-titre {
        font-size: 14px !important;
        font-weight: 500;
    }

    .sf-bouton {
        height: 45px;
        padding: 0 12px;
    }

    .btn-icone { width: 25px; height: 25px; }

    /* --- SECTION RÉALISATIONS : 2 COLONNES SUR TABLETTE --- */
    .realisation-container {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px;
    }

    .col-real { display: contents; }

    .realisation-card {
        width: 100% !important;
        margin: 0;
    }

    .grande-img, .petite-img {
        height: 220px !important;
    }

    /* --- SECTION MÉTHODE : 2 COLONNES SUR TABLETTE --- */
    .grid-methode {
        display: grid;
        grid-template-columns: 1fr 1fr;
        border: none;
    }

    .etape-card {
        width: 100%;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding: 30px 20px;
        align-items: flex-start;
        text-align: left;
    }

    .etape-card:nth-child(odd) {
        border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .etape-card:nth-last-child(-n+2) {
        border-bottom: none !important;
    }

    /* --- FOOTER --- */
    footer { padding-top: 60px; padding-bottom: 40px; }

    .footer-cta h2 { font-size: 2rem; margin-top: 0; padding-top: 0; }

    .footer-btns { flex-direction: column; gap: 10px; }
    .btn-blue, .btn-outline { width: 100%; justify-content: center; }

    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 32px 20px;
        text-align: center;
    }

    .footer-col-brand {
        grid-column: span 2;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .contact-links a { justify-content: center; }

    .footer-separator { margin: 40px 0; }
}

/* --- PETITS ÉCRANS  --- */
@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 28px;
    }

    .footer-col-brand {
        grid-column: span 1;
    }

    .savoirs-faires .container > article:last-child {
        gap: 8px;
    }

    /* Réalisations : 1 colonne sur petit mobile, images plus grandes */
    .realisation-container {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    .grande-img, .petite-img {
        height: 240px !important;
    }

    /* Méthode : 1 colonne sur petit mobile */
    .grid-methode {
        grid-template-columns: 1fr;
    }

    .etape-card:nth-child(odd) {
        border-right: none !important;
    }

    .etape-card:nth-last-child(-n+2) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .etape-card:last-child {
        border-bottom: none !important;
    }

    .span-titre { font-size: 12px !important; }
}


/* =========================================
   RESPONSIVE — INDEX HEADER
   ========================================= */

@media (max-width: 768px) {
    #page-accueil header {
        min-height: 950px;
    }

    #page-accueil .header-content > h1 {
        font-size: clamp(46px, 11vw, 75px);
        line-height: 1.05;
    }

    #page-accueil .header-content .btn-blue {
        font-size: 20px;
        padding: 22px 36px;
        width: 100%;
        max-width: 340px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    #page-accueil .header-content > h1 {
        font-size: 44px;
    }
}