html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}

/* navbar */
#logo {
    width: 150px;
    height: auto;
    margin-bottom: 0;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

#en-tete {
    position: relative;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0px;
    background-color: rgb(0, 0, 0);
    width: 100%;
    left: 0;
}

#navbar {
    display: flex;
    gap: 20px;
}

#navbar a {
    position: relative; 
    text-decoration: none;
    color: #ffffff;
    padding: 6px 10px;
    font-size: 18px;
    font-weight: 800;
    font-family: Arial, Helvetica, sans-serif;
}

#navbar a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: width 0.3s ease-in-out;
}

#navbar a:hover::after {
    width: 100%;
}

/* srvc */
#srvc {
    color: #ffffff;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 24px;
    margin: 0;
    margin-bottom: 100px;
    padding: 32px 0 64px;
    background: linear-gradient(90deg, rgb(0, 151, 197), rgb(0, 106, 138));
    position: relative;
    z-index: 1;
    overflow: visible;
    width: 100%;
    left: 0;
}

#srvc::after{
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -40px;
    width: 120vw;
    max-width: 2000px;
    height: 100px;
    background: linear-gradient(90deg, rgb(0, 151, 197), rgb(0, 106, 138));
    border-radius: 50%;
    z-index: 0;
}

#srvc .dot{
    position: absolute;
    width: 43px;
    height: 43px;
    border-radius: 50%;
    background: rgb(12, 128, 163);
    opacity: 0.95;
    z-index: 2;
}

#srvc .d1{ top: 20px; left: 6%; }
#srvc .d2{ top: 14px; right: 8%; }
#srvc .d3 { bottom: 22px; left: 18%; }
#srvc .d4 { bottom: 14px; right: 24%; }

#services-offerts {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-shadow: rgba(0,0,0,0.4) 0px 10px 20px -10px;
}

.Service h2 {
    background: #0079a8;
    color: #ffffff;
    padding: 18px 20px;
    margin: 0;
    font-size: 25px;
    font-weight: 700;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 8px 8px 0 0;
    text-align: center;
}

.Service .content {
    background: #f1f1f1;
    color: #222;
    padding: 18px 20px;
    margin: 0;
    margin-bottom: 30px;
    font-size: 1.125rem;
    line-height: 1.6;
    border: 1px solid rgba(0,0,0,0.06);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 12px 14px rgba(0, 0, 0, 0.05);
}

#portfolio {
    max-width: 1200px;
    margin: 0 auto 80px;
    margin-top: 50px;
    padding: 0 20px 40px;
    text-align: left;
}
#portfolio h2 {
    text-align: center;
    margin: 12px 0 8px;
    font-size: 32px;
    color: #003033;
}
#portfolio .intro {
    text-align: center;
    color: #0a2f2f;
    margin-bottom: 18px;
}

.grid-portfolio {
    display: grid;
    gap: 18px;
    justify-content: center;
}

#portfolio a {
    color: black;
    text-decoration: none;
}

/* 1 élément : centré, largeur max */
.grid-portfolio:has(.card:only-child) {
    grid-template-columns: minmax(300px, 600px);
}

/* 2 éléments : 2 colonnes */
.grid-portfolio:has(.card:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
}

/* 3 éléments : 3 colonnes */
.grid-portfolio:has(.card:nth-child(3):last-child) {
    grid-template-columns: repeat(3, 1fr);
}

/* 4 éléments ou plus : 2x2 grille */
.grid-portfolio:has(.card:nth-child(4)) {
    grid-template-columns: repeat(2, 1fr);
}

.card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    padding-bottom: 12px;
}
.card a { color: inherit; text-decoration: none; display:block; }
.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card h3 {
    margin: 12px 16px 4px;
    font-size: 1.05rem;
    color: #003033;
}
.card p {
    margin: 0 16px;
    color: #444;
    font-size: 0.95rem;
}

footer {
    margin-top : 40px;
    background: #222;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
    position: relative;
    bottom: 0;
    width: 100%;
}