/* Définition des polices */
@font-face {
    font-family: Kalam;
    src: url(ttf/Kalam-Bold.ttf);
}

@font-face {
    font-family: OpenSansReg;
    src: url(ttf/OpenSans-Regular.ttf);
}

@font-face {
    font-family: OpenSansSemiBold;
    src: url(ttf/OpenSans-SemiBold.ttf);
}

/* Variables globales */
:root {
    --primary-color: rgb(52, 73, 94);
    --white: #ffffff;
    --footer-height: 38px;
    --buttons-height: 100px;
}

/* Réinitialisation et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: OpenSansReg, sans-serif;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239e9d24' fill-opacity='0.07'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Titre caché visuellement mais accessible */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Conteneur principal */
.layout-container {
    height: 100vh;
    padding-bottom: var(--footer-height);
    display: flex;
    flex-direction: column;
}

/* Section de l'image - prend tout l'espace disponible */
.image-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 20px 0 0;
}

/* Par défaut, l'image est entièrement visible */
.responsive-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* Section des boutons avec flexbox */
.buttons-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 10px;
    height: var(--buttons-height);
    gap: 20px; /* Espacement uniforme entre les boutons */
}

/* Styles des boutons */
.button-link {
    width: 170px;
    height: 43px;
    padding: 5px 10px;
    font-family: Kalam, sans-serif;
    font-size: 16px;
    color: white;
    border: 3px solid;
    border-radius: 2rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.button1 {
    background-color: rgb(255, 138, 101);
    border-color: rgb(230, 87, 50);
}

.button2 {
    background-color: rgb(192, 202, 51);
    border-color: rgb(158, 157, 36);
}

.button3 {
    background-color: rgb(255, 179, 0);
    border-color: rgb(255, 135, 0);
}

.button4 {
    background-color: rgb(38, 198, 218);
    border-color: rgb(0, 172, 193);
}

.button5 {
    background-color: rgb(149, 117, 205);
    border-color: rgb(126, 87, 197);
}

.button1:hover {
    background-color: rgb(230, 87, 50);
}

.button2:hover {
    background-color: rgb(158, 157, 36);
}

.button3:hover {
    background-color: rgb(255, 135, 0);
}

.button4:hover {
    background-color: rgb(0, 172, 193);
}

.button5:hover {
    background-color: rgb(126, 87, 197);
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--footer-height);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
    padding: 0 .5rem;
    background-color: var(--primary-color);
    color: var(--white);
    z-index: 100;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.3;
    z-index: 0;
}

/* Styles pour les éléments à l'intérieur du footer */
footer span, footer a {
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
}

footer a {
    color: var(--white);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
    color: rgba(255, 255, 255, 0.8);
}

.separator {
    margin: 0 0.75rem;
}

.license-part {
    margin: 0 0.5rem;
}

.contact-part a {
    margin-left: 4px; /* Ajoute un espace entre "Contact :" et le lien */
}

.mobile-text {
    display: none;
}

.flower-inspired-by {
    height: 20px;
    margin-right: .5rem;
}

/* Styles pour les modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
  animation: fadeIn 0.3s;
}

.modal-content {
  position: relative;
  background-color: var(--white);
  margin: auto;
  width: 85%;
  max-width: 700px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.4s;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: rgb(255, 138, 101); /* Même couleur que le bouton Présentation Sozi */
  border-radius: 12px 12px 0 0; /* Arrondir les coins supérieurs */
}

.modal-header h3 {
  font-family: Kalam, sans-serif;
  color: white; /* Même couleur que le texte du bouton */
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.3;
}

.modal-close {
  font-size: 24px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8); /* Version légère du blanc */
  transition: color 0.2s;
}

.modal-close:hover {
  color: white; /* Blanc pur au survol */
}

.modal-body {
  padding: 20px;
}

/* Styles pour le bloc d'information sur Sozi */
.sozi-info {
  background-color: #f5f7fa;
  border-left: 4px solid rgb(255, 138, 101);
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 20px;
}

.sozi-info p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #444;
  margin: 0 0 12px 0;
}

.sozi-info a {
  color: rgb(255, 138, 101);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.sozi-info a:hover {
  color: rgb(255, 87, 50);
  text-decoration: underline;
}

/* Styles pour la modal de présentation */
.card-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.option-card {
  flex: 1;
  min-width: 180px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #eee;
  transition: all 0.3s;
  text-align: center;
}

.option-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.option-card h4 {
  margin: 0 0 10px;
  color: var(--primary-color);
}

.option-card p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 15px;
}

.card-btn {
  background-color: rgb(255, 138, 101);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 15px;
  cursor: pointer;
  font-family: Kalam, sans-serif;
  transition: background-color 0.3s;
  text-decoration: none;
  display: inline-block;
  min-width: 170px; /* Largeur minimale fixe pour tous les boutons */
  text-align: center;
  white-space: nowrap; /* Empêche le texte de passer à la ligne */
  font-size: 15px; /* Taille de police uniforme */
}

.card-btn:hover {
  background-color: rgb(255, 87, 50);
}

/* Styles pour la modal de notice modernisée */
.notice-modal-content {
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
}

.notice-intro {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 25px;
  line-height: 1.5;
}

