/* Poppins hébergée dans le plugin (pas d'appel à Google Fonts) */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/poppins-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/poppins-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/poppins-latin-600-normal.woff2') format('woff2'); }

/* Aguerrir Blog — variables à ajuster à la charte */
:root {
  --agr-accent: #0015FF;      /* bleu des icônes et boutons */
  --agr-link: #0015FF;        /* bleu des liens */
  --agr-danger: #e0182d;      /* rouge des boutons de suppression */
  --agr-font: 'Poppins', sans-serif;
  --agr-ink: #1b1b1b;
  --agr-grey: #d9d9d9;
  --agr-line: #cfcfcf;
  --agr-top: 120px;           /* espace sous le menu fixe, pour l'espace rédacteur */
}

/* ------------------------------------------------------------------ */
/* Page article                                                        */
/* ------------------------------------------------------------------ */

/* Le contenu de l'article sort du conteneur du thème pour passer en pleine largeur */
.agr-article {
  color: var(--agr-ink);
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
body.agr-blog-article { overflow-x: clip; }

/* Titre, image et marges du thème : remplacés par la mise en page du plugin */
.agr-blog-article .page-header,
.agr-blog-article .entry-header,
.agr-blog-article .post-thumbnail,
.agr-blog-article #comments,
.agr-blog-article .comments-area,
.agr-blog-article .comment-respond { display: none; }
.agr-menu-ok .site-header,
.agr-menu-ok #site-header { display: none; }
.agr-footer-ok .site-footer,
.agr-footer-ok #site-footer { display: none; }
.agr-blog-article .site-main,
.agr-blog-article .page-content { max-width: none; margin-top: 0; padding-top: 0; }

.agr-hero { width: 100%; height: clamp(240px, 42vh, 460px); background: var(--agr-grey); overflow: hidden; }
.agr-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

.agr-layout {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 48px;
  max-width: 1100px;
  margin: 56px auto;
  padding: 0 24px;
}

.agr-side { border-right: 1px solid var(--agr-ink); padding-right: 40px; }
.agr-titre { font-size: clamp(1.4rem, 2.2vw, 2rem); line-height: 1.25; margin: 0; }
.agr-info { margin: 16px 0 0; font-size: .9rem; line-height: 1.5; opacity: .65; }

.agr-corps { max-width: 62ch; font-size: .95rem; line-height: 1.8; }
.agr-corps p { margin: 0 0 1.2em; }
.agr-corps h2, .agr-corps h3 { line-height: 1.3; margin: 1.8em 0 .6em; }
.agr-corps img { max-width: 100%; height: auto; }
.agr-corps figure, .agr-corps .wp-caption { max-width: 100%; margin: 2em 0; }
.agr-corps figcaption, .agr-corps .wp-caption-text { font-size: .8rem; opacity: .65; margin-top: .5em; }
.agr-corps .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.agr-corps .alignright { float: right; margin: .3em 0 1em 1.5em; }
.agr-corps .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.agr-corps blockquote { margin: 2em 0; padding-left: 1.2em; border-left: 3px solid var(--agr-ink); font-style: italic; }

.agr-social { display: flex; gap: 12px; list-style: none; margin: 2.5em 0 0; padding: 0; clear: both; }
.agr-social a {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--agr-accent); color: #fff; text-decoration: none;
}
.agr-social a svg { display: block; fill: currentColor; stroke: none; }
.agr-social a:hover { opacity: .85; }
.agr-social a:focus-visible { outline: 2px solid var(--agr-ink); outline-offset: 2px; }

.agr-suite { max-width: 1100px; margin: 0 auto 64px; padding: 0 24px; }
.agr-suite h2 { font-size: 1.15rem; margin: 0 0 24px; }
.agr-cartes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.agr-carte { color: inherit; text-decoration: none; display: block; }
.agr-carte-img { aspect-ratio: 16 / 9; background: var(--agr-grey); overflow: hidden; }
.agr-carte-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agr-carte-txt { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; margin-top: 12px; font-size: .85rem; line-height: 1.5; }
.agr-carte:hover .agr-carte-txt strong { text-decoration: underline; }
.agr-carte:focus-visible { outline: 2px solid var(--agr-accent); outline-offset: 4px; }

