/**
 * 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: #9aca3c;
  /* Vert pour les accents */
  --accent-light: #9aca3c;
  --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: 100px;
  --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);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Ensure main content grows to push footer down */
#primary,
.site-main,
main {
  flex: 1;
}

/* Hiérarchie des titres pour contenus WYSIWYG */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 40px;
}

h1 {
  font-size: 38px;
  line-height: 1.3;
}

h2 {
  font-size: 32px;
}

h3 {
  font-size: 24px;
  font-weight: 600;
}

h4 {
  font-size: 20px !important;
  font-weight: 600;
}

h5 {
  font-size: 18px !important;
  font-weight: 600;
}

h6 {
  font-size: 16px !important;
  font-weight: 600;
}

@media (max-width: 768px) {
  h1 {
    font-size: 28px !important;
  }

  h2 {
    font-size: 24px !important;
  }

  h3 {
    font-size: 20px !important;
  }

  h4 {
    font-size: 18px !important;
  }

  h5 {
    font-size: 16px !important;
  }

  h6 {
    font-size: 14px !important;
  }
}

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;
}

/* Classe pour mettre du texte en vert (identique à .accent) */
.green-text {
  color: var(--accent-color);
  font-weight: bold;
}

/* Utilitaires */
/* Utilitaires */
.container {
  width: 100%;
  /* padding-right: 15px;
  padding-left: 15px; */
  margin-right: auto;
  margin-left: auto;
}

/* Pour les petits appareils (mode paysage) */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

/* Pour les tablettes */
@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

/* Pour les ordinateurs de bureau */
@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

/* Pour les grands ordinateurs de bureau */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

.padding-container {
  padding: 0;
}

.site-main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  margin-top: 50px;
}

.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;
}

.items-start {
  align-items: flex-start;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.gap-20 {
  gap: 20px;
}

.gap-25 {
  gap: 20px;
}

.gap-60 {
  gap: 60px;
}

.padding-y {
  padding: 45px 0;
}

/* Boutons - Correction du style selon la maquette */
.btn {
  display: inline-block;
  padding: 8px 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);
  /*Bleufoncépourtouslesboutons*/color: var(--white);
  border: none;
  -webkit-border-radius: var(--border-radius);
  -moz-border-radius: var(--border-radius);
  -ms-border-radius: var(--border-radius);
  -o-border-radius: var(--border-radius);
}

.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);
  border-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);
}

.site-logo-acf {
  display: flex;
  align-items: center;
}

.site-logo-acf img {
  max-height: 40px;
  width: auto;
  margin-right: 15px;
}

/* Styles pour le logo principal du site */
.main-site-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  position: relative;
  text-decoration: none;
}

.main-site-logo {
  max-height: 35px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  transition: opacity 0.3s ease !important;
}

/* Styles pour le nom du site principal (fallback) */
.site-name-link {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  position: relative;
  text-decoration: none;
}

.header-icons {
  display: flex;
  gap: 10px;
}

/* Style pour le widget météo (bouton) */
.meteo-widget {
  display: flex;
  align-items: center;
}

.meteo-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 1px solid #2196f3;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: #1976d2;
  font-size: 12px;
  font-family: Arial, sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  min-width: 120px;
}

.meteo-button:hover {
  background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
  border-color: #1976d2;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  color: #0d47a1;
}

.meteo-icon {
  font-size: 18px;
  line-height: 1;
}

.meteo-text {
  line-height: 1.2;
}

.meteo-text strong {
  font-size: 11px;
  font-weight: 600;
}

.meteo-text small {
  font-size: 9px;
  opacity: 0.8;
}

/* Responsive pour bouton météo */
@media (max-width: 991px) {
  .meteo-button {
    min-width: 100px;
    padding: 6px 10px;
  }

  .meteo-text strong {
    font-size: 10px;
  }

  .meteo-text small {
    font-size: 8px;
  }
}

@media (max-width: 768px) {
  .meteo-button {
    min-width: 80px;
    padding: 5px 8px;
    gap: 6px;
  }

  .meteo-icon {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .meteo-widget {
    display: none;
  }
}

.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;
}

/* Classe pour ajouter le padding de section */
.container-section-margin-top {
  margin-top: 50px;
}

