/*
Theme Name: Cocoon Motion
Theme URI: https://example.com/
Author: OpenAI
Description: Thème WordPress custom pour Cocoon Motion, basé sur la deuxième landing page de référence avec formes organiques et palette sombre chaleureuse.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.0
Requires PHP: 7.4
Text Domain: cocoon-motion
*/

:root{
  --bg:#070b14;
  --bg-soft:#0d1422;
  --panel:#111927;
  --panel-2:#182233;
  --line:rgba(255,255,255,.08);
  --text:#f6efe8;
  --muted:#aab3c5;
  --orange:#f58a1f;
  --orange-deep:#d96a12;
  --yellow:#f4c21a;
  --cream:#f6efe8;
  --cyan:#39c0e0;
  --cyan-deep:#1791b8;
  --shadow:0 24px 60px rgba(0,0,0,.35);
  --wrap:1180px;
  --pill:999px;
}

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

html{
  scroll-behavior:smooth;
}

html,
body{
  margin:0;
  padding:0;
}

body{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at 74% 14%, rgba(245,138,31,.08), transparent 18%),
    radial-gradient(circle at 18% 88%, rgba(57,192,224,.06), transparent 16%),
    linear-gradient(180deg, #0a0f19 0%, #070b14 100%);
  overflow-x:hidden;
}

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

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

button,
input,
textarea{
  font:inherit;
}

.container{
  width:min(calc(100% - 32px), var(--wrap));
  margin:0 auto;
}

/* Header */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:blur(10px);
  background:rgba(7,11,20,.72);
  border-bottom:1px solid rgba(255,255,255,.05);
}

body.admin-bar .site-header{
  top:32px;
}

@media (max-width:782px){
  body.admin-bar .site-header{
    top:46px;
  }
}

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

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:800;
  font-size:1.08rem;
  letter-spacing:.02em;
}

.brand-mark{
  width:42px;
  height:26px;
  border:3px solid var(--cream);
  border-bottom:none;
  border-radius:18px 18px 10px 10px;
  position:relative;
}

.brand-mark::before,
.brand-mark::after{
  content:"";
  position:absolute;
  top:-12px;
  width:14px;
  height:14px;
  border:3px solid var(--cream);
  border-bottom:none;
  border-radius:14px 14px 4px 4px;
}

.brand-mark::before{
  left:2px;
}

.brand-mark::after{
  right:2px;
}

/* Menus WordPress */
.main-nav,
.footer-nav{
  margin:0;
  padding:0;
  list-style:none;
}

.main-nav{
  display:flex;
  align-items:center;
  gap:28px;
  color:var(--muted);
  font-size:.95rem;
}

.main-nav li,
.footer-nav li{
  list-style:none;
}

.main-nav a:hover{
  color:var(--text);
}

.footer-nav{
  display:flex;
  gap:26px;
  flex-wrap:wrap;
  font-size:.95rem;
  opacity:.95;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:0 22px;
  border-radius:var(--pill);
  border:1px solid transparent;
  font-weight:700;
  cursor:pointer;
  transition:.22s ease;
}

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

.btn--primary{
  color:#fff;
  background:linear-gradient(180deg, var(--orange), var(--orange-deep));
  box-shadow:0 14px 28px rgba(245,138,31,.2);
}

.btn--secondary{
  color:#fff;
  background:linear-gradient(180deg, var(--cyan), var(--cyan-deep));
  box-shadow:0 14px 28px rgba(57,192,224,.18);
}

.btn--ghost{
  border-color:var(--line);
  background:rgba(255,255,255,.03);
  color:var(--text);
}

/* Shared section behavior */
.hero,
.services,
.detail,
.newsletter{
  position:relative;
  overflow:hidden;
}

.hero > .container,
.services > .container,
.detail > .container,
.newsletter > .container{
  position:relative;
  z-index:2;
}

/* ===== HERO ===== */
.hero{
  padding:40px 0 150px;
}

.hero::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:430px;
  background:linear-gradient(135deg, #161f31 0%, #0f1625 46%, #0a101b 100%);
  border-bottom-left-radius:160px 70px;
  border-bottom-right-radius:160px 70px;
  z-index:0;
}

