/* =========================================================
   EPHITECH HTA - STYLE PRINCIPAL
   Fichier : assets/css/style.css

   Version contrôlée :
   - Hero HTA aligné sur la logique de la page IRVE
   - Image d'en-tête gérée par <div class="hero-bg-image"><img ...></div>
   - Suppression des règles ambiguës de fond directement sur .hero-card
   - Conservation de la charte HTA : vert/gris clair + bleu nuit + jaune
   ========================================================= */


/* ================= VARIABLES ================= */
/* Couleurs utilisées sur tout le site HTA */

:root{
  --bg:#eef3f1;
  --bg2:#dbe8e2;
  --ink:#071b2f;
  --muted:#4f6475;
  --accent:#0b2f5b;
  --accent2:#123f73;
  --yellow:#ffd400;
  --white:#ffffff;
  --border:#d6e0dc;
}


/* ================= BASE ================= */

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:Arial, sans-serif;
  background:linear-gradient(180deg, var(--bg), var(--bg2));
  color:var(--ink);
}

/* Fond décoratif discret, cohérent avec la charte HTA */
body::before{
  content:"";
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background-image:
    linear-gradient(120deg, transparent 48%, rgba(80,180,120,0.10) 49%, transparent 50%),
    linear-gradient(300deg, transparent 48%, rgba(60,160,100,0.08) 49%, transparent 50%);
  background-size:320px 320px;
  pointer-events:none;
  z-index:0;
}

/* Le contenu passe au-dessus du fond décoratif */
header,
main,
footer{
  position:relative;
  z-index:1;
}

.container{
  max-width:1180px;
  margin:auto;
  padding:24px;
}


/* ================= HEADER ================= */

.site-header{
  background:var(--white);
  border-bottom:4px solid var(--yellow);
  box-shadow:0 2px 12px rgba(0,0,0,0.08);
  position:sticky;
  top:0;
  z-index:10;
}

.header-inner{
  min-height:92px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:40px;
}


/* ================= LOGO ================= */

.logo{
  display:flex;
  align-items:center;
  flex-shrink:0;
}

.logo img{
  height:64px;
  width:auto;
  object-fit:contain;
  display:block;
}


/* ================= NAVIGATION ================= */

.nav-zone{
  display:flex;
  align-items:center;
  gap:16px;
  background:#f6f8f7;
  padding:8px;
  border-radius:999px;
  border:1px solid #e1e8e5;
  box-shadow:inset 0 1px 2px rgba(0,0,0,0.04);
}

.menu{
  display:flex;
  align-items:center;
  gap:4px;
}

.menu a{
  color:var(--ink);
  text-decoration:none;
  font-weight:700;
  font-size:14px;
  padding:10px 15px;
  border-radius:999px;
  transition:0.2s;
  white-space:nowrap;
}

.menu a:hover,
.menu a.active{
  background:#e7efeb;
  color:var(--accent);
}

/* Bouton contact dans le menu */
.contact-link{
  background:var(--accent);
  color:#fff;
  padding:10px 20px;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  font-size:14px;
  white-space:nowrap;
  box-shadow:0 4px 12px rgba(11,47,91,0.25);
  transition:0.2s;
}

.contact-link:hover,
.contact-link.active{
  background:var(--accent2);
  color:#fff;
  transform:translateY(-1px);
}


/* ================= HERO ================= */
/*
   Structure reprise de la page IRVE :
   - .hero-card porte le fond bleu sombre
   - .hero-bg-image contient l'image en position absolue
   - le contenu texte passe au-dessus via z-index
*/

.hero{
  padding:34px 0 26px;
}

.hero-card{
  position:relative;
  overflow:hidden;

  color:white;
  padding:34px 38px;
  border-radius:18px;
  box-shadow:0 14px 35px rgba(0,0,0,0.18);

  /* Fond principal sous l'image : évite tout blanc si l'image charge lentement */
  background:linear-gradient(135deg, rgba(7,27,47,0.96), rgba(18,63,115,0.94));
}

