/* ============================================================
   MAIN.CSS — Design system
   PataGarde Dijon — Gardiennage animaux
   Palette : Terre — chaleureux, restraint, authentique
   ============================================================ */

/* --- VARIABLES --- */
:root {
  /* Accent — terre cuite / rouille chaude. ≤10% de la surface */
  --accent:           #C0764A;
  --accent-dark:      #9C5C38;
  --accent-light:     #E8B090;
  --accent-pale:      #F6E4D8;
  --accent-glow:      rgba(192,118,74,.18);

  /* Neutres chauds — jamais pur blanc, jamais pur noir */
  --bg:               #FBFAF6;
  --surface:          #F4F0E9;
  --surface-2:        #EDE7DD;
  --surface-3:        #F8F5EF;

  /* Textes */
  --text:             #1E1A16;
  --text-muted:       #6B5F52;
  --text-light:       #9B8E82;

  /* Bordures */
  --border:           #E0D8CD;
  --border-strong:    #C5BAAA;
  --border-soft:      #EDE7DD;

  /* Ombres — douces, chaudes, jamais dorées */
  --shadow-sm:        0 1px 3px rgba(30,26,22,.06);
  --shadow-md:        0 4px 16px rgba(30,26,22,.08);
  --shadow-lg:        0 12px 40px rgba(30,26,22,.10);
  --shadow-xl:        0 24px 64px rgba(30,26,22,.12);
  --shadow-inset:     inset 0 1px 0 rgba(255,255,255,.5), inset 0 -1px 0 rgba(30,26,22,.03);

  /* Rayons */
  --radius-xs:        4px;
  --radius-sm:        8px;
  --radius:           12px;
  --radius-lg:        16px;
  --radius-xl:        20px;
  --radius-2xl:       28px;
  --radius-full:      999px;

  /* Typographie */
  --font-body:        'Plus Jakarta Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-heading:     'Plus Jakarta Sans', 'Helvetica Neue', Arial, sans-serif;

  /* Transitions */
  --ease-out:         cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:      cubic-bezier(0.65, 0, 0.35, 1);
  --transition:       .24s var(--ease-out);
  --transition-fast:  .14s var(--ease-out);
  --transition-slow:  .45s var(--ease-out);

  /* Layout */
  --max-w:            1120px;
  --header-h:         68px;
  --section-py:       clamp(4rem, 7vw, 6.5rem);
  --space-xs:         4px;
  --space-sm:         8px;
  --space-md:         16px;
  --space-lg:         24px;
  --space-xl:         32px;
  --space-2xl:        48px;
  --space-3xl:        64px;

  /* Compat */
  --primary:          var(--accent);
  --primary-dark:     var(--accent-dark);
  --primary-light:    var(--accent-light);
  --gold:             var(--accent);
  --gold-dark:        var(--accent-dark);
  --gold-light:       var(--accent-light);
  --gold-pale:        var(--accent-pale);
  --gold-glow:        var(--accent-glow);
  --warm:             var(--accent);
  --warm-dark:        var(--accent-dark);
  --success:          #4A8C6A;
  --error:            #C75B4A;
  --warning:          #C0904A;
  --selection-bg:     rgba(192,118,74,.18);
  --selection-text:   var(--text);

  color-scheme: light;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }

body {
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.6;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-ligatures: common-ligatures;
  font-kerning: normal;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

@media (max-width: 899px) { body { padding-bottom: 72px; } }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }
fieldset { border: 0; padding: 0; margin: 0; }
table { border-collapse: collapse; border-spacing: 0; }

::selection { background: var(--selection-bg); color: var(--selection-text); }
::-moz-selection { background: var(--selection-bg); color: var(--selection-text); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }
:root { scrollbar-width: thin; scrollbar-color: var(--border-strong) var(--surface); }

/* --- ACCESSIBILITY --- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100px; left: 1rem; z-index: 9999; background: var(--accent); color: #fff; padding: .5rem 1rem; border-radius: var(--radius-sm); font-weight: 700; transition: top .2s; }
.skip-link:focus { top: 1rem; outline: 3px solid #fff; outline-offset: 3px; }
*:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-sm); }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: 700; line-height: 1.2;
  color: var(--text); text-wrap: balance;
  text-rendering: optimizeLegibility; letter-spacing: -0.02em;
}
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
h2 { font-size: clamp(1.375rem, 3.5vw, 2rem); font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: clamp(1.0625rem, 2.5vw, 1.375rem); font-weight: 650; line-height: 1.3; }
h4 { font-size: 1.0625rem; font-weight: 650; line-height: 1.35; }
h5 { font-size: .9375rem; font-weight: 650; line-height: 1.4; }
h6 { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); line-height: 1.4; }
p { line-height: 1.7; text-wrap: pretty; max-width: 65ch; }
strong { font-weight: 650; }
em { font-style: italic; color: var(--text-muted); }

/* --- LAYOUT --- */
.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 768px) { .container { padding-inline: 2rem; } }
@media (min-width: 1200px) { .container { padding-inline: 2.5rem; } }
.container--narrow { max-width: 760px; }

