/*
Theme Name: Nectra
Theme URI: https://nectra.fr
Author: Audouin Réalisations
Description: Thème sur mesure pour NECTRA — équipements automatisés pour couvoirs et laboratoires.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: Proprietary
Text Domain: nectra
*/

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary:    #1a3a5c;
  --color-accent:     #0077b6;
  --color-accent-light: #48cae4;
  --color-white:      #ffffff;
  --color-light:      #f4f7fa;
  --color-border:     #dde3ea;
  --color-text:       #1e2a35;
  --color-muted:      #5a6a78;

  --font-base:        'Inter', system-ui, -apple-system, sans-serif;
  --font-heading:     'Inter', system-ui, -apple-system, sans-serif;

  --radius:           6px;
  --radius-lg:        12px;
  --shadow-sm:        0 1px 4px rgba(0,0,0,.08);
  --shadow-md:        0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:        0 8px 32px rgba(0,0,0,.12);

  --container:        1160px;
  --gap:              clamp(1.5rem, 4vw, 3rem);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color .2s;
}

a:hover { color: var(--color-primary); }

ul, ol { list-style: none; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
}

h1 { font-size: clamp(2rem,   5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.15rem,2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.section {
  padding-block: clamp(3rem, 8vw, 6rem);
}

.section--light { background: var(--color-light); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: var(--gap);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--gap);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--gap);
}

.text-center { text-align: center; }
.text-muted   { color: var(--color-muted); }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
  text-decoration: none;
  line-height: 1;
}

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

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-primary);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 72px;
}

/* Logo WordPress custom */
.custom-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.custom-logo {
  height: 68px;
  width: auto;
  display: block;
}

/* Logo fallback texte */
.site-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  height: 48px;
  width: auto;
}

.site-logo__name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -.02em;
  line-height: 1;
}

.site-logo__tagline {
  font-size: .65rem;
  color: var(--color-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
  margin-top: 2px;
}

/* Nav */
.nav-primary {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.nav-primary a {
  padding: .5rem .85rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-text);
  transition: background .2s, color .2s;
}

.nav-primary a:hover,
.nav-primary .current-menu-item > a {
  background: var(--color-light);
  color: var(--color-accent);
}

/* Langue */
.header-lang {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.header-lang a {
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-muted);
  padding: .25rem .5rem;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  transition: all .2s;
}

.header-lang a:hover,
.header-lang a.active {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

/* Burger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all .25s;
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .nav-primary {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    gap: .25rem;
  }

  .nav-primary.is-open { display: flex; }

  .nav-primary a {
    padding: .75rem 1rem;
    font-size: 1rem;
  }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  min-height: clamp(480px, 60vh, 680px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary) 0%, #0a2540 60%, #0d3b6e 100%);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .18;
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-block: 4rem;
  max-width: 680px;
}

.hero__eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: 1.25rem;
}

.hero__title {
  color: var(--color-white);
  margin-bottom: 1.25rem;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}

.hero__text {
  color: rgba(255,255,255,.8);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 560px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ============================================================
   SECTION INTRO (texte accrocheur)
   ============================================================ */

.intro-wrap {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  max-width: 860px;
  margin-inline: auto;
}

.intro-image {
  flex-shrink: 0;
}

.intro-image img {
  width: 120px;
  height: auto;
}

.intro {
  border-left: 4px solid var(--color-accent);
  padding-left: 1.5rem;
}

.intro p {
  font-size: 1.15rem;
  color: var(--color-muted);
  line-height: 1.8;
}

@media (max-width: 560px) {
  .intro-wrap {
    flex-direction: column;
    gap: 1.5rem;
  }

  .intro {
    border-left: none;
    border-top: 4px solid var(--color-accent);
    padding-left: 0;
    padding-top: 1.25rem;
  }
}

/* ============================================================
   CARDS (produits / services)
   ============================================================ */

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.card__body {
  padding: 1.5rem;
}

.card__tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-accent);
  background: rgba(0,119,182,.08);
  padding: .25rem .6rem;
  border-radius: 4px;
  margin-bottom: .75rem;
}

.card__title {
  font-size: 1.15rem;
  margin-bottom: .5rem;
}

.card__text {
  font-size: .9rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

.card__link {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.card__link::after { content: '→'; }
.card__link:hover { color: var(--color-primary); }

/* ============================================================
   PRESTATIONS
   ============================================================ */

.prestations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.prestation-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s;
}

.prestation-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.prestation-card__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: transform .35s;
}

.prestation-card:hover .prestation-card__img {
  transform: scale(1.03);
}