/* Variante spécifique au hero de la page d'accueil HTA */
.hta-hero-card{
  min-height:300px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

/* Image de fond HTA : utiliser dans le HTML avec <div class="hero-bg-image"><img ...></div> */
.hero-bg-image{
  position:absolute;
  inset:0;
  z-index:0;

  overflow:hidden;
  border-radius:18px;

  /* Même principe que sur la page IRVE : image visible mais texte prioritaire */
  opacity:0.34;

  pointer-events:none;
}

.hero-bg-image img{
  width:100%;
  height:100%;

  object-fit:cover;
  object-position:center;

  display:block;
}

/* Tous les éléments du hero restent au-dessus de l'image */
.hta-hero-card > *:not(.hero-bg-image){
  position:relative;
  z-index:2;
}

/* Badge d'accroche, cohérent avec le hero IRVE */
.kicker{
  display:inline-flex;
  align-items:center;

  width:fit-content;
  max-width:max-content;

  margin-bottom:14px;
  padding:7px 12px;

  color:var(--yellow);
  background:rgba(255,255,255,0.10);
  border:1px solid rgba(255,255,255,0.18);
  border-radius:999px;

  font-size:13px;
  font-weight:800;
}

/* Halo jaune discret en haut à droite */
.hero-card::before{
  content:"";
  position:absolute;
  right:-70px;
  top:-70px;
  width:220px;
  height:220px;
  background:var(--yellow);
  opacity:0.18;
  border-radius:50%;
  z-index:1;
  pointer-events:none;
}

/* Trait lumineux subtil, comme sur le site BT/IRVE */
.hero-card::after{
  content:"";
  position:absolute;
  top:-40%;
  left:-40%;
  width:180%;
  height:180%;
  background:linear-gradient(120deg, transparent 42%, rgba(255,255,255,0.10) 50%, transparent 58%);
  transform:rotate(18deg);
  z-index:1;
  pointer-events:none;
}

.hero-card h1{
  margin:0 0 18px;
  font-size:34px;
  line-height:1.15;
  max-width:900px;
}

.lead,
.hero-card p{
  margin:0;
  color:#e8eef5;
  font-size:17px;
  line-height:1.6;
  max-width:900px;
}

/* Rangée de boutons du hero */
.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:center;
  margin-top:28px;
}

.hero-actions .btn{
  margin-top:0;
}


/* ================= BOUTONS ================= */

.btn{
  display:inline-block;
  background:var(--yellow);
  color:var(--ink);
  padding:13px 22px;
  border-radius:8px;
  font-weight:800;
  text-decoration:none;
  margin-top:24px;
  border:none;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(0,0,0,0.18);
  transition:0.2s;
  position:relative;
  z-index:1;
}

.btn:hover{
  background:#ffe45c;
  transform:translateY(-1px);
}

/* Variante de bouton blanc, disponible si besoin */
.btn-secondary{
  background:#ffffff;
  color:var(--accent);
  border:1px solid rgba(11,47,91,0.25);
}

.btn-secondary:hover{
  background:#eef3f1;
  color:var(--accent2);
}

.buttons-row{
  display:flex;
  gap:18px;
  flex-wrap:wrap;
  margin-top:24px;
  align-items:center;
}

.buttons-row .btn{
  display:inline-flex;
  width:auto;
}

/* Boutons CTA des pages réalisations */
.case-cta .btn,
.cta-btn{
  white-space:nowrap;
  min-width:220px;
  text-align:center;
}

@media(max-width:700px){
  .case-cta .btn,
  .cta-btn{
    white-space:normal;
    min-width:0;
    width:100%;
  }
}


/* ================= SECTIONS ================= */

.section{
  padding:34px 0;
}

.section h2{
  color:var(--accent);
  font-size:26px;
  margin:0 0 18px;
}

.section p{
  color:var(--muted);
  line-height:1.65;
  font-size:16px;
}

.section ul{
  margin-top:14px;
}

.section li{
  margin-bottom:8px;
  line-height:1.5;
}

.section-intro{
  max-width:760px;
  color:var(--muted);
  font-size:16px;
  line-height:1.6;
  margin-bottom:26px;
}


/* ================= CARTES GENERIQUES ================= */

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:24px;
  margin-top:30px;
}

.card{
  background:white;
  padding:24px;
  border-radius:16px;
  border:1px solid var(--border);
  box-shadow:0 8px 24px rgba(0,0,0,0.08);
  transition:0.25s;
  position:relative;
  overflow:hidden;
}

.card::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:5px;
  background:var(--yellow);
}