.section { padding-block: var(--section-py); }
.section--dark {
  background: #2B2520; color: #F0EAE3; color-scheme: dark;
}
.section--dark h2, .section--dark h3, .section--dark h4 { color: #F0EAE3; }
.section--dark strong { color: #fff; }
.section--surface  { background: var(--surface); }
.section--surface2 { background: var(--surface-2); }
.section--ivory    { background: var(--accent-pale); }

.section-header { text-align: center; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-header p {
  color: var(--text-muted); font-size: 1rem;
  max-width: 55ch; margin-inline: auto; margin-top: var(--space-md);
  line-height: 1.7;
}
.section-header .badge { margin-bottom: .75rem; }
.section-header h2 { margin-bottom: .5rem; }

/* --- BADGE --- */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--accent-pale); color: var(--accent-dark);
  font-size: .6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  padding: .25rem .75rem; border-radius: var(--radius-full);
  border: 1px solid rgba(192,118,74,.15);
}
.badge--accent { background: var(--accent-pale); color: var(--accent-dark); border-color: rgba(192,118,74,.2); }
.badge--warm   { background: #FDF0E8; color: #9C5C38; border-color: #F0D0B8; }
.badge--success{ background: #EEF7F2; color: #3A6B50; border-color: #C0E0D0; }
.badge--dark   { background: rgba(255,255,255,.1); color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.15); }

/* --- UTILITIES --- */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-warm { color: var(--accent-dark); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-primary { color: var(--accent); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.text-lg { font-size: 1.0625rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-p { margin-bottom: 1.25rem; }
.fs-lead { font-size: 1rem; }
.fs-sm { font-size: .875rem; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.75rem; border-radius: var(--radius-full);
  font-weight: 650; font-size: .9375rem; line-height: 1;
  transition: all var(--transition); min-height: 48px;
  white-space: nowrap; cursor: pointer; min-width: 44px;
  letter-spacing: .005em;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 12px rgba(192,118,74,.3);
  border: 1px solid rgba(156,92,56,.2);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(192,118,74,.4);
}
.btn-secondary {
  background: rgba(255,255,255,.12); color: #F0EAE3;
  border: 1px solid rgba(255,255,255,.2);
}
.btn-secondary:hover, .btn-secondary:focus-visible {
  background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.4);
}
.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border-strong);
}
.btn-outline:hover {
  background: var(--surface); border-color: var(--accent); color: var(--accent-dark);
}
.btn-outline-light {
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.85);
  border: 1.5px solid rgba(255,255,255,.2);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.5);
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.btn-sm { padding: .55rem 1.25rem; font-size: .8125rem; min-height: 40px; }
.btn-lg { padding: 1rem 2.25rem; font-size: 1rem; min-height: 54px; }
.btn-full { width: 100%; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* --- GRID --- */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.25rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(2,1fr); } .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3,1fr); } .grid-4 { grid-template-columns: repeat(4,1fr); } }

/* --- DIVIDERS --- */
.divider { border: none; border-top: 1px solid var(--border-soft); margin-block: 2rem; }
.divider--gold { border-top: 1px solid var(--accent-pale); margin-block: 2.5rem; }

/* --- CARDS --- */
.table-scroll { overflow-x: auto; border-radius: var(--radius-lg); }

.info-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
  margin-top: 1.5rem; display: flex; gap: .875rem; align-items: flex-start;
}
.info-card__title { color: var(--text); font-weight: 650; margin-bottom: .3rem; }
.info-card__body  { font-size: .875rem; color: var(--text-muted); line-height: 1.7; }
.info-card__icon  { flex-shrink: 0; margin-top: 2px; color: var(--accent); }

/* --- ANIMATIONS --- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}

.fade-in    { opacity: 0; transform: translateY(20px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.fade-in.visible  { opacity: 1; transform: translateY(0); }
.scale-in   { opacity: 0; transform: scale(.95); transition: opacity .4s var(--ease-out), transform .4s var(--ease-out); }
.scale-in.visible { opacity: 1; transform: scale(1); }
.no-js .fade-in, html:not(.js) .fade-in { opacity: 1; transform: none; }
.no-js .scale-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .fade-in { opacity: 1; transform: none; }
}

/* --- MISC --- */
.schema-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.hide-mobile { display: none; }
.hide-desktop { display: block; }
@media (min-width: 768px) { .hide-mobile { display: block; } .hide-desktop { display: none; } }

@media print {
  .btn, nav, footer, .mobile-cta-bar, .skip-link { display: none !important; }
  body { font-size: 12pt; color: #1E1A16; background: #fff; }
  a[href^="tel:"]::after { content: " " attr(href); }
  h1, h2, h3 { page-break-after: avoid; color: #1E1A16; }
}