/* vague blanche du hero */
.hero::after{
  content:"";
  position:absolute;
  left:clamp(-220px, -12vw, -120px);
  width:calc(100% + clamp(240px, 24vw, 440px));
  bottom:-82px;
  height:170px;
  background:#fff;
  border-top-left-radius:50% 100%;
  border-top-right-radius:50% 100%;
  z-index:1;
}

.hero-grid{
  display:grid;
  grid-template-columns:1fr .95fr;
  gap:42px;
  align-items:center;
  min-height:500px;
}

.hero-copy{
  max-width:560px;
  padding-top:12px;
}

.eyebrow{
  margin:0 0 14px;
  color:var(--yellow);
  font-size:.82rem;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.hero h1{
  margin:0 0 18px;
  font-size:clamp(2.8rem,5vw,5.2rem);
  line-height:.96;
  letter-spacing:-.04em;
  max-width:8.5ch;
}

.hero p{
  margin:0;
  max-width:52ch;
  color:var(--muted);
  line-height:1.72;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin-top:24px;
}

.hero-media{
  position:relative;
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:360px;
}

.hero-orb{
  width:min(100%, 430px);
  aspect-ratio:1 / 1.03;
  border-radius:50% 50% 42% 42% / 54% 54% 40% 40%;
  background:
    radial-gradient(circle at 50% 22%, rgba(244,194,26,.18), transparent 24%),
    linear-gradient(180deg, #0f1726 0%, #111b2a 65%, #0b121d 100%);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  overflow:hidden;
  position:relative;
}

.hero-orb::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 68% 68%, rgba(245,138,31,.12), transparent 16%),
    linear-gradient(180deg, rgba(255,255,255,.04), transparent 32%);
  pointer-events:none;
}

.hero-orb img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 44%;
}

.play-badge{
  position:absolute;
  width:64px;
  height:64px;
  right:calc(50% - 215px);
  bottom:20px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-weight:900;
  color:#221a09;
  background:linear-gradient(180deg, var(--yellow), #ef9f00);
  border:4px solid rgba(8,11,20,.92);
  box-shadow:0 18px 36px rgba(244,194,26,.24);
  z-index:3;
}

/* ===== SERVICES ===== */
.services{
  background:#fff;
  color:#101726;
  padding:110px 0 130px;
}

/* on ne met PAS de vague en haut ici, sinon les sections se mordent */
.services::before{
  content:none;
}

/* vague sombre en bas de la section blanche */
.services::after{
  content:"";
  position:absolute;
  left:-12vw;
  width:calc(100% + 24vw);
  bottom:-82px;
  height:170px;
  background:#0f1624;
  border-top-left-radius:50% 100%;
  border-top-right-radius:50% 100%;
  z-index:1;
}

.section-heading{
  text-align:center;
  margin-bottom:32px;
  position:relative;
  z-index:2;
}

.section-heading h2{
  margin:8px 0 10px;
  font-size:clamp(1.9rem,3vw,2.8rem);
  line-height:1.05;
}

.section-heading p:last-child{
  max-width:58ch;
  margin:0 auto;
  color:#667289;
  line-height:1.68;
}

.cards-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:22px;
  align-items:end;
  position:relative;
  z-index:2;
}

.service-card{
  position:relative;
  border:1px solid rgba(16,23,38,.09);
  background:#fff;
  box-shadow:0 14px 34px rgba(12,20,34,.09);
  padding:26px 22px 22px;
  min-height:320px;
}

.service-card--left{
  border-radius:34px 34px 22px 22px;
}

.service-card--center{
  min-height:360px;
  border-radius:24px;
  transform:translateY(-14px);
  border-color:rgba(245,138,31,.14);
}

.service-card--right{
  border-radius:22px 22px 34px 34px;
}

.service-icon{
  width:74px;
  height:74px;
  border-radius:20px;
  display:grid;
  place-items:center;
  font-size:1.9rem;
  color:var(--orange);
  background:linear-gradient(180deg, rgba(245,138,31,.08), rgba(57,192,224,.04));
  border:1px solid rgba(16,23,38,.08);
  margin-bottom:18px;
}

.service-card h3{
  margin:0 0 10px;
  font-size:1.3rem;
}

.service-card p{
  margin:0 0 18px;
  line-height:1.7;
  color:#667289;
}