.card:hover{
  transform:translateY(-5px);
  box-shadow:0 14px 34px rgba(0,0,0,0.14);
}

.card img{
  width:100%;
  height:150px;
  object-fit:contain;
  background:#f5f7f8;
  border-radius:10px;
  padding:10px;
  margin-bottom:18px;
  box-sizing:border-box;
}

.card h2{
  font-size:21px;
  margin:8px 0 18px;
  color:var(--accent);
}

.card p{
  color:var(--muted);
}

.card ul{
  padding-left:18px;
  margin:0;
}

.card li{
  margin-bottom:7px;
  color:var(--ink);
}


/* ================= PARTENAIRES ================= */

.partners-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:24px;
  margin-top:25px;
}

.partner-card{
  background:#fff;
  padding:26px;
  border-radius:16px;
  border:1px solid var(--border);
  box-shadow:0 8px 24px rgba(0,0,0,0.08);
  text-align:center;
  position:relative;
  overflow:hidden;
  transition:0.25s;
}

.partner-card::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:5px;
  background:var(--yellow);
}

.partner-card:hover{
  transform:translateY(-5px);
  box-shadow:0 14px 34px rgba(0,0,0,0.14);
}

.partner-logo{
  height:100px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:18px;
  background:#f5f7f8;
  border-radius:12px;
  padding:12px;
}

.partner-logo img{
  max-width:100%;
  max-height:50px;
  object-fit:contain;
  display:block;
}

.partner-card h3{
  margin:0 0 10px;
  color:var(--accent);
  font-size:21px;
}

.partner-card p{
  margin:0;
  color:var(--muted);
  line-height:1.55;
  font-size:14px;
}


/* ================= CONTACT ================= */

.contact-box{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:28px;
  background:white;
  padding:28px;
  border-radius:16px;
  border:1px solid var(--border);
  box-shadow:0 8px 24px rgba(0,0,0,0.08);
}

.contact-card{
  background:#f8faf9;
  padding:24px;
  border-radius:14px;
  border:1px solid var(--border);
}

.contact-card h2{
  margin-top:0;
  color:var(--accent);
}

.contact-card a{
  color:var(--accent);
  font-weight:700;
  text-decoration:none;
}

.contact-card a:hover{
  text-decoration:underline;
}


/* ================= FORMULAIRE CONTACT ================= */

.contact-form{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.contact-form label{
  font-weight:700;
  color:var(--accent);
  font-size:14px;
}

.contact-form input,
.contact-form select,
.contact-form textarea{
  width:100%;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:8px;
  font-family:Arial, sans-serif;
  font-size:15px;
  color:var(--ink);
  background:#fff;
  box-sizing:border-box;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(11,47,91,0.12);
}

.contact-form textarea{
  resize:vertical;
}

.form-btn{
  margin-top:10px;
}

.form-btn:disabled{
  opacity:0.7;
  cursor:not-allowed;
  transform:none;
}

/* Champ anti-spam invisible */
.hp-field{
  position:absolute;
  left:-9999px;
  opacity:0;
}

/* Message de retour du formulaire */
.form-message{
  margin-top:14px;
  font-weight:700;
  font-size:15px;
}

.form-message.success{
  color:#166534;
}

.form-message.error{
  color:#b91c1c;
}


/* ================= FOOTER ================= */

.footer{
  background:var(--ink);
  color:white;
  padding:28px;
  border-top:4px solid var(--yellow);
}

.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.footer span{
  color:#cfd8df;
}

.small-note{
  font-size:14px;
  color:#cfd8df;
}

.small-note a{
  color:#fff;
  font-weight:700;
}


/* ================= RESPONSIVE ================= */

@media(max-width:900px){

  .container{
    padding:18px;
  }

  .header-inner{
    min-height:auto;
    flex-direction:column;
    gap:18px;
    padding-top:12px;
    padding-bottom:12px;
  }

  .logo img{
    height:58px;
  }

  .nav-zone{
    width:100%;
    justify-content:center;
    flex-wrap:wrap;
    border-radius:18px;
    box-sizing:border-box;
  }

  .menu{
    justify-content:center;
    flex-wrap:wrap;
  }

  .menu a{
    font-size:13px;
    padding:9px 12px;
  }

  .contact-link{
    padding:10px 18px;
  }

  .hero{
    padding:34px 0;
  }

  .hero-card{
    padding:32px 24px;
  }

  .hta-hero-card{
    min-height:auto;
  }

  .hero-bg-image{
    opacity:0.22;
  }

  .hero-card h1{
    font-size:27px;
  }

  .lead,
  .hero-card p{
    max-width:100%;
  }

  .contact-box{
    grid-template-columns:1fr;
  }

  .footer-inner{
    flex-direction:column;
    align-items:flex-start;
  }
}


/* =========================================================
   COMPACTAGE GLOBAL TYPE PAGE IRVE
   Réduit fortement le scroll vertical
   ========================================================= */


/* Sections plus compactes */

.section{
  padding:20px 0;
}


/* Hero plus compact */

.hero{
  padding:28px 0 18px;
}

.hero-card{
  min-height:250px;
  padding:30px 34px;
}


/* Réduction marges titres */

.section h2{
  margin:0 0 12px;
}


/* Texte intro plus compact */

.section-intro{
  margin-bottom:16px;
}


/* Grilles plus rapprochées */

.grid{
  gap:14px;
  margin-top:12px;
}


/* Cartes plus compactes */

.card{
  padding:16px;
}


/* Images cartes moins hautes */

.card img{
  height:120px;
  margin-bottom:12px;
}


/* Titres cartes */

.card h2{
  margin:4px 0 10px;
  font-size:19px;
}


/* Paragraphes cartes */

.card p{
  margin:0 0 8px;
  line-height:1.5;
}


/* Listes plus serrées */

.card ul{
  margin-top:8px;
}

.card li{
  margin-bottom:4px;
  line-height:1.4;
}


/* Expertise HTA :
   évite énorme bloc vertical */

#expertise p{
  margin:0 0 12px;
}

