/* ==========================================================================
   camera-endoscopique.fr — composants propres au site
   Complète la feuille de style de la charte AGM TEC (style.css).
   ========================================================================== */

/* --------------------------------------------------------- barre de menu
   Huit entrées plus un bouton : les libellés ne doivent jamais se couper
   en deux lignes, on resserre plutôt l'espacement. */

.nav__item > a { white-space: nowrap; }

@media (min-width: 961px) and (max-width: 1440px) {
  .masthead__inner { gap: 1rem; }
  .nav__item > a { padding: .7rem .52rem; font-size: .88rem; }
  .masthead__cta { padding: .72rem 1.1rem; font-size: .86rem; }
}

/* ------------------------------------------------------------ texte long */

.chapo {
  font-size: 1.12rem;
  line-height: 1.68;
  color: var(--ink);
  padding-left: 1.1rem;
  border-left: 4px solid var(--primary);
  margin-bottom: 2.2rem;
}

.prose--etroit { max-width: 74ch; }

/* Bloc de définition en tête de page, centré et resserré. */
.bloc-intro {
  max-width: 74ch;
  margin: 0 auto clamp(2.4rem, 5vw, 3.6rem);
  text-align: center;
}
.bloc-intro h2::after { margin-inline: auto; }

.usage h3 a { color: inherit; }
.usage h3 a:hover { color: var(--primary); text-decoration: none; }

.prose figure { margin: 2rem 0; }
.prose figure img { margin: 0 auto .7rem; }
.prose figcaption {
  font-size: .87rem; color: var(--muted); text-align: center;
  line-height: 1.55; max-width: 62ch; margin-inline: auto;
}

/* --------------------------------------------- gabarit contenu + colonne */

.fiche {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: clamp(2rem, 4vw, 3.4rem);
  align-items: start;
}

.fiche__cote {
  position: sticky;
  top: 5.6rem;
  display: grid;
  gap: 1.4rem;
}

/* ------------------------------------------------------- blocs de côté */

.encart {
  background: linear-gradient(150deg, var(--dark) 0%, var(--dark-2) 100%);
  color: rgba(255, 255, 255, .8);
  border-radius: var(--radius-lg);
  padding: 1.7rem 1.6rem 1.8rem;
}
.encart__titre { color: #fff; font-size: 1.08rem; margin-bottom: .7rem; }
.encart p { font-size: .93rem; margin-bottom: 1rem; }
.encart__tel { margin-bottom: 1.1rem; }
.encart__tel a {
  font-family: var(--font); font-size: 1.32rem; font-weight: 700; color: #fff;
}
.encart__tel a:hover { color: var(--primary); text-decoration: none; }
.encart .btn { width: 100%; }

.sommaire {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.sommaire__titre { font-size: .96rem; margin-bottom: .9rem; }
.sommaire ul { list-style: none; margin: 0; padding: 0; }
.sommaire li { margin-bottom: .55rem; font-size: .93rem; }
.sommaire li:last-child { margin-bottom: 0; }
.sommaire a { color: var(--ink); }
.sommaire a:hover { color: var(--primary); }

/* ------------------------------------------------- caractéristiques produit */

.specs {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
}
.specs__titre { font-size: 1.02rem; margin-bottom: 1.1rem; }
.specs__titre::after { display: none; }
.specs dl { margin: 0; }
.specs__ligne {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .62rem 0; border-bottom: 1px solid var(--line-soft);
  font-size: .9rem;
}
.specs__ligne:last-child { border-bottom: 0; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-family: var(--font); font-weight: 600; color: var(--ink); text-align: right; }

/* ------------------------------------------------------- blocs deux colonnes */

.duo {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 3.6rem);
  align-items: center;
}
.duo--inverse .duo__media { order: -1; }
.duo__media img {
  width: 100%; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); background: var(--surface-2);
}

/* ------------------------------------------------------------- grilles */

.grille-usages {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}
.usage {
  background: #fff; border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius); padding: 1.4rem 1.5rem;
}
.usage h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.usage p { font-size: .93rem; color: var(--muted); margin: 0; }

