/*
Theme Name: École-Adom
Theme URI: https://www.ecole-adom.fr
Author: Owlcub
Author URI: https://owlcub.com
Description: Thème bloc sur mesure pour École Adom — l'école en ligne où l'enfant est au centre. Chaleureux, crédible, rapide — sans page builder.
Version: 1.0.1
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ecole-adom
*/

/* Les tokens (couleurs, typo, espacements) vivent dans theme.json.
   Ce fichier ne contient que des ajustements fins non couverts par theme.json. */

:root {
  --ea-shadow-sm: 0 1px 2px rgba(43, 43, 43, .06), 0 1px 3px rgba(43, 43, 43, .08);
  --ea-shadow-md: 0 4px 12px rgba(43, 43, 43, .08), 0 2px 4px rgba(43, 43, 43, .06);
  --ea-shadow-lg: 0 18px 40px rgba(43, 43, 43, .12);
  --ea-ring: 0 0 0 3px rgba(30, 99, 246, .35);
}

/* Rendu typographique plus soigné */
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Liens de contenu : soulignement doux */
.entry-content a:not(.wp-element-button):not(.wp-block-button__link) {
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
}

/* Boutons : transition + focus accessible */
.wp-element-button,
.wp-block-button__link {
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.wp-element-button:hover,
.wp-block-button__link:hover {
  transform: translateY(-1px);
  box-shadow: var(--ea-shadow-md);
}
.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--ea-ring);
}

/* Cartes (style de bloc "carte") */
.is-style-ea-card {
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 18px;
  box-shadow: var(--ea-shadow-sm);
  padding: 2rem;
  transition: box-shadow .15s ease, transform .15s ease;
}
.is-style-ea-card:hover { box-shadow: var(--ea-shadow-md); transform: translateY(-2px); }
/* Une carte qui contient une image en tête : l'image doit toucher les bords */
.is-style-ea-card > .wp-block-image:first-child {
  margin: -2rem -2rem 1.5rem;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
}

/* Illustrations (SVG unDraw, teinte de marque) posées sur un panneau doux */
.ea-illus img,
.ea-illus.wp-block-image img { width: 100%; height: auto; display: block; border-radius: 0; }
.ea-illus-panel {
  background: linear-gradient(150deg, var(--wp--preset--color--sky-soft), var(--wp--preset--color--base));
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--ea-shadow-sm);
}
.ea-illus-panel .wp-block-image { margin: 0; }
/* Bandeau média illustré en tête de carte (edge-to-edge) */
.ea-card-media {
  background: linear-gradient(150deg, var(--wp--preset--color--sky-soft), var(--wp--preset--color--base));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 2rem;
}
.ea-card-media img { max-height: 150px; width: auto; border-radius: 0; display: block; }
.is-style-ea-card > .ea-card-media:first-child {
  margin: -2rem -2rem 1.5rem;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
}

/* Étiquette / badge */
.is-style-ea-badge {
  display: inline-block;
  padding: .3em .9em;
  border-radius: 999px;
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
  letter-spacing: .01em;
  background: var(--wp--preset--color--sky-soft);
  color: var(--wp--preset--color--ink);
}

/* Mot mis en avant : trait dégradé moderne sous le mot (pas de surlignage) */
.is-style-ea-underline {
  color: var(--wp--preset--color--primary);
  background-image: linear-gradient(90deg, var(--wp--preset--color--green) 0%, var(--wp--preset--color--primary) 100%);
  background-repeat: no-repeat;
  background-size: 100% 0.16em;
  background-position: 0 100%;
  padding-bottom: 0.06em;
}

/* Header collant discret */
.wp-block-template-part.site-header,
header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.1) blur(6px);
}
