/* style.css */

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  color: white;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(135deg, #4e73df, #1cc88a);
  background-size: 200% 200%;
  animation: gradientMove 8s ease infinite;
  overflow-x: hidden;
  padding-top: 75px;
}

@keyframes gradientMove {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ========================
   NAVBAR
======================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  z-index: 1000;
}

.navbar-logo img {
  height: 50px;
  width: auto;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  list-style: none;
}

.navbar-links a {
  text-decoration: none;
  color: #333;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 9px;
  border-radius: 6px;
  transition: 0.2s ease;
  white-space: nowrap;
}

.navbar-links a:hover {
  color: #4e73df;
}

.navbar-links a.active {
  font-weight: 700;
  border-bottom: 3px solid #e8a87c;
  border-radius: 0;
}

.navbar-search {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #333;
  padding: 6px;
  transition: 0.2s;
}

.navbar-search:hover {
  color: #4e73df;
}

/* HAMBURGER */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: #333;
  border-radius: 3px;
  transition: 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ========================
   HEADER
======================== */
.header-zone {
  text-align: center;
  padding: 80px 20px 50px 20px;
}

.header-zone h1 {
  font-size: 48px;
  font-weight: 700;
}

.header-zone p {
  margin-top: 20px;
  font-size: 20px;
  opacity: 0.9;
}

/* ========================
   CARTES NIVEAUX (avec image)
======================== */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 60px;
  padding-bottom: 80px;
}

.card {
  position: relative;
  width: 360px;
  height: 240px;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transition: 0.5s ease;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0.2));
}

.card-content {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 2;
}

.card h3 { font-size: 26px; }

.card:hover img { transform: scale(1.1); }
.card:hover { transform: translateY(-15px) scale(1.03); }

/* Carte grande format (page habilitation) */
.card-large {
  width: 600px;
  height: 360px;
}

@media (max-width: 768px) {
  .card-large { width: 90%; height: 260px; }
}

/* ========================
   CARTES SIMPLES (sans image)
======================== */
.card-simple {
  position: relative;
  width: 360px;
  height: 220px;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transition: 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  text-align: center;
  padding: 20px;
}

.card-simple:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.card-simple span {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 400;
  opacity: 0.85;
}

/* ========================
   ACCÈS RAPIDE
======================== */
.quick-section {
  max-width: 1200px;
  margin: 60px auto 120px auto;
  padding: 0 20px;
}

.quick-main-title {
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 70px;
}

.quick-category {
  margin-bottom: 70px;
}

.quick-category h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 22px;
  font-weight: 600;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 35px;
  max-width: 800px;
  margin: 0 auto;
}

.quick-card {
  background: white;
  color: #333;
  border-radius: 20px;
  padding: 30px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0,0,0,0.25);
  transition: 0.4s ease;
  width: 100%;
  min-height: 110px;
}

.quick-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 45px rgba(0,0,0,0.35);
}

.quick-card a {
  text-decoration: none;
  color: #4e73df;
  font-weight: 600;
  font-size: 16px;
  display: block;
  width: 100%;
  text-align: center;
}

.cctp {
  grid-column: 1 / -1;
  max-width: calc(50% - 17.5px);
  margin: 0 auto;
}

/* ========================
   FORMULAIRE ORDRE DE TRAVAIL
======================== */
.ot-intro {
  text-align: center;
  padding: 50px 20px 30px 20px;
}

.ot-intro h1 {
  font-size: 36px;
  font-weight: 700;
}

.ot-intro p {
  margin-top: 12px;
  font-size: 17px;
  opacity: 0.9;
}

.ot-wrapper {
  max-width: 900px;
  margin: 0 auto 80px auto;
  padding: 0 20px;
}

/* Zone formulaire sur fond blanc */
.page {
  width: 100%;
  background: white;
  color: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  padding: 10px;
}

.page table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.page td {
  border: 1px solid black;
  padding: 5px;
  font-size: 12px;
  vertical-align: top;
  font-family: Arial, sans-serif;
  color: #000;
}

