/* ======================================================
   Iliade Digital — Globals (PRO)
   File: assets/css/styles.css
   Dépend: assets/css/variables.css
   Objectifs:
   - Base propre (reset + a11y)
   - Cohérence tokens (variables.css)
   - Helpers WP/Gutenberg sans casser
   ====================================================== */

/* =========================
   0) Reset / Base
   ========================= */
*,
*::before,
*::after{ box-sizing: border-box; }

html,body{ height: 100%; }

body{
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  line-height: var(--lh);
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Media */
img,svg,video,canvas{
  max-width: 100%;
  height: auto;
  display: block;
}

/* Links */
a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: none; }

/* Focus */
:focus-visible{
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--r-12);
}

/* Selection */
::selection{
  background: rgba(23,160,81,.18);
  color: var(--text);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* =========================
   1) Layout
   ========================= */
.il-container{
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Sections */
.il-section{
  padding-block: var(--section-pad);
  background: transparent;
}

.il-section--soft{
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.il-section--navy{
  background: var(--brand-navy);
  color: var(--white);
}

/* Utility spacing */
.il-stack{ display: grid; gap: 14px; }
.il-stack--sm{ gap: 10px; }
.il-stack--lg{ gap: 18px; }

/* =========================
   2) Typography
   ========================= */
h1,h2,h3,h4{
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--text);
}

h1{ font-size: clamp(30px, 4.4vw, 52px); letter-spacing: -0.02em; }
h2{ font-size: clamp(22px, 3.2vw, 36px); letter-spacing: -0.02em; }
h3{ font-size: clamp(18px, 2.2vw, 24px); letter-spacing: -0.01em; }
h4{ font-size: clamp(16px, 1.7vw, 20px); }

p{
  margin: 0 0 14px;
  color: var(--text-2);
}

small{ font-size: var(--fs-14); color: var(--muted); }
.il-muted{ color: var(--muted) !important; }

strong{ font-weight: 800; }

/* Lists (WordPress default "liste à puces" propre) */
ul,ol{
  margin: 0 0 14px;
  padding-left: 1.2em;
  color: var(--text-2);
}
li{ margin: 6px 0; }
li::marker{ color: rgba(23,160,81,.75); }

/* Inline code */
code,kbd,pre,samp{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
code{
  padding: .12em .34em;
  border-radius: 8px;
  background: rgba(16,19,35,.06);
  border: 1px solid rgba(16,19,35,.08);
}

/* Pre */
pre{
  margin: 0 0 14px;
  padding: 14px;
  border-radius: var(--r-16);
  background: rgba(16,19,35,.06);
  border: 1px solid rgba(16,19,35,.10);
  overflow: auto;
}

/* =========================
   3) Components: Cards / Buttons
   ========================= */
.il-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-16);
  box-shadow: var(--shadow-sm);
  padding: clamp(16px, 2.4vw, 22px);
}

.il-card--soft{
  background: var(--surface-2);
  border-color: var(--line-2);
}

/* Hover helper */
.il-card--hover{
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}
@media (hover:hover){
  .il-card--hover:hover{
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(23,160,81,.25);
  }
}

/* Buttons */
.il-btn{
  height: var(--btn-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: var(--btn-r);
  border: 1px solid transparent;
  font-weight: 800;
  font-family: var(--font-head);
  cursor: pointer;
  user-select: none;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  white-space: nowrap;
}
.il-btn:active{ transform: translateY(1px); }
.il-btn:disabled{ opacity: .55; cursor: not-allowed; }

.il-btn--green{
  background: var(--brand-green);
  color: var(--white);
  box-shadow: 0 12px 26px rgba(23, 160, 81, .20);
}
@media (hover:hover){
  .il-btn--green:hover{ box-shadow: 0 16px 34px rgba(23, 160, 81, .26); }
}

.il-btn--outline{
  background: transparent;
  border-color: var(--line-2);
  color: var(--text);
}
@media (hover:hover){
  .il-btn--outline:hover{
    border-color: var(--brand-green);
    color: var(--brand-green);
    background: rgba(23,160,81,.06);
  }
}

/* =========================
   4) Grids
   ========================= */
.il-grid{
  display: grid;
  gap: clamp(14px, 2.2vw, 22px);
}
@media (min-width: 860px){
  .il-grid--2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .il-grid--3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* =========================
   5) Forms (global)
   ========================= */
input,textarea,select,button{
  font: inherit;
  color: inherit;
}

.il-field{ display:grid; gap: 8px; }
.il-label{ font-weight: 800; font-family: var(--font-head); color: var(--text); }

.il-input,
.il-textarea,
.il-select{
  width: 100%;
  border-radius: var(--r-12);
  border: 1px solid var(--line-2);
  background: var(--surface);
  padding: 12px 12px;
  outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.il-textarea{ min-height: 120px; resize: vertical; }

.il-input:focus,
.il-textarea:focus,
.il-select:focus{
  border-color: rgba(23,160,81,.35);
  box-shadow: var(--focus);
}

.il-help{ font-size: var(--fs-14); color: var(--muted); }

/* =========================
   6) Tables
   ========================= */
table{
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-16);
  overflow: hidden;
}
th,td{
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
th{
  font-family: var(--font-head);
  font-weight: 900;
  background: rgba(16,19,35,.03);
}
tr:last-child td{ border-bottom: 0; }

/* =========================
   7) WordPress / Gutenberg helpers
   ========================= */
/* Gutenberg wide/full: si ton theme le permet, ça évite les débordements */
.alignwide,
.alignfull{
  margin-left: auto;
  margin-right: auto;
}
.alignwide{
  width: min(calc(var(--container) + 240px), 100%);
}
.alignfull{
  width: 100%;
}

/* WP Captions */
.wp-caption{
  max-width: 100%;
}
.wp-caption-text{
  margin-top: 8px;
  font-size: var(--fs-14);
  color: var(--muted);
}

/* Screen reader text */
.screen-reader-text{
  position:absolute !important;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}

/* =========================
   8) Footer base
   ========================= */
.il-footer{
  background: var(--brand-navy);
  color: var(--white);
  padding: 36px 0;
}
.il-footer a{ color: rgba(255,255,255,.92); }
@media (hover:hover){
  .il-footer a:hover{ color: var(--white); }
}