/* 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-button-container {
  margin-top: 30px;
}

.hero-button {
  display: inline-block;
  padding: 8px 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: white;
  color: #003399;
  border: none;
}

.hero-button:hover {
  background-color: transparent;
  color: white;
}

.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 #9aca3c;
  box-shadow: 18px 12px 2px 3px #9aca3c;
}

/* Styles pour la vidéo Hero */
.hero-video {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-video-element {
  width: 100%;
  max-width: 100%;
  border-radius: 20px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
  /* Ombre verte caractéristique identique à l'image */
  box-shadow: 18px 12px 2px 3px #9aca3c;
  background-color: #000;
}

.hero-video-element:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Risk Management Section - Mise à jour selon les images */
.risk-management-section {
  padding: var(--section-padding);
  background-color: var(--white);
}

.risk-management-content {
  display: flex;
  flex-direction: column;
  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;
  font-size: 16px;
  line-height: 1.5;
}

.risk-cards {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, 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-weight: 600;
}

.risk-card-description {
  margin-bottom: 20px;
  flex-grow: 1;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Forcer l'affichage des descriptions de cartes de risque sur mobile */
@media (max-width: 768px) {
  .risk-card-description[style*="display: none"],
  .risk-card-description {
    display: block !important;
  }
}

/* Style pour les boutons "EN SAVOIR PLUS" - Mise à jour selon la maquette */
.risk-card .btn,
.btn-small {
  padding: 8px 20px !important;
  font-size: 14px !important;
}

.project-description .btn,
.en-savoir-plus {
  align-self: flex-start;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.3s ease;
  text-transform: uppercase;
  margin-top: auto;
  -webkit-border-radius: 25px;
  -moz-border-radius: 25px;
  -ms-border-radius: 25px;
  -o-border-radius: 25px;
}

@media (max-width: 768px) {
  .risk-card .btn,
  .project-description .btn,
  .en-savoir-plus {
    align-self: center;
    text-align: center;
    width: 100%;
    display: block;
  }
}

.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: "+";
  font-weight: bold;
  margin-right: 8px;
  font-size: 1.1em;
}

/* 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;
}

/* Styles pour la vidéo projet */
.project-video {
  flex: 1;
  width: 100%;
}

.project-video-element {
  width: 100%;
  border-radius: 8px;
  background-color: #000;
}

.project-video-element:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.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;
}

/* ===========================
   FIL D'ARIANE (BREADCRUMB)
   =========================== */
.breadcrumb-navigation {
  background-color: #fff;
  padding: 12px 0;
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Pour un défilement fluide sur iOS */
  position: relative; /* Requis pour que z-index fonctionne */
  z-index: 10; /* S'assure qu'il est au-dessus des autres éléments */
}

.breadcrumb {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  padding: 0 8px;
  color: #6c757d;
  font-size: 16px;
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.breadcrumb-item a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.breadcrumb-item.active span {
  color: #6c757d;
  font-weight: 500;
}

@media (max-width: 1200px) {
  .breadcrumb-navigation {
    padding: 8px 15px;
  }
}

/* Media Queries */
@media (max-width: 1024px) {
  .hero-content,
  .discover-project-content {
    flex-direction: column-reverse;
  }

  .hero-section {
    background: linear-gradient(to right, #003399 76%, #021d53 100%);
    padding: 50px 20px;
    width: 100%;
  }

  .hero-content {
    padding: 0px;
  }

  .container-section-margin-top {
    margin-top: 0px;
    padding: 0px !important;
  }

  .hero-video-element {
    box-shadow: none;
  }

  .hero-video {
    width: 100%;
  }

  .hero-button-container {
    margin-top: 20px;
  }

  .hero-button {
    padding: 10px 25px;
    font-size: 14px;
  }

  .hero-text p {
    margin-bottom: 0px;
  }

  .hero-image {
    position: static;
    max-width: 100%;
  }

  .hero-section-background {
    display: none;
  }

  .risk-management-content {
    flex-direction: column;
  }

  .breadcrumb-navigation {
    padding: 8px 15px;
  }

  .padding-container {
    padding: 0px 15px;
  }

  .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(1, 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;
  }
}

/* Version mobile */
@media (max-width: 768px) {
  .breadcrumb-navigation {
    padding: 8px 15px;
  }

  .breadcrumb {
    font-size: 13px;
  }

  .breadcrumb-item + .breadcrumb-item::before {
    padding: 0 6px;
  }
}
