/* ==========================================================================
   CSS maison — Adopter Chien (remplace Materialize)
   Style : claymorphism — formes douces, arrondies, "puffy"
   ========================================================================== */

:root {
  --color-primary: #3B82F6;
  --color-primary-dark: #2563EB;
  --color-primary-soft: #DBEAFE;
  --color-surface: #FFFFFF;
  --color-background: #EAF1FB;
  --color-text: #1C398E;
  --color-text-soft: #4B5C8F;
  --color-success: #16A34A;
  --color-warning: #D97706;
  --color-danger: #DC2626;
  --color-info: #0284C7;

  --font-text: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Poppins', 'Montserrat', sans-serif;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --shadow-clay: 8px 8px 20px rgba(28, 57, 142, 0.14),
                 -6px -6px 16px rgba(255, 255, 255, 0.9),
                 inset 1px 1px 2px rgba(255, 255, 255, 0.8);
  --shadow-clay-hover: 10px 12px 26px rgba(28, 57, 142, 0.20),
                       -6px -6px 16px rgba(255, 255, 255, 0.95),
                       inset 1px 1px 2px rgba(255, 255, 255, 0.9);
  --shadow-clay-pressed: inset 4px 4px 10px rgba(28, 57, 142, 0.18),
                         inset -3px -3px 8px rgba(255, 255, 255, 0.7);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --nav-height: 64px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

body > .container {
  flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
  margin: 1.2rem 0 0.8rem;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin: 0 0 var(--space-4);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  border-style: none;
}

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   Grille (compatible .container / .row / .col .s* .m* .l*)
   -------------------------------------------------------------------------- */

.container {
  margin: 0 auto;
  width: 92%;
  max-width: 1280px;
  padding: 0 var(--space-3);
}

.container.full-container {
  max-width: 1600px;
  width: 100%;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: calc(-1 * var(--space-3));
  margin-right: calc(-1 * var(--space-3));
}

.row .col {
  flex: 0 0 auto;
  padding-left: var(--space-3);
  padding-right: var(--space-3);
  width: 100%;
}

.row .col.s12 { width: 100%; }

@media only screen and (min-width: 601px) {
  .row .col.m4  { width: 33.3333%; }
  .row .col.m6  { width: 50%; }
  .row .col.m12 { width: 100%; }
}

@media only screen and (min-width: 993px) {
  .row .col.l4 { width: 33.3333%; }
  .row .col.l6 { width: 50%; }
}

/* --------------------------------------------------------------------------
   Utilitaires de texte / mise en page
   -------------------------------------------------------------------------- */

.center, .center-align { text-align: center; }
.right { float: right; }
.left { float: left; }

.light { font-weight: 300; }
.thin  { font-weight: 200; }

.section {
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
}

.no-pad-bot { padding-bottom: 0; }

.valign-wrapper {
  display: flex;
  align-items: center;
}

.hide-on-med-and-down { display: none !important; }
@media only screen and (min-width: 993px) {
  .hide-on-med-and-down { display: flex !important; }
}

.w100 { width: 100%; }
.h100 { height: 100%; }

.bg-white { background-color: var(--color-surface); }

.icon-block {
  padding: var(--space-4);
}

/* Couleurs de texte (compat anciennes classes) */
.blue-text        { color: var(--color-primary) !important; }
.light-blue-text  { color: var(--color-info) !important; }
.red-text         { color: var(--color-danger) !important; }
.orange-text      { color: var(--color-warning) !important; }
.white-text       { color: #FFFFFF !important; }
.grey-text        { color: var(--color-text-soft) !important; }
.grey-text.text-lighten-4 { color: #C7D2E8 !important; }
.grey-text.text-darken-4  { color: var(--color-text) !important; }
.orange-text.text-lighten-3 { color: #FBBF24 !important; }

.grey.lighten-4 {
  background-color: #F1F5FB;
}

/* --------------------------------------------------------------------------
   Images à effet de profondeur (remplace z-depth-*)
   -------------------------------------------------------------------------- */

.z-depth-3, img.z-depth-3 {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-clay);
}

/* --------------------------------------------------------------------------
   Boutons (compat .btn / .btn-large / .waves-effect)
   -------------------------------------------------------------------------- */

.btn, .btn-large,
button.btn, a.btn, a.btn-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  color: #FFFFFF;
  background: linear-gradient(145deg, #60A5FA, var(--color-primary));
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 28px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 5px 5px 12px rgba(59, 130, 246, 0.35),
              inset 1px 1px 2px rgba(255, 255, 255, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-large {
  font-size: 1.05rem;
  padding: 16px 36px;
}

.btn:hover, .btn-large:hover {
  color: #FFFFFF;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 7px 8px 16px rgba(59, 130, 246, 0.42),
              inset 1px 1px 2px rgba(255, 255, 255, 0.6);
}

.btn:active, .btn-large:active {
  transform: translateY(0);
  box-shadow: inset 3px 3px 8px rgba(28, 57, 142, 0.30);
}

.btn img, .btn-large img {
  border-radius: var(--radius-pill);
}

/* --------------------------------------------------------------------------
   Cartes (compat .card / .card-image / .card-content / .card-reveal)
   -------------------------------------------------------------------------- */

.card {
  position: relative;
  background: linear-gradient(145deg, #FFFFFF, #F0F5FD);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-clay);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-clay-hover);
}

.card .card-image {
  position: relative;
  overflow: hidden;
}

.card .card-image img {
  display: block;
  width: 100%;
}

.card .card-image img.activator {
  cursor: pointer;
}

.card .card-content {
  padding: var(--space-5);
}

.card .card-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.card .card-title.activator {
  cursor: pointer;
}

.card .card-reveal {
  position: absolute;
  inset: 0;
  background-color: var(--color-surface);
  padding: var(--space-5);
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 2;
}

.card .card-reveal.open {
  transform: translateY(0);
}

.card .card-reveal .card-title {
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Barre de navigation (compat nav / .nav-wrapper / .brand-logo / .sidenav)
   -------------------------------------------------------------------------- */

nav {
  background: linear-gradient(145deg, #FFFFFF, #EDF3FC);
  box-shadow: 0 6px 18px rgba(28, 57, 142, 0.12);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .nav-wrapper {
  display: flex;
  align-items: center;
  min-height: var(--nav-height);
  padding: 0 var(--space-4);
  gap: var(--space-4);
}

nav .brand-logo {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-text);
}

nav .brand-logo img {
  height: 48px;
  width: auto;
}

@media only screen and (min-width: 601px) {
  nav .brand-logo img { height: 56px; }
}

nav ul {
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

nav ul li {
  margin: 0;
}

nav ul a {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--color-primary);
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  transition: background-color 0.2s ease, color 0.2s ease;
}

nav ul a:hover {
  background-color: var(--color-primary-soft);
  color: var(--color-primary-dark);
  text-decoration: none;
}

.sidenav-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  color: var(--color-text);
  background: linear-gradient(145deg, #FFFFFF, #E8EFFA);
  box-shadow: var(--shadow-clay);
}

@media only screen and (min-width: 993px) {
  .sidenav-trigger { display: none; }
}

/* Menu mobile (sidenav) */
.sidenav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: min(300px, 85vw);
  height: 100%;
  margin: 0;
  padding: var(--space-5) var(--space-4);
  list-style: none;
  background: linear-gradient(160deg, #FFFFFF, #EDF3FC);
  box-shadow: 12px 0 30px rgba(28, 57, 142, 0.25);
  transform: translateX(-105%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidenav.open {
  transform: translateX(0);
}

.sidenav li {
  margin-bottom: var(--space-2);
}

.sidenav a {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-text);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #FFFFFF, #EDF3FC);
  box-shadow: 4px 4px 10px rgba(28, 57, 142, 0.10),
              -3px -3px 8px rgba(255, 255, 255, 0.8);
}

.sidenav a:hover {
  color: var(--color-primary-dark);
  background: var(--color-primary-soft);
  text-decoration: none;
}

.sidenav-overlay {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(28, 57, 142, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidenav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   Pied de page (compat .page-footer / .footer-copyright)
   -------------------------------------------------------------------------- */

.page-footer {
  margin-top: var(--space-6);
  padding: var(--space-6) 0 0;
  color: #E7EEFB;
  background: linear-gradient(160deg, #2B4BA8, #1C398E);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.page-footer.brown {
  background: linear-gradient(160deg, #2B4BA8, #1C398E);
}

.page-footer h5 {
  color: #FFFFFF;
  margin-top: 0;
}

.page-footer p {
  color: #C7D2E8;
}

.page-footer a {
  color: #93C5FD;
}

.page-footer a:hover {
  color: #FFFFFF;
}

.footer-copyright {
  margin-top: var(--space-5);
  padding: var(--space-4) 0;
  background: rgba(0, 0, 0, 0.18);
  color: #C7D2E8;
}

/* --------------------------------------------------------------------------
   Formulaires (compat .input-field / .validate)
   -------------------------------------------------------------------------- */

.input-field {
  position: relative;
  margin-bottom: var(--space-5);
}

.input-field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text-soft);
  margin-bottom: var(--space-2);
}

.input-field input[type="text"],
.input-field input[type="email"],
.input-field input[type="password"],
.input-field input[type="tel"],
.input-field input[type="number"],
.input-field textarea,
.input-field select {
  width: 100%;
  font-family: var(--font-text);
  font-size: 1rem;
  color: var(--color-text);
  background: linear-gradient(145deg, #F4F8FE, #E9F0FA);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: inset 3px 3px 8px rgba(28, 57, 142, 0.10),
              inset -3px -3px 8px rgba(255, 255, 255, 0.9);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field input:focus,
.input-field textarea:focus,
.input-field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: inset 3px 3px 8px rgba(28, 57, 142, 0.10),
              0 0 0 3px var(--color-primary-soft);
}

.input-field input::placeholder {
  color: #93A4C8;
}

.input-field i.material-icons.prefix {
  position: absolute;
  top: 40px;
  left: 14px;
  color: var(--color-text-soft);
}

/* --------------------------------------------------------------------------
   Collapsible (compat)
   -------------------------------------------------------------------------- */

.collapsible {
  list-style: none;
  margin: var(--space-4) 0;
  padding: 0;
  border: none;
}

.collapsible > li {
  margin-bottom: var(--space-3);
  background: linear-gradient(145deg, #FFFFFF, #F0F5FD);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-clay);
  overflow: hidden;
}

.collapsible-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}

.collapsible-body {
  display: none;
  padding: 0 var(--space-4) var(--space-4);
}

.collapsible > li.active .collapsible-body {
  display: block;
}

/* --------------------------------------------------------------------------
   Icônes Material (police Google conservée)
   -------------------------------------------------------------------------- */

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
}

.material-icons.tiny { font-size: 1rem; }
.material-icons.right { margin-left: var(--space-2); }

h2 .material-icons { font-size: 2.4rem; }

/* --------------------------------------------------------------------------
   Toast (remplacement Materialize.toast)
   -------------------------------------------------------------------------- */

.app-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  z-index: 1000;
  font-family: var(--font-display);
  font-weight: 500;
  color: #FFFFFF;
  background: linear-gradient(145deg, #4B6EC9, #1C398E);
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-clay-hover);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.app-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media only screen and (max-width: 600px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.45rem; }
  h4 { font-size: 1.15rem; }

  .section {
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
  }

  nav .nav-wrapper {
    padding: 0 var(--space-3);
  }
}