/* Dégradés de couleur distincts par carte (à remplacer par des photos) */
.prestation-card__img--1 { background: linear-gradient(135deg, #0d3b6e, #0077b6); }
.prestation-card__img--2 { background: linear-gradient(135deg, #0077b6, #48cae4); }
.prestation-card__img--3 { background: linear-gradient(135deg, #023e8a, #0096c7); }
.prestation-card__img--4 { background: linear-gradient(135deg, #1a3a5c, #0077b6); }
.prestation-card__img--5 { background: linear-gradient(135deg, #0096c7, #90e0ef); }
.prestation-card__img--6 { background: linear-gradient(135deg, #03045e, #0077b6); }
.prestation-card__img--7 { background: linear-gradient(135deg, #0077b6, #023e8a); }
.prestation-card__img--8 { background: linear-gradient(135deg, #48cae4, #0096c7); }
.prestation-card__img--9 { background: linear-gradient(135deg, #1a3a5c, #48cae4); }

.prestation-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.prestation-card__body h3 {
  font-size: 1rem;
  margin-bottom: .5rem;
  color: var(--color-primary);
}

.prestation-card__body p {
  font-size: .875rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 900px) {
  .prestations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .prestations-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FEATURE ICONS (avantages)
   ============================================================ */

.feature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.feature__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: rgba(0,119,182,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature__icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature__title {
  font-size: 1.05rem;
  margin-bottom: .35rem;
}

.feature__text {
  font-size: .9rem;
  color: var(--color-muted);
  margin: 0;
}

/* ============================================================
   SECTION TITRE
   ============================================================ */

.section-header {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-header .section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: .75rem;
}

.section-header h2 { margin-bottom: .75rem; }

.section-header p {
  font-size: 1.05rem;
  color: var(--color-muted);
  max-width: 600px;
}

.section-header.text-center p { margin-inline: auto; }

/* ============================================================
   VIDÉO RESPONSIVE
   ============================================================ */

.video-wrapper {
  position: relative;
  max-width: 860px;
  margin-inline: auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ============================================================
   BANDEAU CHIFFRES
   ============================================================ */

.stats {
  background: var(--color-primary);
  color: var(--color-white);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat__number {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--color-accent-light);
  line-height: 1;
  margin-bottom: .4rem;
}

.stat__label {
  font-size: .85rem;
  opacity: .8;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ============================================================
   MADE IN FRANCE BADGE
   ============================================================ */

.badge-mif {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.25rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
}

.badge-mif img {
  height: 32px;
}

.badge-mif span {
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-primary);
}

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

.site-footer {
  background: #0a1929;
  color: rgba(255,255,255,.7);
  padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.6fr 1.2fr 1.2fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* Marque */
.footer-logo {
  height: 80px;
  width: auto;
}

/* Titres colonnes */
.footer-contact h4,
.footer-address h4 {
  color: var(--color-white);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1.1rem;
}

/* Liens contact */
.footer-contact ul {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.footer-contact ul li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .875rem;
  line-height: 1.4;
}

.footer-contact ul li svg {
  width: 15px;
  height: 15px;
  stroke: var(--color-accent-light);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-contact a {
  color: rgba(255,255,255,.7);
  transition: color .2s;
}

.footer-contact a:hover {
  color: var(--color-accent-light);
}

/* Adresse */
.footer-address address {
  font-style: normal;
  font-size: .875rem;
  line-height: 1.8;
  color: rgba(255,255,255,.65);
}

.footer-siret {
  display: inline-block;
  margin-top: .4rem;
  font-size: .775rem;
  color: rgba(255,255,255,.4);
}

/* Barre basse */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: rgba(255,255,255,.35);
  text-align: center;
}

@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ============================================================
   CONTENU ÉDITORIAL (pages / articles)
   ============================================================ */

.entry-content {
  max-width: 760px;
  margin-inline: auto;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 2rem;
  margin-bottom: .75rem;
}

.entry-content ul,
.entry-content ol {
  list-style: revert;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.entry-content ul li,
.entry-content ol li {
  margin-bottom: .35rem;
}

.entry-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding-left: 1.25rem;
  color: var(--color-muted);
  font-style: italic;
  margin: 1.5rem 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: .9rem;
}

.entry-content th,
.entry-content td {
  padding: .6rem 1rem;
  border: 1px solid var(--color-border);
  text-align: left;
}

.entry-content th {
  background: var(--color-light);
  font-weight: 600;
}

/* ============================================================
   PAGE 404
   ============================================================ */

.not-found {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}

.not-found__code {
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 800;
  color: var(--color-border);
  line-height: 1;
  margin-bottom: .5rem;
}

/* ============================================================
   WORDPRESS ALIGNEMENTS
   ============================================================ */

.alignleft  { float: left;  margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left:  1.5rem; margin-bottom: 1rem; }
.aligncenter { margin-inline: auto; display: block; }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .8rem; color: var(--color-muted); margin-top: .35rem; }

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

@media (max-width: 640px) {
  .hero__actions { flex-direction: column; }
  .btn { justify-content: center; }
}