.page .title {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.page .orange {
  background: #e8742b;
  font-weight: bold;
  text-align: center;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.page .green {
  background: #548235;
  font-weight: bold;
  text-align: center;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.page .center { text-align: center; }

.page select,
.page input[type="text"],
.page input[type="date"] {
  border: none;
  border-bottom: 1px solid black;
  width: 100%;
  background: transparent;
  font-size: 13px;
}

.page input[type="time"] {
  border: none;
  border-bottom: 1px solid black;
  background: transparent;
  font-size: 13px;
  width: 80px;
}

.inline-select {
  width: auto !important;
  display: inline-block;
}

.inline-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #000;
}

.nom-ligne {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #000;
}

.nom-ligne select { width: 220px; }

.signature-zone { height: 40px; }

.hover-item {
  position: relative;
  display: block;
  margin: 4px auto;
  width: fit-content;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #000;
}

.hover-item img {
  display: none;
  position: absolute;
  top: 50%;
  left: 105%;
  transform: translateY(-50%);
  width: 120px;
  background: white;
  border: 1px solid #999;
  padding: 4px;
  z-index: 100;
}

.hover-item:hover img { display: block; }

.ligne-fin {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #000;
}

.pdf-button {
  display: block;
  margin: 25px auto;
  padding: 14px 36px;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  background: #e8742b;
  color: white;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.pdf-button:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

@media print {
  .navbar, .ot-intro, .pdf-button, .custom-footer { display: none !important; }
  .hover-item img { display: none !important; }
  body { padding-top: 0; background: white; }
  .page { box-shadow: none; border-radius: 0; }
}

/* ========================
   PAGE ORDRE DE TRAVAIL / CHANTIERS
======================== */
.Zone1 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 50px;
  margin: 40px auto 80px auto;
  max-width: 1000px;
  padding: 0 20px;
}

.ZoneCard {
  text-align: center;
}

.ZoneCard a {
  text-decoration: none;
}

.image-bloc {
  width: 260px;
  height: 200px;
  object-fit: contain;
  background: #111;
  padding: 10px;
  border-radius: 12px;
  transition: transform 0.3s ease;
  display: block;
}

.image-bloc:hover {
  transform: scale(1.05);
}

.ZoneCard h3 {
  color: white;
  font-weight: 600;
  margin-top: 10px;
  text-decoration: underline;
}

/* ========================
   VIDÉO
======================== */
.video-section {
  max-width: 1000px;
  margin: 0 auto 100px auto;
  padding: 0 20px;
}

/* Pour les iframes (YouTube, Google Drive) */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Pour les vidéos locales */
.video-wrapper-local {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  overflow: hidden;
}

.video-wrapper-local video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
}

.footer-divider {
  height: 1px;
  background: rgba(255,255,255,0.3);
  margin: 25px auto;
  width: 70%;
}

/* ========================
   PAGE PFMP
======================== */
.section-title {
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  margin: 60px 0 40px 0;
}

.pfmp-timeline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 0 20px;
  margin-bottom: 40px;
}

.step {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  border-radius: 20px;
  padding: 25px;
  width: 200px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.step-number {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-title {
  font-weight: 600;
  font-size: 16px;
}

.step-desc {
  font-size: 14px;
  opacity: 0.9;
  margin-top: 8px;
}

.cpro-box {
  max-width: 800px;
  margin: 30px auto 50px auto;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.cpro-box h2 {
  margin-bottom: 15px;
  font-size: 22px;
}

.cpro-box p {
  font-size: 16px;
  line-height: 1.7;
  opacity: 0.95;
}

.cpro-button {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 26px;
  border-radius: 40px;
  background: #1cc88a;
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

.cpro-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* ========================
   FOOTER
======================== */
.custom-footer {
  background: #4b3f72;
  padding: 60px 20px;
  text-align: center;
  margin-top: auto;
}

.footer-info {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 40px;
}

.mail-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.mail-link:hover { text-decoration: underline; }

.footer-social {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  color: white;
  transition: 0.3s ease;
}

.social-btn img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.facebook  { background: #1877F2; }
.instagram { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4); }
.x         { background: #000000; }
.youtube   { background: #FF0000; }

.social-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 1024px) {
  .navbar-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 75px;
    left: 0;
    width: 100%;
    background: white;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    gap: 10px;
  }

  .navbar-links.open { display: flex; }

  .navbar-links a {
    font-size: 16px;
    padding: 10px 15px;
    color: #333;
    width: 100%;
  }

  .hamburger { display: flex; }
  .navbar-search { display: none; }
}

@media (max-width: 768px) {
  .header-zone h1 { font-size: 34px; }
  .card { width: 90%; height: 220px; }
  .card-simple { width: 90%; }
  .quick-grid { grid-template-columns: 1fr; }
  .cctp { grid-column: auto; max-width: 100%; }
}