/* Typographie : Poppins normal pour le texte, Poppins semi-bold pour les titres */
.agr-article, .agr-ui { font-family: var(--agr-font); font-weight: 400; }
.agr-article h1, .agr-article h2, .agr-article h3,
.agr-ui h2, .agr-ui input, .agr-ui select, .agr-ui button { font-family: inherit; }
.agr-titre, .agr-corps h2, .agr-corps h3, .agr-suite h2, .agr-carte-txt strong,
.agr-corps strong, .agr-corps b,
.agr-h, .agr-field label, .agr-row-titre, .agr-btn { font-weight: 600; }

/* Liens de l'article en bleu */
.agr-corps a { color: var(--agr-link); text-decoration: underline; text-underline-offset: 2px; }
.agr-corps a:hover, .agr-corps a:focus-visible { opacity: .8; }
.agr-carte:hover .agr-carte-txt strong { color: var(--agr-link); text-decoration: none; }

/* Les icônes sociales restent blanches (elles sont dans le texte, donc exclues du bleu des liens) */
.agr-corps .agr-social a,
.agr-corps .agr-social a:hover,
.agr-corps .agr-social a:focus-visible { color: #fff; text-decoration: none; }

/* Rien ne doit dépasser de l'écran : les mots et liens longs passent à la ligne */
.agr-article, .agr-article * { box-sizing: border-box; }
.agr-side, .agr-corps { min-width: 0; }
.agr-corps, .agr-corps p, .agr-corps li, .agr-corps a, .agr-corps blockquote { overflow-wrap: anywhere; }
.agr-corps * { max-width: 100%; }
.agr-corps table { display: block; overflow-x: auto; }
.agr-corps iframe, .agr-corps video { max-width: 100%; }

/* Mobile et tablette : une seule colonne, plus de dépassement à droite */
@media (max-width: 800px) {
  .agr-article { width: 100%; margin-left: 0; }
  .agr-hero { height: clamp(200px, 34vh, 320px); }
  .agr-layout { display: block; margin: 28px 0; padding: 0 20px; }
  .agr-side { border-right: 0; padding: 0 0 20px; margin-bottom: 24px; border-bottom: 1px solid var(--agr-ink); }
  .agr-corps { max-width: none; }
  .agr-cartes { grid-template-columns: 1fr; }
  .agr-carte-txt { grid-template-columns: 1fr; gap: 6px; }
  .agr-suite { padding: 0 20px; }
}

/* ------------------------------------------------------------------ */
/* Espace rédacteur                                                    */
/* ------------------------------------------------------------------ */

.agr-ui { max-width: 860px; margin: 0 auto; padding: var(--agr-top) 24px 80px; color: var(--agr-ink); }
.agr-ui * { box-sizing: border-box; }
.agr-h { font-size: 1.6rem; line-height: 1.25; margin: 0 0 24px; }
.agr-lead { margin: 0 0 24px; }
.agr-small { font-size: .9rem; margin-top: 16px; }
.agr-back { margin: 0 0 12px; font-size: .9rem; }
.agr-back a { color: inherit; }

.agr-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.agr-head .agr-h { margin: 0; }

.agr-notice { margin: 0 0 20px; padding: 12px 16px; border-radius: 6px; font-size: .95rem; }
.agr-notice a { color: inherit; font-weight: 600; }
.agr-notice--ok { background: #e8f5ec; border: 1px solid #b7dcc2; }
.agr-notice--err { background: #fdecec; border: 1px solid #f0b8b8; }
.agr-empty { padding: 32px; border: 1px dashed var(--agr-line); border-radius: 6px; text-align: center; }

/* Boutons : angles arrondis au maximum.
   Sélecteurs renforcés (.agr-ui .agr-btn) pour passer devant les styles de boutons du thème / d'Elementor. */
.agr-ui .agr-btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center;
  padding: .65em 1.6em; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--agr-font); font-size: .9rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; text-transform: none; letter-spacing: 0;
  box-shadow: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.agr-ui .agr-btn:focus-visible { outline: 2px solid var(--agr-ink); outline-offset: 2px; }

/* Plein bleu, texte blanc */
.agr-ui .agr-btn--primary { background: var(--agr-accent); border-color: var(--agr-accent); color: #fff; }
.agr-ui .agr-btn--primary:hover,
.agr-ui .agr-btn--primary:focus-visible { background: #0010cc; border-color: #0010cc; color: #fff; }

/* Contour et texte bleus */
.agr-ui .agr-btn--outline { background: transparent; border-color: var(--agr-accent); color: var(--agr-accent); }
.agr-ui .agr-btn--outline:hover,
.agr-ui .agr-btn--outline:focus-visible { background: var(--agr-accent); border-color: var(--agr-accent); color: #fff; }

/* Contour et texte rouges */
.agr-ui .agr-btn--danger { background: transparent; border-color: var(--agr-danger); color: var(--agr-danger); }
.agr-ui .agr-btn--danger:hover,
.agr-ui .agr-btn--danger:focus-visible { background: var(--agr-danger); border-color: var(--agr-danger); color: #fff; }

/* Liste */
.agr-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--agr-line); }
.agr-row { display: grid; grid-template-columns: 88px 1fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--agr-line); }
.agr-row-img { width: 88px; height: 56px; background: var(--agr-grey); overflow: hidden; border-radius: 4px; }
.agr-row-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agr-row-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; min-width: 0; }
.agr-row-titre { flex-basis: 100%; font-size: 1rem; }
.agr-row-meta { font-size: .85rem; opacity: .7; }
.agr-statut--publish { color: #1d7a3a; opacity: 1; }
.agr-statut--future { color: var(--agr-accent); opacity: 1; }
.agr-row-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.agr-row-actions form { margin: 0; }

/* Formulaire */
.agr-field { margin-bottom: 28px; }
.agr-field label { display: block; font-weight: 600; margin-bottom: 8px; }
.agr-field input[type="text"],
.agr-field input[type="date"],
.agr-field select {
  width: 100%; max-width: 100%; padding: .7em .9em;
  border: 1px solid var(--agr-line); border-radius: 6px;
  font: inherit; background: #fff; color: var(--agr-ink);
}
.agr-field input[type="date"] { max-width: 260px; }
.agr-field input:focus, .agr-field select:focus { outline: 2px solid var(--agr-accent); outline-offset: 1px; border-color: var(--agr-accent); }
.agr-hint { margin: 8px 0 0; font-size: .85rem; opacity: .65; }
.agr-preview { margin-bottom: 12px; max-width: 360px; background: var(--agr-grey); }
.agr-preview:empty { display: none; }
.agr-preview img { display: block; width: 100%; height: auto; }
.agr-actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 8px; }

.agr-login form { max-width: 360px; display: grid; gap: 14px; }
.agr-login label { display: block; font-weight: 600; margin-bottom: 6px; }
.agr-login input[type="text"], .agr-login input[type="password"] {
  width: 100%; padding: .7em .9em; border: 1px solid var(--agr-line); border-radius: 6px; font: inherit;
}
.agr-login .login-remember label { font-weight: 400; }
.agr-login input[type="submit"] {
  padding: .65em 1.2em; border-radius: 6px; border: 0; background: var(--agr-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}

@media (max-width: 640px) {
  .agr-head { flex-direction: column; align-items: flex-start; }
  .agr-row { grid-template-columns: 72px 1fr; }
  .agr-row-img { width: 72px; height: 48px; }
  .agr-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Espace rédacteur : angles arrondis au maximum (notifications et boutons bleus) */
.agr-notice { border-radius: 999px; padding: 12px 24px; }
.agr-btn--primary,
.agr-login input[type="submit"] { border-radius: 999px; padding-left: 1.6em; padding-right: 1.6em; }
