/*
 * Perfect Go Theme — About CSS
 * Chargé UNIQUEMENT sur la page avec le template "Page À propos".
 */

/* ─── Hero texte seul (sans photo) ──────────────────────────────────────── */
.about-hero--text-only { padding: 80px var(--pad-h); border-bottom: var(--border); }
.about-hero--text-only .about-hero__h1 { font-family: var(--font-title); font-weight: 800; font-size: 52px; line-height: 1.05; letter-spacing: -0.04em; color: var(--noir); margin: 0 0 32px; }
.about-hero--text-only .about-hero__lead { font-size: 17px; color: #3d3d3a; line-height: 1.75; max-width: 780px; margin: 0; }

/* ─── Hero 2 colonnes (avec photo) ──────────────────────────────────────── */
.about-hero { display: grid; grid-template-columns: 1fr 1fr; min-height: 480px; border-bottom: var(--border); }
.about-hero__photo { background: var(--beige); border-right: var(--border); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 20px; padding: 60px; }
.about-hero__avatar { width: 200px; height: 200px; border: var(--border); background: #E8E2D5; display: flex; align-items: center; justify-content: center; }
.about-hero__name { font-family: var(--font-title); font-weight: 800; font-size: 18px; color: var(--noir); text-align: center; margin-top: 4px; }
.about-hero__role { font-size: 13px; color: #6B6B6B; text-align: center; margin-top: 4px; }
.about-hero__content { padding: 60px; display: flex; flex-direction: column; justify-content: center; }
.about-hero__content .about-hero__h1 { font-family: var(--font-title); font-weight: 800; font-size: 44px; line-height: 1.05; letter-spacing: -0.04em; color: var(--noir); margin: 0 0 28px; }
.about-hero__content .about-hero__lead { font-size: 16px; color: #3d3d3a; line-height: 1.75; margin: 0; }

/* ─── Statistiques (3 colonnes dans le hero) ────────────────────────────── */
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: var(--border); margin-bottom: 32px; }
.about-stat { padding: 20px 16px; text-align: center; border-right: var(--border); }
.about-stat:last-child { border-right: none; }
.about-stat__value { font-family: var(--font-title); font-weight: 800; font-size: 28px; color: var(--orange); }
.about-stat__label { font-size: 12px; color: #6B6B6B; margin-top: 4px; }

/* ─── Section narrative (qui je suis) ───────────────────────────────────── */
.about-narrative { padding: 80px var(--pad-h); border-bottom: var(--border); }
.about-narrative__inner { max-width: 800px; margin: 0 auto; }
.about-narrative p { font-size: 17px; color: #3d3d3a; line-height: 1.8; margin: 0 0 20px; }
.about-narrative p:last-child { margin-bottom: 0; }

/* ─── Compétences — grille 3 colonnes ───────────────────────────────────── */
.skills-section { padding: 80px var(--pad-h); background: var(--beige); border-bottom: var(--border); }
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-card { background: var(--blanc); border: var(--border); padding: 28px 24px; }
.skill-card--dark { background: var(--noir); border-color: var(--noir); }
.skill-card__tag { font-size: 11px; color: var(--orange); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; }
.skill-card__title { font-family: var(--font-title); font-weight: 800; font-size: 20px; color: var(--noir); margin-bottom: 12px; }
.skill-card--dark .skill-card__title { color: var(--blanc); }
.skill-card__desc { font-size: 14px; color: #555; line-height: 1.65; margin: 0; }
.skill-card--dark .skill-card__desc { color: #B0B0B0; }

/* ─── Timeline / Parcours ────────────────────────────────────────────────── */
.timeline-section { padding: 80px var(--pad-h); border-bottom: var(--border); }
.timeline { position: relative; padding-left: 32px; border-left: var(--border); max-width: 700px; }
.timeline-item { margin-bottom: 40px; position: relative; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item__dot { position: absolute; left: -41px; top: 4px; width: 16px; height: 16px; background: var(--orange); border: var(--border); flex-shrink: 0; }
.timeline-item__dot--dark { background: var(--noir); }
.timeline-item__year { font-size: 11px; color: var(--orange); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
.timeline-item__title { font-family: var(--font-title); font-weight: 800; font-size: 18px; color: var(--noir); margin-bottom: 8px; }
.timeline-item__desc { font-size: 15px; color: #555; line-height: 1.65; margin: 0; }

/* ─── Bande certifications ───────────────────────────────────────────────── */
.certs-band { padding: 40px var(--pad-h); border-bottom: var(--border); background: var(--beige); }
.certs-band__inner { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.certs-band__label { font-size: 11px; color: #6B6B6B; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.certs-band__badges { display: flex; gap: 12px; flex-wrap: wrap; }
.cert-badge { background: var(--blanc); border: 1.5px solid #E0E0E0; padding: 10px 16px; font-size: 12px; font-weight: 600; color: #3d3d3a; }

/* ─── Section newsletter ─────────────────────────────────────────────────── */
.newsletter-about { padding: 80px var(--pad-h); background: var(--noir); }
.newsletter-about__inner { max-width: 600px; margin: 0 auto; text-align: center; }
.newsletter-about .section-label { color: var(--orange); }
.newsletter-about__title { font-family: var(--font-title); font-weight: 800; font-size: 36px; letter-spacing: -0.03em; color: var(--blanc); margin: 0 0 16px; }
.newsletter-about__desc { font-size: 16px; color: #B0B0B0; line-height: 1.7; margin: 0 0 36px; }
.newsletter-about__form { display: flex; border: 2px solid var(--blanc); max-width: 440px; margin: 0 auto; }
.newsletter-about__input { flex: 1; padding: 14px 20px; font-family: var(--font-body); font-size: 15px; background: transparent; border: none; color: var(--blanc); outline: none; }
.newsletter-about__input::placeholder { color: #666; }
.newsletter-about__btn { background: var(--orange); color: var(--blanc) !important; padding: 14px 24px; font-family: var(--font-title); font-weight: 800; font-size: 13px; letter-spacing: 0.06em; cursor: pointer; white-space: nowrap; border: none; }

/* ─── CF7 dans la newsletter — adapté à la structure générée automatiquement ─ */
.newsletter-about .wpcf7 { max-width: 440px; margin: 0 auto; }

/* Le <form> CF7 devient le conteneur flex avec la bordure blanche */
.newsletter-about .wpcf7-form {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: stretch;
  border: 2px solid var(--blanc) !important;
  margin: 0; padding: 0;
}

/* Masquer les éléments parasites qui cassent le layout */
.newsletter-about .hidden-fields-container { display: none !important; }
.newsletter-about .wpcf7-spinner { display: none !important; }
.newsletter-about .cf7-cf-turnstile { display: none !important; }
.newsletter-about .akismet-fields-container { display: none !important; }

/* Le <p> qui contient le champ email s'étire */
.newsletter-about .wpcf7-form > p {
  margin: 0 !important; flex: 1; display: flex; min-width: 0;
}

/* Le label et le span wrap s'étendent aussi */
.newsletter-about .wpcf7-form label { display: contents; }
.newsletter-about .wpcf7-form label br { display: none; }
.newsletter-about .wpcf7-form-control-wrap { flex: 1; display: flex; min-width: 0; }

/* Input email */
.newsletter-about .wpcf7 .wpcf7-form-control.wpcf7-email {
  flex: 1 !important; width: 100% !important; max-width: none !important;
  padding: 14px 20px !important; font-family: var(--font-body) !important;
  font-size: 15px !important; background: transparent !important;
  border: none !important; color: var(--blanc) !important;
  outline: none !important; border-radius: 0 !important; box-shadow: none !important;
}
.newsletter-about .wpcf7 .wpcf7-email::placeholder { color: #666 !important; }

/* Bouton submit */
.newsletter-about .wpcf7-submit,
.newsletter-about input[type="submit"].wpcf7-submit {
  flex-shrink: 0;
  background: var(--orange) !important; color: var(--blanc) !important;
  padding: 14px 24px !important; font-family: var(--font-title) !important;
  font-weight: 800 !important; font-size: 13px !important;
  letter-spacing: .06em !important; white-space: nowrap !important;
  border: none !important; border-radius: 0 !important;
  min-height: 0 !important; cursor: pointer !important;
  align-self: stretch;
}
.newsletter-about .wpcf7-submit:hover,
.newsletter-about input[type="submit"].wpcf7-submit:hover { background: #a33509 !important; }

/* Message de réponse sous le formulaire */
.newsletter-about .wpcf7-response-output {
  border: none !important; text-align: center;
  color: #B0B0B0 !important; font-size: 13px;
  padding: 10px 0 0 !important; margin: 0 !important;
}

/* ─── CTA final ──────────────────────────────────────────────────────────── */
.about-cta { padding: 80px var(--pad-h); text-align: center; background: var(--beige); border-top: var(--border); }
.about-cta h2 { font-family: var(--font-title); font-weight: 800; font-size: 40px; letter-spacing: -0.03em; color: var(--noir); margin: 0 0 20px; }
.about-cta p { font-size: 17px; color: #555; max-width: 520px; margin: 0 auto 36px; line-height: 1.7; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .about-hero { grid-template-columns: 1fr; }
  .about-hero__photo { border-right: none; border-bottom: var(--border); padding: 40px; }
  .about-hero__content { padding: 40px; }
  .about-hero__content .about-hero__h1 { font-size: 36px; }
  .about-hero--text-only .about-hero__h1 { font-size: 40px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .about-cta h2 { font-size: 32px; }
}

@media (max-width: 768px) {
  .about-hero--text-only .about-hero__h1 { font-size: 32px; }
  .about-stats { grid-template-columns: 1fr; }
  .about-stat { border-right: none; border-bottom: var(--border); }
  .about-stat:last-child { border-bottom: none; }
  .skills-grid { grid-template-columns: 1fr; }
  .newsletter-about__form { flex-direction: column; }
  .newsletter-about__input { border-bottom: 2px solid var(--blanc); }
  .about-cta h2 { font-size: 26px; }
  .certs-band__inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ─── Photo détourée posée dans l'espace vide à droite du hero À propos ──── */
/* Même principe : absolu, hors flux, sans cadre ni fond. */
.about-hero--text-only { position: relative; }
.about-hero__portrait {
  position: absolute;
  right: 0;
  /* Bas calé sur la bordure haute de la bande .about-stats. */
  bottom: 297px;
  height: 340px; /* même taille que le hero de l'accueil */
  width: auto;
  object-fit: contain;
  object-position: bottom right;
  pointer-events: none;
  z-index: 0;
}
.about-hero--text-only > *:not(.about-hero__portrait):not(.about-hero__circle) { position: relative; z-index: 1; }
@media (min-width: 1201px) {
  /* La bande .about-stats occupe toute la largeur : on la descend pour loger
     la photo au-dessus. 247px = 380 (photo) + 80 (padding) - 213 (bas du titre),
     ce qui aligne le haut de la photo sur la ligne du sur-titre.
     Scopé au seuil d'affichage de la photo : sans elle, aucun espace ajouté. */
  .about-hero--photo .about-stats { margin-top: 86px; }
}
@media (max-width: 1200px) {
  .about-hero__portrait {
    position: static;
    display: block;
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 8px auto 28px;
  }
}
@media (max-width: 768px) { .about-hero__portrait { max-width: 200px; margin: 4px auto 20px; } }

/* ─── Photo dans le cadre du template complet (À propos) ─────────────────── */
/* Remplace le carré .about-hero__avatar de 200x200 par le portrait détouré. */
.about-hero__photo .about-hero__framed {
  width: 100%;
  max-width: 360px;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  object-position: bottom center;
  display: block;
}

/* ─── Variante cercle (hero À propos) ────────────────────────────────────── */
.about-hero__circle {
  position: absolute;
  /* Centré horizontalement dans la zone libre à droite du texte :
     le paragraphe d'intro est limité à 780px, l'espace restant est
     (100% - 2*pad - 780) et on y centre le disque de 300px. */
  right: calc(var(--pad-h) + (100% - 2 * var(--pad-h) - 780px - 300px) / 2);
  /* Centré verticalement sur le bloc titre + intro (254px de haut,
     démarrant au padding de 80px) : 80 + (254 - 300)/2. */
  top: calc(80px + (254px - 300px) / 2);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--beige);
  overflow: hidden;
  z-index: 0;
}
.about-hero__circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
@media (min-width: 1201px) {
  /* 340 (cercle) + 80 (padding) - 213 (bas du titre) */
  .about-hero--circle .about-stats { margin-top: 46px; }
}
@media (max-width: 1200px) {
  .about-hero__circle {
    position: static;
    width: 240px;
    height: 240px;
    margin: 8px auto 28px;
  }
}
@media (max-width: 768px) { .about-hero__circle { width: 180px; height: 180px; margin: 4px auto 20px; } }

/* ─── Ordre mobile : la photo passe après le paragraphe d'intro ──────────── */
@media (max-width: 1200px) {
  .about-hero--text-only { display: flex; flex-direction: column; }
  .about-hero--text-only .about-hero__portrait,
  .about-hero--text-only .about-hero__circle { order: 2; }
  .about-hero--text-only .about-stats { order: 3; }
}
