/*
Theme Name: Watt & Yacine
Theme URI: https://watt-yacine.fr
Author: Yacine El Aitor
Author URI: https://watt-yacine.fr
Description: Thème sur-mesure pour Watt & Yacine — vidéos IA sur l'énergie, centralisation de contenu, support et partenariats.
Version: 2.0
Requires at least: 5.9
Requires PHP: 7.4
License: Unlicensed - Usage privé
Text Domain: watt-yacine
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

/* ---------- Variables ---------- */

:root {
  --green-dark: #0d3b2a;
  --green-mid: #2f9e5f;
  --green-pale: #eaf6ef;
  --gold: #f4c430;
  --gold-dark: #d9a919;
  --ink: #16241f;
  --paper: #ffffff;
  --paper-warm: #f4f8f6;
  --gray: #5c6b64;
  --gray-light: #94a39c;
  --font: 'Poppins', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
textarea {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Formulaire SRFM ---------- */

.srfm-form-container .srfm-form .srfm-block .srfm-input-common {
  width: 100% !important;
  margin-bottom: 12px !important;
  padding: 10px 14px !important;
  background-color: #ffffff !important;
  border: 2px solid var(--green-pale) !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  font-family: var(--font) !important;
}

.srfm-form-container .srfm-form .srfm-block .srfm-input-common:focus {
  outline: none !important;
  border-color: var(--green-mid) !important;
}

.srfm-block .srfm-block-label {
  color: var(--green-dark) !important;
  font-weight: 600 !important;
}

button#srfm-submit-btn {
  padding: 12px 24px !important;
  background-color: var(--gold) !important;
  color: var(--green-dark) !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  font-weight: 700 !important;
}

button#srfm-submit-btn:hover {
  background-color: var(--gold-dark) !important;
}

/* Remplace visuellement le texte "Submit" par "Envoyer" (le mot d'origine
   reste dans le code, seul l'affichage change) */
button#srfm-submit-btn {
  font-size: 0 !important;
  line-height: 1 !important;
  height: auto !important;
  min-height: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

button#srfm-submit-btn::after {
  content: "Envoyer";
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  color: var(--green-dark);
}

/* ---------- Navigation ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 18px 0;
  background: var(--paper);
  border-bottom: 1px solid rgba(13, 59, 42, 0.08);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-logo {
  display: flex;
  align-items: center;
  color: var(--green-dark);
  font-size: 25px;
  font-weight: 800;
}

.nav-logo-img {
  display: block;
  width: 50px;
  height: 50px;
  margin-right: 12px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-logo-text {
  white-space: nowrap;
}

.nav-logo .brand-y {
  color: var(--green-mid);
}

.nav-links {
  display: flex;
  gap: 28px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.nav-links a {
  position: relative;
  padding-bottom: 4px;
  margin-left: 28px;
}

.nav-links a:first-child {
  margin-left: 0;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--green-mid);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.nav-social {
  display: flex;
  gap: 8px;
}

.nav-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--green-pale);
  color: var(--green-dark);
  border-radius: 50%;
}

.nav-social a:hover {
  background: var(--gold);
  color: var(--green-dark);
}

.nav-social svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* Bouton menu mobile (masqué sur desktop, activé en media query) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--green-dark);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 90px 0 80px;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    var(--green-pale) 0%,
    var(--paper) 100%
  );
}

.hero .container {
  display: flex;
  align-items: flex-start;
  gap: 60px;
  flex-wrap: wrap;
}

.hero .hero-text {
  flex: 1.1;
  min-width: 300px;
}

/* --- CORRIGÉ : le bloc média aligne son cadre en haut, avec la photo bien intégrée --- */
.hero .hero-media {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex: 0.9;
  min-width: 280px;
  margin-top: 6px;
}

.eyebrow-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--green-mid);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.eyebrow-mark .dot {
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
}

.hero h1 {
  max-width: 540px;
  margin: 0;
  color: var(--green-dark);
  font-size: 44px;
  line-height: 1.15;
  font-weight: 800;
}

.hero h1 .accent {
  color: var(--green-mid);
}

.hero p.lead {
  max-width: 460px;
  margin-top: 22px;
  color: #445048;
  font-size: 17.5px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 34px;
}

/* --- CORRIGÉ : le cadre a maintenant une vraie géométrie --- */
.hero-media-frame {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 20px 40px -20px rgba(13, 59, 42, 0.25);
}

.hero-media-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-media-frame iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: 2px solid transparent;
  border-radius: 50px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.btn-gold {
  background: var(--gold);
  color: var(--green-dark);
}

.btn-gold:hover {
  background: var(--gold-dark);
}

.btn-ghost {
  border-color: var(--green-dark);
  color: var(--green-dark);
}

.btn-ghost:hover {
  background: var(--green-dark);
  color: #fff;
}

/* ---------- Sections ---------- */

section {
  padding: 84px 0;
}