.service-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 18px;
  border-radius:999px;
  background:linear-gradient(180deg, var(--cyan), var(--cyan-deep));
  color:#fff;
  font-size:.92rem;
  font-weight:700;
}

/* ===== DETAIL ===== */
.detail{
  background:linear-gradient(180deg, #0f1624 0%, #090d16 100%);
  padding:110px 0 120px;
}

.detail::before{
  content:none;
}

.detail::after{
  content:"";
  position:absolute;
  left:-12vw;
  width:calc(100% + 24vw);
  bottom:-78px;
  height:160px;
  background:#101726;
  border-top-left-radius:50% 100%;
  border-top-right-radius:50% 100%;
  z-index:1;
}

.detail-grid{
  display:grid;
  grid-template-columns:.92fr 1.08fr;
  gap:34px;
  align-items:center;
  position:relative;
  z-index:2;
}

.detail-copy p{
  color:var(--muted);
  line-height:1.72;
}

.detail-blob{
  width:min(100%, 430px);
  aspect-ratio:1/.94;
  background:
    radial-gradient(circle at 52% 18%, rgba(57,192,224,.22), transparent 18%),
    linear-gradient(180deg, #101d2d 0%, #0a121d 100%);
  border-radius:42% 58% 52% 48% / 54% 40% 60% 46%;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  overflow:hidden;
  margin-left:auto;
}

.detail-blob img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 48%;
}

/* ===== NEWSLETTER ===== */
.newsletter{
  background:#101726;
  padding:110px 0 90px;
}

.newsletter::before,
.newsletter::after{
  content:none;
}

.newsletter-box{
  text-align:center;
  max-width:760px;
  margin:0 auto;
  position:relative;
  z-index:2;
}

.newsletter p{
  color:var(--muted);
  line-height:1.72;
  max-width:58ch;
  margin:0 auto;
}

.newsletter-form{
  display:flex;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:24px;
}

.newsletter-form input{
  min-width:320px;
  min-height:50px;
  padding:0 18px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--text);
}

.newsletter-form input::placeholder{
  color:#9ca6bc;
}

/* Footer */
.site-footer{
  background:linear-gradient(180deg, #25b9df, #1da1cb);
  color:#fff;
}

.footer-inner{
  min-height:118px;
  display:grid;
  grid-template-columns:1fr auto auto auto;
  gap:26px;
  align-items:center;
  padding:10px 0;
}

.footer-brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
}

.footer-brand .brand-mark,
.footer-brand .brand-mark::before,
.footer-brand .brand-mark::after{
  border-color:#fff;
}

.site-main .entry-content,
.site-main .page-content{
  line-height:1.75;
}

/* Responsive */
@media (max-width:980px){
  .hero-grid,
  .detail-grid{
    grid-template-columns:1fr;
  }

  .cards-grid{
    grid-template-columns:1fr;
  }

  .service-card--center{
    transform:none;
    min-height:320px;
  }

  .detail-blob{
    margin:0 auto;
  }

  .footer-inner{
    grid-template-columns:1fr;
    padding:26px 0;
  }
}

@media (max-width:760px){
  .site-header{
    position:sticky;
  }

  .header-inner{
    min-height:auto;
    padding:18px 0;
    flex-wrap:wrap;
  }

  .main-nav{
    order:3;
    width:100%;
    flex-wrap:wrap;
    gap:14px 18px;
  }

  .hero{
    padding:24px 0 100px;
  }

  .hero::before{
    height:470px;
  }

  .hero::after{
    left:-16vw;
    width:calc(100% + 32vw);
    bottom:-60px;
    height:120px;
  }

  .hero-grid{
    min-height:auto;
  }

  .services{
    padding:80px 0 100px;
  }

  .services::after{
    left:-16vw;
    width:calc(100% + 32vw);
    bottom:-60px;
    height:120px;
  }

  .detail{
    padding:80px 0 100px;
  }

  .detail::after{
    left:-16vw;
    width:calc(100% + 32vw);
    bottom:-56px;
    height:112px;
  }

  .newsletter{
    padding:80px 0 80px;
  }

  .newsletter-form input{
    min-width:100%;
  }

  .play-badge{
    right:18px;
    bottom:14px;
  }
}