/*{
    border: 1px solid red;
} */

html {
    scroll-behavior: smooth;
}

h2 {
    color: #a33838;
    padding-bottom: 2rem;
}

section {
    padding: 4rem 0;
}

/* Header */
.hero { 
    min-height: calc(100vh - 160px);
    position: relative;
    isolation: isolate;
    background: #000;
}

.hero-image-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    display: flex; 
}

.swiper {
    width: 100%;
    height: 100%;
    position: relative;
}

.swiper-slide, .swiper-wrapper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    display: grid;
    place-items: center;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.swiper .swiper-button-next,
.swiper .swiper-button-prev {
    --size:48px;
    width: var(--size);
    height: var(--size);
    color: #f2f2f2;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
    z-index: 50;
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center start;
    padding-inline: 4rem;
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 45%, rgba(0,0,0,0) 75%), linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,0) 30%);
    pointer-events: none;
}

.hero-text {
    width: 50%;
    color: #f2f2f2;
    text-shadow: 0 2px 6px rgba(0,0,0,0.35);
    margin: 3rem;
}

header h1 {
    font-size: 3rem;
    margin: 0 0 0.3rem 0;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0,0,0,0.35);
    margin: 0 0 1rem 0;
}

header h2 {
    font-size: 1.75rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
    color: #f2f2f2;
}

.hero-quote {
    margin: 1rem 0 0 0;
    padding-left: 1rem;
    border-left: 4px solid #89AEB5;
    opacity: 0.95;
    font-style: italic;
    font-size: 1.2rem;
}

.typed-text {
    display: inline;
    border-right: 4px solid #f2f2f2;
    white-space: nowrap;
    overflow: hidden;
}

.hero-content .cta-button2 {
    margin: 2rem 0 0 0;
    width: 60%;
}

/* Navigation */
#navigation {
    min-height: 50vh;
    width: 80%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding: 2rem 0;
}

.nav-wrapper {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: stretch;
    padding: 2rem;
    gap: 2rem;
    margin: 0;
}

.nav-card {
    background: #89AEB5;
    flex: 1;
    min-height: 300px;
    padding: 2rem 1rem;
    text-align: center;
    overflow: hidden;
    border-radius: 20px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.nav-card:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.nav-card a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-decoration: none;
    color: #01687D;
    text-align: center;
    gap: 1rem;
}

.nav-card .fa-solid {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.nav-card h3 {
    color: #01687D;
    margin-bottom: 1rem;
}

.nav-card p {
    color: #01687D;
    text-align: center;
}

/* Mission */
#mission {
    min-height: 100vh;
    display: flex;
    width: 80%;
    align-items: center;
    margin: 0 auto;
}

.mission-content {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: stretch;
    flex-wrap: wrap;
}

.mission-image {
    width: 50%;
    margin: 0;
    overflow: hidden;
}

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

.mission-text {
    width: 50%;
    background-color: #01687D;
    color: #f2f2f2;
    height: auto;
    padding: 2rem;
    text-align: left;
    display: flex; 
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.mission-text h2, .mission-text p {
    color: #f2f2f2;
}

#mission .cta-button3 {
    margin: 3rem auto;
    width: 60%;
}

/* Vision */
#vision {
    min-height: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
}

.vision-title {
    margin-top: 3rem;
    width: 100%;
    text-align: center;
    padding: 1rem 2rem;
}

.valeur-wrapper {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    align-items: stretch;
    padding: 1.5rem 0;
}

.valeur-item {
    position: relative;
    flex: 1 1 25%;
    max-width: 25%;
    aspect-ratio: 4/5;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    background:rgba(0, 0, 0, 0.1);
    outline: none;
}

.valeur-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5);
}

.valeur-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0.18));
    opacity: 0.9;
    transition: opacity 0.3s ease-in-out;
}

.valeur-content {
    position: absolute;
    z-index: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    color: #f2f2f2;
    gap: 0.5rem;
}

.valeur-content h3 {
    margin: 0;
    color: #f2f2f2;
}

.valeur-content p {
    margin: 0;
    opacity: 0.95;
    color: #f2f2f2;
    text-align: center;
}

.valeur-item:hover, .valeur-item:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.14);
}

.valeur-item:hover .valeur-overlay,
.valeur-item:focus-visible .valeur-overlay {
    opacity: 1;
}

#vision .cta-button2 {
    margin: 3rem auto;
    width: fit-content;
}

/* Actualités */
#actualites {
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 0;
    text-align: center;
}

#actualites h2 {
    margin-bottom: 1.25rem;
    text-align: center;
    border-bottom: 3px solid #89AEB5;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.actualites-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: stretch;
}

.actualite-card {
    flex: 1 1 25%;
    max-width: 25%;
    background: #f2f2f2;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.actualite-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.actualite-card img {
    width: 100%;
    aspect-ratio: 5/4;
    object-fit: cover;
    display: block;
}

.actualite-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.actualite-content h3 {
    margin: 0;
    color: #01687D;
    font-weight: 600;
}

.actualite-content p {
    margin: 0;
    color: #2f2d33;
}

.actualite-content .read-more{
  margin-top: .5rem;
  align-self: flex-start;
  color: #A33838;   
  font-weight: 600;
  text-decoration: none;
  padding: .4rem 0;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.actualite-content .read-more:hover{
  color: #8f2f2f;
  border-color: #A33838;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-text {
        width: 80%;
    }

    .nav-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .mission-content {
        flex-direction: column;
        align-items: center;
    }

    .mission-image, .mission-text {
        width: 100%;
    }

    .actualites-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .actualite-card {
        flex: 1 1 80%;
        max-width: 80%;
    }

    .actualite-card img {
        aspect-ratio: 16/9;
        object-fit: cover;
    }
}

/* Équipe Section */
#equipe {
    display: flex;
    flex-direction: column;
    width: 80%;
    margin: 0 auto;
}

#equipe h3, #equipe h4 {
    margin: 1rem 0;
}

.equipe-images {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
}

#equipe img {
    width: 48%;
}

@media (max-width: 900px) {
    header {
        height: calc(100vh - 150px);
    }
}

@media (max-width: 768px) {
    .swiper .swiper-button-next, .swiper .swiper-button-prev {
    opacity: 0;
}

    .hero-content {
        width: 100%;
        max-width: 100%;
        padding: 1rem;
        box-sizing: border-box;
    }

    .hero-text {
        width: 95%;
        max-width: 95%;
        box-sizing: border-box;
        margin: 0;
    }

    .hero-text, .hero-text h1, .hero-text h2, .hero-quote, .typed-text {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
        white-space: normal;
    }

    header h1 {
        font-size: 2rem;
        word-wrap: break-words;
    }

    header h2 {
        font-size: 1.5rem;
    }
    .nav-card {
        min-height: 250px;
    }

    .valeur-item {
        flex: 1 1 50%;
        max-width: 80%;
    }

    .actualite-card {
        flex: 1 1 80%;
        max-width: 80%;
    }

    .equipe-images {
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    #equipe img {
        width: 100%;
        margin: 1rem 0;
    }
}