.section-label {
  margin-bottom: 10px;
  color: var(--green-mid);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

h2.section-title {
  max-width: 640px;
  margin-top: 0;
  color: var(--green-dark);
  font-size: 32px;
  font-weight: 800;
}

p.section-sub {
  max-width: 560px;
  margin-top: 14px;
  color: var(--gray);
  font-size: 16px;
}

/* ---------- Piliers ---------- */

.pillars {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 48px;
}

.pillar {
  flex: 1 1 260px;
  min-width: 260px;
  padding: 32px 28px;
  background: var(--paper-warm);
  border-radius: 16px;
}

.pillar .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  background: var(--gold);
  color: var(--green-dark);
  border-radius: 50%;
  font-size: 15px;
  font-weight: 800;
}

.pillar h3 {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 20px;
  font-weight: 700;
}

.pillar p {
  color: var(--gray);
  font-size: 15px;
}

/* ---------- Vidéos ---------- */

.video-grid {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 48px;
}

.video-card {
  display: block;
  flex: 1 1 300px;
  min-width: 260px;
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--green-dark);
  border-radius: 14px;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-badge span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(244, 196, 48, 0.95);
  color: var(--green-dark);
  border-radius: 50%;
  font-size: 16px;
}

.video-card h3 {
  margin-top: 16px;
  color: var(--green-dark);
  font-size: 18px;
  font-weight: 700;
}

.video-card .tag {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 12px;
  background: var(--green-pale);
  color: var(--green-mid);
  border-radius: 50px;
  font-size: 12.5px;
  font-weight: 700;
}

/* ---------- Bandeau CTA ---------- */

.band {
  padding: 68px 0;
  background: var(--green-dark);
  color: #fff;
  text-align: center;
}

.band h2 {
  margin: 0 0 14px;
  font-size: 30px;
  font-weight: 800;
}

.band p {
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.8);
}

.band-ctas {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.band .btn-ghost {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.band .btn-ghost:hover {
  background: #fff;
  color: var(--green-dark);
}

/* ---------- À propos ---------- */

.about-grid {
  display: flex;
  align-items: flex-start;
  gap: 64px;
  flex-wrap: nowrap;
}

.about-grid > .about-photo {
  flex: 0 0 340px;
  width: 340px;
  max-width: 340px;
}

.about-grid > .about-text {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 4px;
}

.about-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--green-pale);
  border: 1px solid var(--green-pale);
  border-radius: 20px;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.about-text h2 {
  margin-top: 0;
  margin-bottom: 4px;
}

.about-role {
  margin-bottom: 22px;
  color: var(--green-mid);
  font-size: 16px;
  font-weight: 700;
}

.about-text p {
  max-width: 560px;
  margin: 0 0 16px;
  color: var(--gray);
  font-size: 16px;
}

.about-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--green-mid);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--green-pale);
  padding-bottom: 2px;
}

.about-linkedin:hover {
  color: var(--green-dark);
  border-bottom-color: var(--green-mid);
}

/* ---------- Statistiques ---------- */

.stats-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 48px;
}

.stat-item {
  flex: 1 1 180px;
  min-width: 180px;
  padding: 30px 26px;
  background: var(--paper-warm);
  border-radius: 16px;
  text-align: center;
}

.stat-item .stat-num {
  color: var(--green-dark);
  font-size: 32px;
  font-weight: 800;
}

.stat-item .stat-label {
  margin-top: 6px;
  color: var(--gray);
  font-size: 13.5px;
}

/* ---------- Plateformes ---------- */

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

.platform-card {
  min-width: 0;
  padding: 26px;
  background: var(--paper-warm);
  border-radius: 16px;
}

.platform-card .p-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  background: var(--green-pale);
  color: var(--green-dark);
  border-radius: 50%;
}

.platform-card .p-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Correctif optique : le glyphe X est géométriquement centré dans son SVG,
   mais les diagonales donnent une impression visuelle de décalage.
   Nécessite d'ajouter class="p-icon icon-x" sur la div de l'icône X en PHP. */
.icon-x svg {
  transform: translateX(-0.75px);
}

.platform-card h4 {
  margin: 0 0 6px;
  color: var(--green-dark);
  font-size: 18px;
  font-weight: 700;
}

.platform-card p {
  color: var(--gray);
  font-size: 14px;
}

.proof-photo {
  margin-top: 56px;
  overflow: hidden;
  border-radius: 20px;
}

.proof-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.offer-list {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.offer-item {
  flex: 1 1 260px;
  min-width: 240px;
}

.offer-item .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  background: var(--gold);
  color: var(--green-dark);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.offer-item h3 {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  min-height: 2.6em; /* réserve l'espace de 2 lignes, même si le titre tient sur 1 seule */
}

.offer-item p {
  color: var(--gray);
  font-size: 15px;
}

/* ---------- Contact ---------- */

.contact-narrow {
  max-width: 760px;
  margin: 0 auto;
}

.contact-email-line {
  margin: 18px 0 0;
  color: var(--gray);
  font-size: 16px;
}

.contact-email-line a {
  color: var(--green-mid);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--green-pale);
  padding-bottom: 1px;
}

.contact-email-line a:hover {
  color: var(--green-dark);
  border-bottom-color: var(--green-mid);
}

