﻿/* =================================================== */
/* 1. TYPOGRAPHIE ET VARIABLES GLOBALES                */
/* =================================================== */
:root {
  --main-font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text-color: #2c3e50;
  --text-light: #555555;
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --border-color: #dddddd;
  --bg-light: #ffffff;
}

* {
  box-sizing: border-box;
  font-family: var(--main-font);
}

body {
  margin: 0;
  padding: 10px;
  background-color: #f4f4f4;
  color: var(--text-color);
  line-height: 1.5;
  font-size: 14px;
}

/* Titres unifiés */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-color);
  margin-top: 0;
  font-weight: 700;
}

h2 { font-size: 18px; margin-bottom: 12px; }
h3 { font-size: 15px; margin-bottom: 8px; }

/* Form Elements */
input, textarea, button, select, label {
  font-family: var(--main-font);
  font-size: 13px;
  color: var(--text-color);
  max-width: 100%;
}

/* =================================================== */
/* 2. HEADER & DISPOSITION DE BASE                     */
/* =================================================== */
.header-logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.site-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  color: var(--text-color);
}

.bloc-top {
  width: 100%;
  padding: 10px 15px;
  margin-bottom: 10px;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
}

/* Conteneur principal (Layout mobile par défaut) */
.conteneur-principal {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bloc-left, .bloc-main, .bloc-right, .bloc-bottom {
  width: 100%;
  padding: 15px;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
}

/* --- RÈGLE STRICTE MOBILE/TABLETTE (< 1024px) --- */
/* Masque totalement la colonne gauche et son conteneur sur mobile/tablette */
.bloc-left,
.menu-container-left {
  display: none !important;
}

/* Hamburger button */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 10px 0;
}

.hamburger-btn span {
  width: 100%;
  height: 3px;
  background-color: var(--text-color);
  border-radius: 2px;
  transition: all 0.3s linear;
}

/* =================================================== */
/* 3. DESIGN DE LA CLASSE DE MENU (.menu)             */
/* =================================================== */
.menu {
  flex-direction: column;
  width: 100%;
  gap: 6px;
  list-style: none;
  padding: 8px 0;
  margin: 0 auto;
  align-items: stretch;
}

.menu li {
  width: 100%;
  position: relative;
}

.menu li a, .menu li summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 8px 14px;
  min-height: 36px;
  background-color: var(--bg-light);
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
  cursor: pointer;
  width: 100%;
}

.menu li a:hover, .menu li summary:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  padding-left: 18px;
}

/* Nested Menu */
.nested-vertical-menu {
  width: 100%;
  text-align: left;
}

.nested-vertical-menu summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

.nested-vertical-menu summary::-webkit-details-marker {
  display: none;
}

.submenu-content {
  background-color: #f8f9fa;
  border: 1px solid var(--primary-color);
  border-radius: 6px;
  padding: 8px;
  margin-top: 4px;
}

.vertical-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vertical-menu details {
  margin-bottom: 4px;
}

.vertical-menu summary {
  background-color: var(--text-color) !important;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 10px !important;
  border-radius: 4px !important;
  justify-content: flex-start !important;
}

.vertical-menu ul {
  list-style: none;
  padding: 4px 0 4px 12px;
  margin: 4px 0 0 0;
  background-color: var(--bg-light);
  border-left: 3px solid var(--primary-color);
}

.vertical-menu ul li a {
  display: block;
  padding: 6px 8px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 13px;
  border: none !important;
  box-shadow: none !important;
  text-align: left !important;
  justify-content: flex-start !important;
  background: transparent !important;
}

.vertical-menu ul li a:hover {
  background-color: #e9ecef !important;
  color: var(--primary-color) !important;
}

/* =================================================== */
/* 4. ISOLATION DE LA VISIBILITÉ DU MENU HEADER        */
/* =================================================== */
.menu-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.menu-container .menu {
  display: none; /* Masqué par défaut tant qu'inactif */
}

.menu-container .menu.active {
  display: flex !important; /* Affiché uniquement au clic du hamburger */
}

/* =================================================== */
/* 5. FORMULAIRES, CARTES & ARTICLES                   */
/* =================================================== */
.contact-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group table {
  width: 100%;
}

.form-group td {
  padding: 4px;
  display: block;
  width: 100%;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.btn-submit {
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
}

.carte-article {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  padding: 12px;
  margin-top: 15px;
  margin-bottom: 15px;
  border-radius: 6px;
}

.carte-article img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.map-container {
  width: 100%;
  display: flex;
  height: 250px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.aghavni-container {
  color: #1e293b;
  line-height: 1.65;
  width: 100%;
}

.aghavni-title {
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 15px;
}

.aghavni-thumb {
  width: 100%;
  max-width: 100%;
  float: none;
  margin-right: 0;
  margin-bottom: 15px;
  border-radius: 4px;
  cursor: pointer;
}

.aghavni-text {
  font-size: 14.5px;
  color: #334155;
  margin-bottom: 16px;
}

/* Modal Popup */
.aghavni-modal {
  border: none;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  max-width: 92vw;
  max-height: 90vh;
}

.aghavni-modal::backdrop {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(2px);
}

.aghavni-modal-content {
  position: relative;
  display: inline-block;
}

.aghavni-modal img {
  width: 100%;
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.aghavni-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.clearfix::after {
  content: "";
  clear: both;
  display: table;
}

/* =================================================== */
/* 6. MEDIA QUERIES (TABLETS: 768px - 1023px)         */
/* =================================================== */
@media (min-width: 768px) and (max-width: 1023px) {
  .conteneur-principal {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .bloc-main {
    width: 100%;
  }

  .bloc-right {
    width: 100%;
  }

  .aghavni-thumb {
    width: 200px;
    float: left;
    margin-right: 20px;
  }

  .btn-submit {
    width: auto;
  }
}

/* =================================================== */
/* 7. MEDIA QUERIES (DESKTOPS: 1024px +)               */
/* =================================================== */
@media (min-width: 1024px) {
  /* Masque le bouton hamburger et le menu mobile sur ordinateur */
  .hamburger-btn,
  .menu-container,
  .menu-container .menu,
  .menu-container .menu.active {
    display: none !important;
  }

  /* Affiche la colonne gauche et son menu sur ordinateur */
  .bloc-left {
    display: block !important;
    width: 22%;
  }

  .menu-container-left {
    display: block !important;
  }

  .menu-container-left .menu {
    display: flex !important;
  }

  /* Layout principal sur ordinateur */
  .conteneur-principal {
    flex-direction: row;
    align-items: flex-start;
  }

  .bloc-main {
    width: 56%;
    margin: 0 10px;
  }

  .bloc-right {
    width: 22%;
  }

  .aghavni-thumb {
    width: 220px;
    float: left;
    margin-right: 25px;
  }

  .contact-wrapper {
    flex-direction: row;
    justify-content: space-between;
  }

  .form-group td {
    display: table-cell;
  }

  .carte-article {
    flex-direction: row;
    align-items: center;
  }

  .carte-article img {
    max-width: 150px;
  }

  .btn-submit {
    width: auto;
  }
}