/* ============================================================
   IMPERIAL DOG & CAT — contenu « Notre philosophie » (page CMS « À propos », id 4)
   Contenu saisi dans le BO (docs/contenu/notre-philosophie.html),
   enveloppé dans <div class="philo-v2"> : toutes les règles sont
   préfixées par .philo-v2, sans effet sur les autres pages CMS.
   Chargée sur les pages CMS par templates/_partials/head.tpl.
   Mobile first. Deux breakpoints : 768px et 1024px.
   Palette et polices de l'accueil (home-v2.css).
   ============================================================ */

/* Signature du fondateur (même fichier que l'accueil) */
@font-face {
  font-family: "Great Vibes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/great-vibes-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin-var.woff2") format("woff2");
}

.philo-v2 {
  --philo-cream:    #FBF7EF;
  --philo-sand:     #F3EADA;
  --philo-ink:      #332720;
  --philo-ink-soft: #6B5B4E;
  --philo-clay:     #B05315;
  --philo-clay-ink: #A1480F;
  --philo-clay-dark:#8F4210;
  --philo-line:     #E2D6C2;
  --philo-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --philo-sans:  "Karla", "Helvetica Neue", Arial, sans-serif;
  --philo-title-shadow: 0 1px 2px rgba(51, 39, 32, 0.16);
  --philo-gap: clamp(40px, 6vw, 88px);

  max-width: 72rem;
  margin-inline: auto;
  font-family: var(--philo-sans);
  color: var(--philo-ink);
  line-height: 1.7;
  text-align: left; /* le thème justifie le texte des pages CMS */
}

/* Texte courant : le thème impose p { color: #666 } */
.page-cms .philo-v2 p {
  margin: 0 0 1em;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  color: var(--philo-ink-soft);
}

/* Titres : le thème impose .page-content.page-cms h2 { font-size: 30px } */
.page-cms .philo-v2 h2 {
  position: relative;
  margin: 0 0 0.9em;
  padding-bottom: 0.45em;
  font-family: var(--philo-serif);
  font-size: clamp(1.625rem, 1.1rem + 2vw, 2.375rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--philo-ink);
  text-wrap: balance;
  text-shadow: var(--philo-title-shadow);
}

/* Filet terracotta sous chaque titre */
.page-cms .philo-v2 h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 2px;
  background: var(--philo-clay);
}

.page-cms .philo-v2 h3 {
  margin: 0 0 0.5em;
  font-family: var(--philo-serif);
  font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--philo-clay-ink);
}

/* ---------- Chapô ---------- */

.page-cms .philo-v2 .philo-v2__lead {
  max-width: 44rem;
  margin: 0 auto var(--philo-gap);
  font-family: var(--philo-serif);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem);
  font-style: normal; /* romain : seule la version droite de Fraunces est auto-hébergée (un faux italique déforme le « & ») */
  line-height: 1.45;
  text-align: center;
  color: var(--philo-ink);
}

/* ---------- Photos ---------- */

/* Photos portrait (9:16) recadrées en 4:5 ; le cadrage suit le sujet de chaque photo */
.philo-v2 .philo-v2__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px;
  background: var(--philo-sand);
}

.philo-v2 .philo-v2__photo--toilettage { object-position: 50% 62%; }
.philo-v2 .philo-v2__photo--canine     { object-position: 50% 54%; }
.philo-v2 .philo-v2__photo--feline     { object-position: 50% 50%; }
.philo-v2 .philo-v2__photo--travail    { object-position: 50% 64%; }
.philo-v2 .philo-v2__photo--vocation   { object-position: 50% 88%; }

/* ---------- 39 ans d'expérience : texte + galerie 2 × 2 ---------- */

.philo-v2__story {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  margin-bottom: var(--philo-gap);
}

.philo-v2__gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 14px);
}

/* ---------- Pourquoi Imperial Dog & Cat ? ---------- */

.philo-v2__why {
  margin: 0 0 var(--philo-gap);
  padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 56px);
  background: var(--philo-sand);
  border-radius: 2px;
}

.page-cms .philo-v2__why > p {
  max-width: 48rem;
}

.philo-v2__pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: clamp(14px, 2vw, 24px);
  margin-top: clamp(20px, 3vw, 36px);
}

.philo-v2__pillar {
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--philo-cream);
  border-top: 3px solid var(--philo-clay);
  border-radius: 2px;
}

.page-cms .philo-v2__pillar p { margin-bottom: 0; }

/* ---------- Vocation : photo + texte ---------- */

.philo-v2__vocation {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  margin-bottom: var(--philo-gap);
}

.philo-v2__vocation .philo-v2__photo {
  max-width: 26rem;
}

/* ---------- Devise + bouton ---------- */

.philo-v2__end {
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--philo-line);
  text-align: center;
}

.page-cms .philo-v2 .philo-v2__motto {
  margin: 0 0 1.2em;
  font-family: var(--philo-serif);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-style: normal; /* romain : seule la version droite de Fraunces est auto-hébergée (un faux italique déforme le « & ») */
  line-height: 1.25;
  color: var(--philo-ink);
  text-wrap: balance;
}

/* Signature du fondateur (ajoutée par templates/cms/page.tpl) : celle du bloc histoire de l'accueil */
.page-cms .philo-v2 .philo-v2__signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0 0 1.75em;
}

.page-cms .philo-v2 .philo-v2__signature-name {
  font-family: "Great Vibes", "Snell Roundhand", "Segoe Script", cursive;
  font-size: clamp(2.25rem, 1.9rem + 1.2vw, 2.875rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--philo-ink);
}

.page-cms .philo-v2 .philo-v2__signature-role {
  font-family: var(--philo-sans);
  font-size: clamp(0.75rem, 0.7rem + 0.2vw, 0.875rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--philo-ink-soft);
}

/* Même bouton que l'accueil (.home-v2__btn--solid) */
.philo-v2 a.philo-v2__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 2px;
  background: var(--philo-clay);
  font-family: var(--philo-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  color: #FFF8F0;
  transition: background-color 0.2s ease;
}

.philo-v2 a.philo-v2__btn:hover,
.philo-v2 a.philo-v2__btn:focus { background: var(--philo-clay-dark); color: #FFF8F0; }

/* Le thème supprime le contour de focus */
.philo-v2 a:focus-visible {
  outline: 2px solid var(--philo-clay);
  outline-offset: 3px;
}

/* ---------- 768px : vocation côte à côte ---------- */

@media (min-width: 768px) {
  .philo-v2__vocation {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }
  .philo-v2__vocation .philo-v2__photo { max-width: none; }
}

/* ---------- 1024px : 39 ans côte à côte ---------- */

@media (min-width: 1024px) {
  .philo-v2__story {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .philo-v2 a.philo-v2__btn { transition: none; }
}