.grille-atouts {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  counter-reset: atout;
}
.atout { position: relative; padding-top: 2.6rem; }
.atout::before {
  counter-increment: atout; content: counter(atout, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-family: var(--font); font-size: 1.5rem; font-weight: 800;
  color: var(--primary); opacity: .35;
}
.atout strong {
  display: block; font-family: var(--font); font-size: 1.04rem;
  color: var(--ink); margin-bottom: .45rem;
}
.atout p { font-size: .93rem; color: var(--muted); margin: 0; }

/* --------------------------------------------------- liste de la gamme */

.produit-ligne {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: center;
  padding-block: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.produit-ligne:last-child { border-bottom: 0; }
.produit-ligne:nth-child(even) .produit-ligne__media { order: 2; }

.produit-ligne__media {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.8rem;
}
.produit-ligne__media img { max-height: 320px; width: auto; margin-inline: auto; object-fit: contain; }
.produit-ligne__corps h2 { margin-bottom: .25rem; }
.produit-ligne__sous {
  font-family: var(--font); font-weight: 500; color: var(--muted);
  margin-bottom: 1rem;
}

/* ------------------------------------------------------ pages secteurs */

.secteur {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: center;
  padding-block: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.secteur:last-child { border-bottom: 0; }
.secteur--inverse .secteur__media { order: 2; }
.secteur__media img {
  width: 100%; border-radius: var(--radius-lg);
  background: var(--surface-2); box-shadow: var(--shadow);
  aspect-ratio: 4 / 3; object-fit: contain; padding: 1rem;
}
.secteur__diametre {
  font-size: .9rem; color: var(--muted);
  background: var(--surface-2); border-radius: 999px;
  display: inline-block; padding: .35rem .95rem; margin-bottom: 1rem;
}

/* --------------------------------------------------------------- article */

.article-tete { margin-bottom: 2.4rem; }
.article-tete__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
  font-size: .86rem; color: var(--muted); margin-bottom: 1rem;
}
.article-tete__meta .card__tag { margin: 0; }
.article-tete h1 { font-size: clamp(1.65rem, 3.2vw, 2.4rem); }
.article-tete__chapo {
  font-size: 1.06rem; color: var(--muted); margin: 0;
}

.article-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2.4rem 0 0; }
.etiquette {
  font-size: .82rem; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: .3rem .8rem;
}
.article-pied { margin-top: 2rem; }

.galerie {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}
.galerie img { margin: 0; width: 100%; }

/* ------------------------------------------------------------ formulaire */

.formulaire__duo {
  display: grid; gap: 0 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
}
.champ { display: block; margin-bottom: 1.2rem; }
.champ label {
  display: block; font-family: var(--font); font-weight: 500;
  font-size: .92rem; color: var(--ink); margin-bottom: .38rem;
}
.champ input, .champ select, .champ textarea {
  width: 100%; padding: .78rem .95rem;
  font: inherit; font-size: .97rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.champ textarea { resize: vertical; min-height: 9rem; }
.champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: 0; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(236, 108, 43, .16);
}
.champ__erreur { display: block; margin-top: .35rem; font-size: .86rem; color: #c0392b; }
.champ--piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.formulaire__mention { font-size: .86rem; color: var(--muted); }

.alerte { border-radius: var(--radius); padding: 1.3rem 1.5rem; margin-bottom: 1.8rem; }
.alerte p:last-child { margin-bottom: 0; }
.alerte--ok { background: var(--mint); border: 1px solid rgba(20, 176, 144, .35); }
.alerte--ok h2 { color: var(--accent); margin-bottom: .5rem; }
.alerte--ok h2::after { display: none; }
.alerte--ko { background: #fdecea; border: 1px solid rgba(192, 57, 43, .3); color: #8e2a20; }

.coordonnees {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem 1.7rem;
}
.coordonnees__titre { font-size: 1.05rem; margin-bottom: 1rem; }
.coordonnees__titre::after { display: none; }
.coordonnees h3 { font-size: .96rem; margin: 1.4rem 0 .5rem; }
.coordonnees__tel { margin-bottom: .3rem; }
.coordonnees__tel a { font-family: var(--font); font-size: 1.42rem; font-weight: 700; }
.coordonnees address { font-style: normal; line-height: 1.7; }
.coordonnees__note {
  font-size: .86rem; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1.2rem;
}

/* ------------------------------------------------------------ plan du site */

.plan {
  display: grid; gap: 2.4rem;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}
.plan__bloc--large { grid-column: 1 / -1; }
.plan h2 { font-size: 1.24rem; margin-bottom: 1rem; }
.plan ul { list-style: none; margin: 0; padding: 0; }
.plan li { margin-bottom: .7rem; line-height: 1.5; }
.plan a { color: var(--ink); font-family: var(--font); font-weight: 500; font-size: .96rem; }
.plan a:hover { color: var(--primary); }
.plan__note { display: block; font-size: .84rem; color: var(--muted); }
.plan__articles { columns: 2; column-gap: 2.4rem; }
.plan__articles li { break-inside: avoid; }

/* --------------------------------------------------------------- adaptatif */

@media (max-width: 1000px) {
  .fiche { grid-template-columns: 1fr; }
  .fiche__cote { position: static; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
}

@media (max-width: 860px) {
  .duo, .produit-ligne, .secteur { grid-template-columns: 1fr; }
  .duo--inverse .duo__media,
  .produit-ligne:nth-child(even) .produit-ligne__media,
  .secteur--inverse .secteur__media { order: -1; }
  .plan__articles { columns: 1; }
}

@media (max-width: 520px) {
  .chapo { padding-left: .9rem; font-size: 1.05rem; }
  .produit-ligne__media { padding: 1.1rem; }
  .specs__ligne { flex-direction: column; gap: .15rem; }
  .specs dd { text-align: left; }
}