.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact-grid > .contact-info {
  display: flex;
  align-items: flex-start;
  gap: 56px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(13, 59, 42, 0.08);
}

.contact-grid > .contact-form-wrap {
  width: 100%;
  max-width: 640px;
}

.contact-info .item {
  margin-bottom: 0;
}

.contact-info .label {
  margin-bottom: 6px;
  color: var(--green-mid);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.contact-info .value {
  color: var(--green-dark);
  font-size: 17px;
  font-weight: 600;
}

.social-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.social-row a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--green-pale);
  color: var(--green-dark);
  border-radius: 50%;
}

.social-row a:hover {
  background: var(--gold);
}

.social-row svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.contact-visual {
  margin-top: 32px;
  overflow: hidden;
  border-radius: 20px;
}

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--gray);
  font-size: 13.5px;
  font-weight: 600;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--paper-warm);
  border: 2px solid var(--green-pale);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 15px;
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--green-mid);
}

.shortcode-zone {
  margin-top: 24px;
}

/* ---------- Footer ---------- */

footer {
  padding: 44px 0;
  background: var(--green-dark);
  color: rgba(255, 255, 255, 0.75);
  font-size: 13.5px;
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

footer .foot-logo {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

footer .foot-social {
  display: flex;
  gap: 10px;
}

footer .foot-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--green-dark);
  border-radius: 50%;
}

footer .foot-social a:hover {
  background: var(--gold);
  color: var(--green-dark);
}

footer .foot-social svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* ---------- Tablette ---------- */

@media (max-width: 860px) {
  .container {
    padding-right: 24px;
    padding-left: 24px;
  }

  .hero .container,
  .about-grid,
  .contact-grid {
    flex-direction: column;
  }

  .pillars,
  .video-grid,
  .stats-row {
    flex-direction: column;
  }

  .video-grid {
    gap: 16px;
  }

  .pillar,
  .stat-item {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  /* Vidéos : layout horizontal compact (miniature à gauche, texte à droite)
     pour voir plusieurs vidéos par écran au lieu d'une seule */
  .video-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--green-pale);
  }

  .video-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .video-card .video-thumb {
    flex: 0 0 108px;
    width: 108px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
  }

  .video-card .play-badge span {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }

  .video-card .video-info {
    flex: 1 1 auto;
    min-width: 0;
  }

  .video-card h3 {
    margin-top: 0;
    font-size: 14.5px;
    line-height: 1.3;
  }

  .video-card .tag {
    margin-top: 6px;
    padding: 3px 10px;
    font-size: 11px;
  }

  /* Plateformes et formats : grille 2 colonnes plutôt qu'un empilement vertical,
     pour réduire la hauteur de scroll sur mobile */
  .platform-row,
  .offer-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .platform-card,
  .offer-item {
    width: 100%;
    min-width: 0;
  }

  .platform-card {
    padding: 18px;
  }

  .about-grid {
    gap: 36px;
    flex-wrap: nowrap;
  }

  .about-grid > .about-photo {
    width: 300px;
    max-width: 100%;
    margin: 0 auto;
    flex: 0 0 auto;
  }

  .about-grid > .about-text {
    width: 100%;
  }

  .contact-grid > .contact-info,
  .contact-grid > .contact-form-wrap,
  .hero .hero-text,
  .hero .hero-media {
    width: 100%;
    flex: 1 1 auto;
  }

  .nav-toggle {
    display: flex;
  }

  /* Zones tactiles plus confortables sur mobile (icône agrandie en même
     proportion que le cercle, pour ne pas paraître perdue dedans) */
  .nav-social a {
    width: 40px;
    height: 40px;
  }

  .nav-social svg {
    width: 18px;
    height: 18px;
  }

  footer .foot-social a {
    width: 40px;
    height: 40px;
  }

  footer .foot-social svg {
    width: 18px;
    height: 18px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 78px;
    right: 0;
    bottom: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    padding: 12px 24px 40px;
    background: var(--paper);
    overflow-y: auto;
    z-index: 60;
  }

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

  .nav-links a {
    margin-left: 0;
    padding: 16px 4px;
    border-bottom: 1px solid rgba(13, 59, 42, 0.08);
    font-size: 17px;
  }

  .nav-links a.active::after {
    display: none;
  }

  .hero h1 {
    font-size: 32px;
  }

  .nav-logo-img {
    width: 42px;
    height: 42px;
  }
}

/* ---------- Téléphone ---------- */

@media (max-width: 480px) {
  .container {
    padding-right: 18px;
    padding-left: 18px;
  }

  section {
    padding: 60px 0;
  }

  .hero {
    padding: 60px 0;
  }

  .hero-media-frame {
    max-width: 100%;
  }

  .about-grid > .about-photo {
    width: 250px;
  }

  .about-text p {
    font-size: 15px;
  }

  h2.section-title {
    font-size: 27px;
  }

  .band {
    padding: 54px 0;
  }

  .band h2 {
    font-size: 25px;
  }

  .hero-ctas,
  .band-ctas {
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}