/* Reset général */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Corps de la page */
body {
    font-family: Arial, sans-serif;
    
    background-size: auto;
    background-repeat: repeat;
    background-position: top left;
    background: #EDEDE9;
}

/* En-tête */
.header-top {
    padding: 30px 20px 10px;
    text-align: center;
    background: #e3d5ca;
    color: #4a536b;
}

.header-top h1 {
    margin: 0;
    font-size: 28px;
    color: #4a536b;
}

/* Conteneur principal */
.content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background: #f0e9e0;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    color: #2d3142;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Titres */
.content h3 {
    font-size: 18px;
    color: #1d3557;
    margin-top: 30px;
    margin-bottom: 15px;
}

.content p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Transition pour les paragraphes */
.transition-paragraph {
    font-size: 18px;
    line-height: 1.8;
    color: #2d3142;
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-left: 6px solid #d5bdaf;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: justify;
}

/* Schéma du rein */
.schema-rein {
    margin-top: 40px;
    text-align: center;
    padding: 20px;
    background-color: #f3f3f3;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.schema-rein h3 {
    font-size: 22px;
    color: #264653;
    margin-bottom: 20px;
}

.img-rein {
    max-width: 70%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.img-rein:hover {
    transform: translateY(-5px); 
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); 
}

.card-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
}
.access-card {
    background-color: #e6f2ff;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    width: 250px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.access-card:hover {
    transform: scale(1.05);
}

.card-container2 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding: 20px;
    max-width: 900px;         /* limite la largeur totale */
    margin: 0 auto;            /* centre le conteneur horizontalement */
    justify-content: center;
}

.access-card2 {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease;
}

.access-card2:hover {
    transform: scale(1.02);
}

/* 🌐 Tablette : 2 cartes par ligne */
@media (max-width: 992px) {
    .card-container2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 📱 Mobile : 1 carte par ligne */
@media (max-width: 600px) {
    .card-container2 {
        grid-template-columns: 1fr;
    }
}


.card-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Modale */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border-radius: 16px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    font-family: "Segoe UI", sans-serif;
    color: #333;
    line-height: 1.6;
}

.modal-content h2, .modal-content h3 {
    color: #4d3910;
    margin-bottom: 10px;
}

.modal-content ul {
    margin-left: 20px;
    padding-left: 15px;
    list-style: disc;
}

.modal-content p {
    margin-bottom: 15px;
}

.modal-image {
    margin-top: 25px;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #333;
    text-decoration: none;
}

.encadre {
    background-color: #fffff5;
    border: 1px solid #f5f1cf;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 91, 143, 0.1);
}


.risk-card {
    background-color: #f0f8ff;
    border: 1px solid #cbe2f0;
    border-radius: 12px;
    padding: 16px;
    width: 180px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 91, 143, 0.1);
    transition: transform 0.2s ease;
}


.risk-card:hover {
    transform: scale(1.05);
}

.risk-img {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
}

.hemodialyse-section {
  background-color: #f7f9fc;
  padding: 40px 20px;
  margin-top: 40px;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.hemodialyse-section h2 {
  text-align: center;
  font-size: 1.8em;
  margin-bottom: 30px;
}

.hemodialyse-type {
  margin-bottom: 30px;
}

.hemodialyse-type h3 {
  color: #2c3e50;
  font-size: 1.4em;
  margin-bottom: 15px;
}

.hemodialyse-type ul {
  padding-left: 20px;
  list-style-type: disc;
}

.hemodialyse-type li {
  margin-bottom: 10px;
  font-size: 1.05em;
}

/* Container des sections */
.section-centre, .section-domicile {
    margin: 40px auto;
    max-width: 1200px;
    padding: 20px;
}

.grid-item.home-page {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 0px;
    min-height: 300px;
}

/* Pour inverser le sens dans certains cas */
.grid-item.reverse {
    flex-direction: row-reverse;
}

/* Image container fixe */
.image-container {
    width: 50%;
    height: auto;
    max-height: 300px;
    overflow: hidden;
}

/* Image propre */
.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Texte */
.text {
    width: 50%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.video-container {
    width: 480px;
    height: 270px;
    margin: 10px auto 0px auto; /* top: 20px, bottom: 10px */
    border-radius: 12px;
    overflow: hidden;
}



.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

.teaser-button {
    display: inline-block;
    font-size: 20px;
    color: #4a536b;
    border: 2px solid #aa8875;
    background-color: #d5bdaf; 
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.teaser-button:hover {
    transform: scale(1.05);  
}



.flip-grid {
  display: grid;
  grid-template-columns: repeat(3, 220px);
  justify-content: center;
  gap: 30px 60px;
  margin-top: 5px;
  margin-bottom: 30px;
  perspective: 1000px; 
}

/* Le conteneur de la flip card */
.flip-card {
  width: 250px;
  height: 280px;
  background: transparent; 
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  cursor: pointer;
  perspective: 1000px; 
  border: 3px solid transparent; 
  height: 260px;
}

/* Partie interne de la carte */
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  border-radius: 12px; 
}

/* Au survol, la carte pivote */
.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

/* Les faces avant et arrière de la carte */
.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
  box-sizing: border-box;
}

/* Verso de la carte */
.flip-card-back {
  color: #264653;
  transform: rotateY(180deg);
  font-size: 16px;
  line-height: 1.4;
  font-weight: normal;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
  border-radius: 12px;
  user-select: none;
  background: transparent; 
}

.activity-border-green-lime {
  border: 2px solid #80b918;
  background-color: #f3fae3; 
}

.activity-border-blue-electric {
  border: 2px solid #4895ef;
  background-color: #e7f1fe; 
}

.activity-border-red-coral {
  border: 2px solid #e63946;
  background-color: #ffecec; 
}

.activity-border-purple-bright {
  border: 2px solid #9d4edd;
  background-color: #f3e9fd; 
}

.activity-border-orange-bold {
  border: 2px solid #f77f00;
  background-color: #fff3e0; 
}

.activity-border-yellow-safran {
  border: 2px solid #f9c74f;
  background-color: #fffbe0; 
}



/*PARTIE TRAITEMENT CONCERVATEUR*/

/* Grille des cartes dans la section des conseils */
.grid-container.home-page {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
    padding: 20px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Style des cartes de chaque item */
.grid-item.home-page {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 10px;
    background-color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: row;
}

/* Animation hover */
.grid-item.home-page:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

/* Image dans chaque carte */
.image-container {
    width: 100%;
    height: 195px;
    overflow: hidden;
    border-radius: 8px;
}
/* Image dans chaque carte */
.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Texte dans chaque carte */
.text {
    width: 100%;
    padding: 15px;
    text-align: center;
}
/* Texte des titres dans les cartes */
.text h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #264653;
}

/* Texte des descriptions dans les cartes */
.text p {
    font-size: 14px;
    line-height: 1.3;
    color: #2d3142;
}

.rein-facts {
    margin-top: 30px;
}
/* Transition pour les paragraphes */
.transition-paragraph {
    font-size: 18px;
    line-height: 1.8;
    color: #2d3142;
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-left: 6px solid #d5bdaf;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: justify;
}

.transition-paragraph:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.transition-paragraph strong {
    font-weight: bold;
    color: #1d3557;
}