#expertise ul{
  margin-top:12px;
}


/* Maintenance :
   espace réduit avant boutons */

.buttons-row{
  margin-top:14px;
  gap:10px;
}


/* Contact :
   bloc moins haut */

.contact-box{
  padding:18px;
  gap:18px;
}

.contact-card{
  padding:18px;
}


/* Footer plus compact */

.footer{
  padding:22px;
}


/* ================= MOBILE ================= */

@media(max-width:900px){

  .hero-card{
    padding:24px 20px;
  }

  .card{
    padding:14px;
  }

  .section{
    padding:16px 0;
  }
}


/* =========================================================
   MENU DÉROULANT RÉALISATIONS / FICHES
   ========================================================= */

.tech-sheets-strip{
  margin-top:-10px;
  margin-bottom:10px;
}

.tech-sheets-inner{
  max-width:1180px;
  margin:auto;
  padding:0 24px;
  display:flex;
  justify-content:flex-end;
}

.tech-sheets-menu{
  position:relative;
  width:min(100%, 340px);
}

/* Bouton principal */

.tech-sheets-menu summary{
  list-style:none;
  cursor:pointer;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;

  padding:18px 22px;

  border-radius:999px;

  background:#ffffff;

  border:1px solid rgba(11,47,91,0.08);

  box-shadow:
    0 10px 30px rgba(0,0,0,0.08);

  color:var(--accent);

  font-weight:700;
}

/* Supprime la flèche native */

.tech-sheets-menu summary::-webkit-details-marker{
  display:none;
}

/* Menu déroulant */

.tech-sheets-list{
  position:absolute;

  top:calc(100% + 10px);
  right:0;

  width:100%;

  background:#ffffff;

  border-radius:18px;

  overflow:hidden;

  box-shadow:
    0 18px 45px rgba(0,0,0,0.12);

  border:1px solid rgba(11,47,91,0.08);

  z-index:20;
}

/* Liens */

.tech-sheets-list a{
  display:block;

  padding:16px 18px;

  text-decoration:none;

  border-bottom:1px solid #eef2f5;

  transition:background .18s ease;
}

.tech-sheets-list a:last-child{
  border-bottom:none;
}

.tech-sheets-list a:hover{
  background:#f5f8fb;
}

.tech-sheets-list strong{
  display:block;

  color:var(--accent);

  margin-bottom:4px;

  font-size:15px;
}

.tech-sheets-list small{
  color:var(--muted);

  line-height:1.45;
}