/**
 * Styles principaux du thème ADAPTWISE
 */

/* Reset et base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Variables globales - Toutes les variables CSS sont définies ici */
:root {
  /* Couleurs principales */
  --primary-color: #003399; /* Bleu foncé exact de la maquette Figma */
  --primary-gradient-start: #003399;
  --primary-gradient-end: #021d53; /* Correction du dégradé */
  --primary-light: #e1e1e1;
  --primary-dark: #000051;
  --accent-color: #97c12b; /* Vert pour les accents */
  --accent-light: #97c12b;
  --accent-dark: #5a9216;

  /* Couleurs de texte et fond */
  --text-color: #333333;
  --text-light: #757575;
  --background-light: #ffffff; /* Fond blanc pour les sections */
  --white: #ffffff;
  --grey: #e0e0e0;
  --black: #212121;

  /* Dimensions et espacements */
  --header-height: 80px;
  --section-padding: 50px 0;
  --border-radius: 25px; /* Coins plus arrondis pour les boutons */
}

/* Typographie */
body {
  font-family: "Open Sans", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--white);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 40px;
}

h1 {
  font-size: 48px;
  line-height: 1.3;
}

h2 {
  font-size: 37px;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-light);
}

/* Classe accent pour le mot "résiliente" */
.accent {
  color: var(--accent-color);
  font-weight: bold;
}

/* Utilitaires */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

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

.row {
  display: flex;
  flex-direction: row;
}