.notice-section {
  margin-bottom: 30px;
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 20px 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.icon-container {
  margin-right: 10px;
  display: flex;
  align-items: center;
}

.notice-section h4 {
  font-family: OpenSansSemiBold, sans-serif;
  color: var(--primary-color);
  margin: 0;
  font-size: 1.1rem;
}

.modern-list {
  list-style-type: none;
  padding-left: 5px;
  margin-left: 10px;
}

.modern-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.modern-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgb(255, 138, 101);
}

.notice-section a {
  color: rgb(255, 138, 101);
  text-decoration: none;
  font-weight: 500;
}

.notice-section a:hover {
  color: rgb(255, 87, 50);
  text-decoration: underline;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Media queries pour la responsivité */
@media (max-width: 1200px) {
    .responsive-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}

/* Breakpoint pour passer à 3+2 boutons */
@media (max-width: 1020px) {
    :root {
        --buttons-height: 55px;
    }
    .responsive-image {
        object-position: 40% center; /* Center le coeur de la fleur */
        transform: scale(1.3); /* Ajoute un zoom de 20% */
        transform-origin: center; /* Assure que le zoom est centré */
    }

    .image-section {
        padding: 20px 0 10px;
    }
    
    .layout-container {
        padding-bottom: 120px;
    }
    
    /* Pour forcer 3+2 avec flexbox */
    .buttons-section {
        width: 100%;
        max-width: 630px; /* Limite la largeur pour forcer le retour à la ligne après 3 boutons */
        margin: 0 auto;
    }
}

@media (max-width: 932px) {
    .flower-inspired-by, .inspired-by  {
        display: none;
    }
}

/* Ajustements pour le footer à 730px */
@media (max-width: 734px) {
    :root {
        --footer-height: 50px; /* Hauteur pour deux lignes */
        --buttons-height: 67px;
    }

    .responsive-image {
        object-position: 44% center; /* Center le coeur de la fleur */
    }
    
    footer {
        flex-wrap: wrap; /* Permet le retour à la ligne */
        justify-content: center;
        padding: .4rem 0;
    }
    
    .copyright-part {
        flex-basis: 100%; /* Force le passage à la ligne suivante */
        text-align: center;
    }
    
    /* Cache le premier séparateur */
    .copyright-part + .separator {
        display: none;
    }
    
    /* Centre les éléments de la seconde ligne */
    .license-part, .contact-part, .license-part + .separator {
        display: inline-flex;
        align-items: center;
    }
}

/* Breakpoint pour passer à 2+2+1 boutons */
@media (max-width: 610px) {
    :root {
        --buttons-height: 130px; /* Trois lignes de boutons */
    }
    
    .buttons-section {
        max-width: 410px; /* Limite pour forcer 2 boutons par ligne */
    }
    
    /* Forcer le 5ème bouton sur sa propre ligne */
    .button-link:nth-child(5) {
        margin: 0 auto; /* Centre le 5ème bouton */
    }
    
    /* Styles responsifs pour les modals */
    .card-container {
        flex-direction: column;
    }
    
    .option-card {
        margin-bottom: 0;
    }
    
    /* Styles responsifs pour la notice */
    .notice-section {
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .section-header {
        margin-bottom: 10px;
    }
    
    .notice-section h4 {
        font-size: 1rem;
    }
    
    .modern-list li {
        font-size: 0.85rem;
    }
    
    .sozi-info {
        padding: 12px;
    }
      
    .sozi-info p {
        font-size: 0.9rem;
    }
    
    .card-btn {
        min-width: 150px;
        font-size: 14px;
    }
}

/* Breakpoint pour passer à 1 bouton par ligne et footer sur 3 lignes */
@media (max-width: 410px) {     
    .responsive-image {
        object-position: 46% center; /* Center le coeur de la fleur */
    }
    /* Réinitialiser complètement le footer */
    footer {
        display: block; /* Utiliser un affichage block au lieu de flex */
        padding: .4rem 0;
        text-align: center;
    }
    
    /* Copyright sur une ligne séparée */
    .copyright-part {
        display: block;
        width: 100%;
    }
    
    /* License et Contact sur la même ligne */
    .license-part, .contact-part {
        display: inline-block;
    }
    
    /* Gestion du texte Contact */
    .contact-part .contact-text, 
    .contact-part .email-text {
        display: none;
    }
    
    .contact-part .mobile-text {
        display: inline;
    }
}

@media (max-width: 410px) {
  /* Modal à 100% de largeur */
  .modal-content {
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    margin: auto 0;
  }
  
  /* Cacher la div.sozi-info */
  .sozi-info {
    display: none;
  }
  
  /* Cacher les icônes */
  .card-icon, .icon-container {
    display: none;
  }
  
  /* Ajuster les marges sans les icônes */
  .section-header {
    margin-bottom: 10px;
  }
  
  /* Ajuster le padding du modal-body */
  .modal-body {
    padding: 15px 30px;
  }
  
  /* Réduire le padding des cartes d'options */
  .option-card {
    padding: 12px 10px;
    margin: 0 20px;
  }

  .card-container {
    margin-top: 0;
}
}

@media (max-width: 380px) {  
    :root {
        --buttons-height: 155px;
    }
    /* Styles des boutons */
    .button-link {
        width: 158px;
        font-size: 15px;
    }

    .buttons-section {
        gap: 10px;
    }
}

@media (max-width: 350px) {  
    :root {
        --buttons-height: 210px;
    }
}