.justify-center {
  display: flex;
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.items-center {
  align-items: center;
}

.items-end {
  align-items: flex-end;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.gap-20 {
  gap: 20px;
}

.gap-25 {
  gap: 20px;
}

.padding-y {
  padding: 20px 0;
}

/* Boutons - Correction du style selon la maquette */
.btn {
  display: inline-block;
  padding: 5px 20px;
  border-radius: var(--border-radius);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  background-color: var(--primary-color); /* Bleu foncé pour tous les boutons */
  color: var(--white);
  border: none;
}

.btn:hover {
  background-color: #002970; /* Une teinte légèrement plus foncée au survol */
  color: var(--white);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-white {
  background-color: var(--white);
  color: var(--primary-dark);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: var(--white);
}

.btn-secondary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: var(--accent-dark);
  color: var(--white);
}

.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  flex-wrap: wrap;
}

.site-branding {
  display: flex;
  align-items: center;
}

.site-logo {
  max-height: 30px;
  width: auto;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.partner-logos {
  display: flex;
  align-items: center;
}

.partner-logo img {
  max-height: 40px;
  width: auto;
  margin-right: 15px;
}

.header-icons {
  display: flex;
  gap: 10px;
}

.icon img {
  max-height: 50px;
}

.main-navigation {
  width: 100%;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation li {
  position: relative;
}

.main-navigation a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-color);
  font-weight: 500;
}

.main-navigation a:hover {
  color: var(--primary-color);
}

.menu-toggle {
  display: none;
}

/* Hero Section - Modification du style selon la maquette */
.hero-section {
  /*   background: linear-gradient(to right, #003399 76%, #021d53 100%);
  padding: 100px 20px; */
  color: white;
  width: 100%; /* Section limitée à 75% de la largeur */
  position: relative;
}

.hero-section-background {
  background: linear-gradient(to right, #003399 76%, #021d53 100%);
  border-radius: 0px 20px 20px 0px;
  padding: 100px 20px;
  color: white;
  width: 70%; /* Section limitée à 75% de la largeur */
  position: absolute;
  height: 100%;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 50px 0px;
}

/* Vector decoration */
.vector-decoration {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 25%;
  height: 80%;

  background-image: url("../assets/images/vector.png");
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: contain;
  z-index: 0;
  pointer-events: none; /* Makes it non-interactive */
}

/* Make sure container has proper z-index */
.hero-section .container {
  position: relative;
  z-index: 1;
}

/* Texte hero */
.hero-text {
  flex: 1.2;
}

.hero-text h1 {
  font-size: 37px;
  margin-bottom: 40px;
  color: white;
}

.hero-text p {
  color: white;
  line-height: 1.5;
}

.hero-description {
  font-size: 16px;
  line-height: 1.5;
}

.hero-image {
}

.hero-image img {
  width: 100%;
  border-radius: 15px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
  border-radius: 20px;
  box-shadow: 10px 5px 5px #97c12b;
  box-shadow: 18px 12px 2px 3px #97c12b;
}

/* Risk Management Section - Mise à jour selon les images */
.risk-management-section {
  padding: var(--section-padding);
  background-color: var(--white);
}

.risk-management-content {
  margin-top: 30px;
  display: flex;
  flex-direction: row;
  column-gap: 5%;
}

.risk-intro {
  width: 100%;
  margin: 0 auto 40px;
  text-align: left;
}

.risk-management-title {
  text-align: left;
  margin-bottom: 40px;
  font-size: 37px;
}

.risk-management-description {
  text-align: left;
  max-width: 800px;
  font-size: 16px;
  line-height: 1.5;
}

.risk-cards {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(1, 1fr);
  gap: 25px;
}

.risk-card {
  background-color: var(--white);
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.risk-card h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.2rem;
  font-weight: 600;
}

.risk-card-description {
  margin-bottom: 20px;
  flex-grow: 1;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Style pour les boutons "EN SAVOIR PLUS" - Mise à jour selon la maquette */
.risk-card .btn,
.project-description .btn,
.en-savoir-plus {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.8rem;
  padding: 8px 20px;
  background-color: var(--primary-color);
  border-radius: 25px;
  color: white;
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.3s ease;
  font-weight: 500;
}

.en-savoir-plus:hover {
  background-color: #002970;
  color: var(--white);
}

/* Ajout de l'icône plus aux boutons selon l'image 2 */
.en-savoir-plus::before {
  content: "+";
  margin-right: 10px;
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1;
}

/* Section Découvrir le projet */
.discover-project-section {
  padding: var(--section-padding);
  background-color: var(--background-light);
}

.discover-project-content {
  display: flex;
  align-items: center;
  justify-items: center;
  gap: 40px;
}

.project-map {
  flex: 1;
  width: 100%;
}

.project-map img {
  width: 100%;
  border-radius: 8px;
}

.project-description {
  flex: 1;
}

.project-description h2 {
  color: var(--text-color);
  margin-bottom: 40px;
  font-size: 37px;
}

.project-description-text {
  margin-bottom: 25px;
  font-size: 16px;
  line-height: 1.5;
}

/* Media Queries */
@media (max-width: 1024px) {
  .hero-content,
  .discover-project-content {
    flex-direction: column;
  }

  .hero-section {
    background: linear-gradient(to right, #003399 76%, #021d53 100%);
    padding: 100px 20px;
    width: 100%;
  }

  .hero-content {
    padding: 0px;
  }

  .hero-text p {
    margin-bottom: 0px;
  }

  .hero-image {
    position: static;
    max-width: 100%;
  }

  .hero-section-background {
    display: none;
  }

  .risk-management-content {
    flex-direction: column;
  }

  .hero-text,
  .hero-image,
  .project-map,
  .project-description {
    flex: none;
    width: 100%;
  }

  .italy-map{
    width: 600px;
  }

  .hero-text {
    margin-right: 0;
    padding-right: 0;
  }
}

@media (max-width: 991px) {
  .risk-cards {
    grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur les tablettes */
  }
}

@media (max-width: 768px) {
  /* Layout des risques en format mobile selon l'image 2 */
  .risk-management-section .risk-cards {
    display: flex;
    flex-direction: column;
  }

  .risk-card {
    margin-bottom: 20px;
  }

  .header-wrapper {
    justify-content: space-between;
  }

  .partner-logos,
  .header-icons,
  .secondary-branding {
    display: none;
  }

  .menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
  }

  .main-navigation {
    display: none;
  }

  .main-navigation.active {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
  }

  .hero-content,
  .discover-project-content {
    flex-direction: column;
  }
}

/* Section Carte des risques */
.map-risks-section {
  padding: var(--section-padding);
  background-color: var(--primary-color);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.map-risks-content {
  display: flex;
  flex-direction: row;
  align-items: end;
  gap: 50px;
}

.map-intro {
  flex: 1;
  max-width: 40%;
  width: 40%;
}

.map-title {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--white);
}

.map-description {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 30px;
}

.department-selector {
  margin-top: 20px;
}

.department-dropdown {
  width: 100%;
  padding: 12px 15px;
  border-radius: 25px;
  border: none;
  background-color: var(--white);
  color: var(--text-color);
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L0 3h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 15px) center;
  padding-right: 40px;
}

.map-container {
  flex: 1;
  position: relative;
  height: 800px;
  max-width: 60%;
  width: 60%;
}

.italy-map {
  max-height: 900px;
}

.france-map-object {
  width: 100%;
  max-width: 580px;
  height: auto;
  aspect-ratio: 871/741;
}

/* Tooltip pour afficher le nom du département au survol */
.department-tooltip {
  position: absolute;
  background-color: var(--white);
  color: var(--primary-color);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

.department-tooltip.visible {
  opacity: 1;
}

/* Ajustement de la taille de la carte */
@media (max-width: 1200px) {
  .france-map-object {
    max-width: 500px;
  }
}

/* Media queries */
@media (max-width: 991px) {
  .map-risks-content {
    flex-direction: column;
    gap: 0px;
  }

  .map-intro,
  .map-container {
    max-width: 100%;
    width: 100%;
  }

  .france-map-object {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 768px) {
  .map-risks-section {
    padding: 30px 15px;
  }

  .map-title {
    font-size: 28px;
  }
}

/* Styles pour les onglets de pays dans la section carte */
.map-risks-section .country-tabs {
  display: flex;
  width: 100%;
  margin-bottom: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.map-risks-section .country-tabs .tab {
  flex: 1;
  text-align: center;
  padding: 15px 20px;
  cursor: pointer;
  color: var(--primary-color);
  background-color: var(--white);
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  border: 2px solid var(--primary-color);
  font-size: 14px;
}

.map-risks-section .country-tabs .tab:first-child {
  border-right: 1px solid var(--primary-color);
}

.map-risks-section .country-tabs .tab.active {
  background-color: var(--primary-color);
  color: var(--white);
}

.map-risks-section .country-tabs .tab:not(.active) {
  opacity: 0.8;
}

.map-risks-section .country-tabs .tab:hover:not(.active) {
  opacity: 1;
  background-color: rgba(0, 51, 153, 0.1);
}

/* Styles pour surligner le pays actif tout en gardant l'autre visible */
/* Transition fluide pour les changements de pays */
.department {
  transition: opacity 0.3s ease, filter 0.3s ease;
}
