/* Force all th text to white */
th {
  color: var(--oc-white) !important;
  font-size: var(--oc-text-base) !important;
  font-family: var(--oc-font-family-display) !important;
  font-weight: var(--oc-font-bold) !important;
}
/* ============================================
   OPTIMIZED EXTRANET WIDGETS CSS - UNIFIED DESIGN
   ============================================ */

:root {
  /* Primary Colors */
  --oc-green: #00665f;
  --oc-primary: #00665f;
  --oc-action-color: #00665f;
  --oc-action-color-hover: #005449;
  --oc-secondary: #352e26;
  
  /* Neutral Colors */
  --oc-white: #ffffff;
  --oc-gray-50: #fafafa;
  --oc-gray-100: #f5f5f5;
  --oc-gray-200: #eeeeee;
  --oc-gray-300: #e8e8e8;
  --oc-gray-400: #d0d0d0;
  --oc-gray-500: #999999;
  --oc-gray-700: #666666;
  --oc-gray-800: #333333;
  --oc-gray-900: #111111;
  
  /* Legacy aliases for compatibility */
  --oc-light-bg: #f5f5f5;
  --oc-border-color: #cccccc;
  --oc-text-dark: #222222;
  --oc-text-light: #666666;
  
  /* Spacing */
  --oc-space-1: 0.25rem;
  --oc-space-2: 0.5rem;
  --oc-space-3: 1rem;
  --oc-space-4: 1.5rem;
  --oc-space-5: 3rem;
  
  /* Typography */
  --oc-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, Helvetica, Arial, sans-serif;
  --oc-font-family-display: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
  
  /* Font sizes scale */
  --oc-text-xs: 0.75rem;     /* 12px */
  --oc-text-sm: 0.875rem;    /* 14px */
  --oc-text-base: 1rem;      /* 16px */
  --oc-text-lg: 1.125rem;    /* 18px */
  --oc-text-xl: 1.25rem;     /* 20px */
  --oc-text-2xl: 1.5rem;     /* 24px */
  --oc-text-3xl: 1.875rem;   /* 30px */
  
  /* Font weights */
  --oc-font-light: 300;
  --oc-font-normal: 400;
  --oc-font-medium: 500;
  --oc-font-semibold: 600;
  --oc-font-bold: 700;
  
  /* Line heights */
  --oc-line-height-tight: 1.2;
  --oc-line-height-snug: 1.375;
  --oc-line-height-normal: 1.5;
  --oc-line-height-relaxed: 1.625;
  --oc-line-height-loose: 2;
  
  /* Border & Radius */
  --oc-border-radius: 4px;
  --oc-radius-md: 8px;
  --oc-border-width: 1px;
  --oc-border-width-thick: 2px;

  /* Component tokens */
  --oc-control-height: 40px;
  --oc-control-padding-y: 0.5rem;
  --oc-control-padding-x: 0.75rem;
  --oc-button-padding-y: 0.625rem;
  --oc-button-padding-x: 1rem;
  --oc-button-font-size: var(--oc-text-sm);
  --oc-button-bg: var(--oc-action-color);
  --oc-button-bg-hover: var(--oc-action-color-hover);
  --oc-button-text: var(--oc-white);
  
  /* Transitions */
  --oc-transition-fast: 0.15s ease-in-out;
  --oc-transition-normal: 0.2s ease-in-out;
  --oc-transition-slow: 0.3s ease-in-out;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--oc-font-family);
  font-size: var(--oc-text-sm);
  font-weight: var(--oc-font-normal);
  color: var(--oc-gray-900);
  line-height: var(--oc-line-height-normal);
  background-color: var(--oc-white);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  color: var(--oc-gray-900);
  font-family: var(--oc-font-family);
  font-weight: var(--oc-font-bold);
  margin: 0;
  padding: 0;
  line-height: var(--oc-line-height-tight);
}

h1 {
  font-size: var(--oc-text-3xl);
  font-weight: var(--oc-font-bold);
  margin: 20px 0 15px 0;
}

h1.famille {
  font-size: var(--oc-text-3xl);
  text-align: center;
  margin: 25px 0 20px 0;
}

h2 {
  font-size: var(--oc-text-2xl);
  font-weight: var(--oc-font-semibold);
  margin: 18px 0 12px 0;
  text-align: center;
}

h3 {
  font-size: var(--oc-text-xl);
  font-weight: var(--oc-font-semibold);
  margin: 16px 0 10px 0;
}

h4 {
  font-size: var(--oc-text-lg);
  font-weight: var(--oc-font-semibold);
  margin: 14px 0 8px 0;
}

h5 {
  font-size: var(--oc-text-base);
  font-weight: var(--oc-font-semibold);
  margin: 10px 0 6px 0;
  padding: 0;
}

h6 {
  font-size: var(--oc-text-sm);
  font-weight: var(--oc-font-semibold);
  margin: 8px 0 4px 0;
}

p {
  margin: 0 0 10px 0;
  font-size: var(--oc-text-sm);
  font-weight: var(--oc-font-normal);
  line-height: var(--oc-line-height-normal);
}

a {
  color: var(--oc-secondary);
  text-decoration: none;
  transition: color var(--oc-transition-fast), opacity var(--oc-transition-fast);
}

a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

a:focus-visible {
  outline: 2px solid var(--oc-primary);
  outline-offset: 2px;
}


  .oc-search-box{
    border:1px solid rgba(0,0,0,.15);
    padding:12px 14px;
    border-radius:8px;
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
    flex-wrap:wrap;
  }

  .oc-toolbar{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
    flex-wrap:nowrap;
  }
  .oc-toolbar > form{
    margin:0;
    flex:1 1 auto;
    min-width:0;
  }
  .oc-toolbar .export,
  .oc-search-box .export{
    margin-left:auto;
    align-self:flex-start;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    flex:0 0 auto;
    margin-top:0;
  }
  @media (max-width: 820px){
    .oc-toolbar{
      flex-wrap:wrap;
    }
    .oc-toolbar .export{
      width:100%;
      justify-content:flex-end;
    }
  }

  /* Form = grid so all fields + button line up nicely */
  .oc-search-form{
    display:grid;
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap:12px;
    align-items:end;
    margin:0;
  }
  @media (max-width: 980px){
    .oc-search-form{ grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  }
  @media (max-width: 520px){
    .oc-search-form{ grid-template-columns: 1fr; }
  }

  .oc-field{
    display:flex;
    flex-direction:column;
    gap:6px;
    min-width:160px;
  }
.oc-field label{
    font-weight: var(--oc-font-semibold);
    white-space:nowrap;
    font-size: var(--oc-text-sm);
    line-height:1.2;
  }
  .oc-field select{
    width:100%;
    max-width:100%;
  }

  .oc-search-actions{
    display:flex;
    align-items:end;
    justify-content:flex-start;
    min-width:60px;
  }
  .oc-btn-icon{
    border:1px solid rgba(0,0,0,.15);
    border-radius:var(--oc-radius-md);
    padding:10px;
    background:#fff;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:var(--oc-control-height);
    line-height:1;
  }
  .oc-btn-icon:hover{ background:rgba(0,0,0,.03); }
  .oc-btn-icon svg{ width:20px; height:20px; }

  .oc-is-hidden{ display:none !important; }

/* ============================================
   UTILITY & SPACING CLASSES
   ============================================ */

/* Margin utilities */
.mt-5 { margin-top: var(--oc-space-5); }
.mt-4 { margin-top: var(--oc-space-4); }
.mt-3 { margin-top: var(--oc-space-3); }
.mt-2 { margin-top: var(--oc-space-2); }
.mt-1 { margin-top: var(--oc-space-1); }

.mb-5 { margin-bottom: var(--oc-space-5); }
.mb-4 { margin-bottom: var(--oc-space-4); }
.mb-3 { margin-bottom: var(--oc-space-3); }
.mb-2 { margin-bottom: var(--oc-space-2); }
.mb-1 { margin-bottom: var(--oc-space-1); }

.ml-4 { margin-left: var(--oc-space-4); }
.ml-3 { margin-left: var(--oc-space-3); }
.ml-2 { margin-left: var(--oc-space-2); }
.mr-4 { margin-right: var(--oc-space-4); }
.mr-3 { margin-right: var(--oc-space-3); }
.mr-2 { margin-right: var(--oc-space-2); }

.my-5 { margin-top: var(--oc-space-5); margin-bottom: var(--oc-space-5); }
.my-4 { margin-top: var(--oc-space-4); margin-bottom: var(--oc-space-4); }
.my-3 { margin-top: var(--oc-space-3); margin-bottom: var(--oc-space-3); }
.my-2 { margin-top: var(--oc-space-2); margin-bottom: var(--oc-space-2); }
.my-1 { margin-top: var(--oc-space-1); margin-bottom: var(--oc-space-1); }

.mx-auto { margin-left: auto; margin-right: auto; }
.m-0 { margin: 0; }

/* Padding utilities */
.pt-5 { padding-top: var(--oc-space-5); }
.pt-4 { padding-top: var(--oc-space-4); }
.pt-3 { padding-top: var(--oc-space-3); }
.pt-2 { padding-top: var(--oc-space-2); }
.pt-1 { padding-top: var(--oc-space-1); }

.pb-5 { padding-bottom: var(--oc-space-5); }
.pb-4 { padding-bottom: var(--oc-space-4); }
.pb-3 { padding-bottom: var(--oc-space-3); }
.pb-2 { padding-bottom: var(--oc-space-2); }
.pb-1 { padding-bottom: var(--oc-space-1); }

.pl-3 { padding-left: var(--oc-space-3); }
.pl-2 { padding-left: var(--oc-space-2); }
.pr-3 { padding-right: var(--oc-space-3); }
.pr-2 { padding-right: var(--oc-space-2); }

.px-5 { padding-left: var(--oc-space-5); padding-right: var(--oc-space-5); }
.px-4 { padding-left: var(--oc-space-4); padding-right: var(--oc-space-4); }
.px-3 { padding-left: var(--oc-space-3); padding-right: var(--oc-space-3); }
.px-2 { padding-left: var(--oc-space-2); padding-right: var(--oc-space-2); }

.py-5 { padding-top: var(--oc-space-5); padding-bottom: var(--oc-space-5); }
.py-4 { padding-top: var(--oc-space-4); padding-bottom: var(--oc-space-4); }
.py-3 { padding-top: var(--oc-space-3); padding-bottom: var(--oc-space-3); }
.py-2 { padding-top: var(--oc-space-2); padding-bottom: var(--oc-space-2); }
.py-1 { padding-top: var(--oc-space-1); padding-bottom: var(--oc-space-1); }

.p-0 { padding: 0; }

/* ============================================
   TEXT UTILITIES
   ============================================ */

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.oc-text-black {
  color: var(--oc-gray-900);
}

.oc-link {
  color: var(--oc-secondary);
}

.oc-clickable {
  cursor: pointer;
}

/* Font weight utilities */
.font-light {
  font-weight: var(--oc-font-light);
}

.font-normal {
  font-weight: var(--oc-font-normal);
}

.font-medium {
  font-weight: var(--oc-font-medium);
}

.font-semibold {
  font-weight: var(--oc-font-semibold);
}

.font-bold {
  font-weight: var(--oc-font-bold);
}

/* Font size utilities */
.text-xs {
  font-size: var(--oc-text-xs);
}

.text-sm {
  font-size: var(--oc-text-sm);
}

.text-base {
  font-size: var(--oc-text-base);
}

.text-lg {
  font-size: var(--oc-text-lg);
}

.text-xl {
  font-size: var(--oc-text-xl);
}

.text-2xl {
  font-size: var(--oc-text-2xl);
}

.text-3xl {
  font-size: var(--oc-text-3xl);
}

/* Text decoration */
.underline {
  text-decoration: underline;
}

.no-underline {
  text-decoration: none;
}

/* Text color utilities */
.text-primary {
  color: var(--oc-primary);
}

.text-secondary {
  color: var(--oc-secondary);
}

.text-gray-700 {
  color: var(--oc-gray-700);
}

.text-gray-600 {
  color: var(--oc-gray-700);
}

.text-gray-500 {
  color: var(--oc-gray-500);
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

/* Display utilities */
.d-flex {
  display: flex;
  align-items: center;
}

.d-inline-flex {
  display: inline-flex;
  align-items: center;
}

.d-flex.justify-content-between {
  justify-content: space-between;
}

.d-flex.justify-content-center {
  justify-content: center;
}

.d-flex.justify-content-start {
  justify-content: flex-start;
}

.d-flex.justify-content-end {
  justify-content: flex-end;
}

.d-flex.flex-column {
  flex-direction: column;
}

.d-flex.gap-2 {
  gap: var(--oc-space-2);
}

.d-flex.gap-3 {
  gap: var(--oc-space-3);
}

.d-flex.gap-4 {
  gap: var(--oc-space-4);
}

.d-block {
  display: block;
}

.d-inline {
  display: inline;
}

.d-inline-block {
  display: inline-block;
}

.d-none {
  display: none;
}

.d-grid {
  display: grid;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-nowrap {
  flex-wrap: nowrap;
}

.flex-1 {
  flex: 1;
}

.flex-auto {
  flex: auto;
}

.flex-none {
  flex: none;
}

.items-start {
  align-items: flex-start;
}

.items-center {
  align-items: center;
}

.items-end {
  align-items: flex-end;
}

.items-stretch {
  align-items: stretch;
}

.justify-start {
  justify-content: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

.justify-evenly {
  justify-content: space-evenly;
}

.cursor-pointer {
  cursor: pointer;
}

.cursor-default {
  cursor: default;
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-auto {
  overflow: auto;
}

.overflow-x-auto {
  overflow-x: auto;
}

/* Width utilities */
.w-100 {
  width: 100%;
}

.w-75 {
  width: 75%;
}

.w-50 {
  width: 50%;
}

.w-25 {
  width: 25%;
}

.w-auto {
  width: auto;
}

.w-max {
  width: max-content;
}

/* Visibility */
.visible {
  visibility: visible;
}

.invisible {
  visibility: hidden;
}

.opacity-0 {
  opacity: 0;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-100 {
  opacity: 1;
}

/* ============================================
   ICON STYLES
   ============================================ */

.oc-icon {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-block;
  vertical-align: middle;
}

svg.oc-icon {
  stroke: currentColor;
  stroke-width: 2;
  transition: opacity var(--oc-transition-fast);
}

#anneeForm > svg.cursor-pointer,
.export svg.cursor-pointer {
  vertical-align: middle;
  margin-left: 4px;
}

/* ============================================
   CONTAINER & BLOCKS
   ============================================ */

.contenu {
  position: relative;
  z-index: 100;
}

.bloc_info {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  padding: 15px;
  background: var(--oc-white);
  border: var(--oc-border-width) solid var(--oc-border-color);
  border-radius: var(--oc-border-radius);
  transition: box-shadow var(--oc-transition-normal);
}

.bloc_info:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bloc_info > div {
  flex: 1;
  min-width: 0;
}

.bloc_info > div > p {
  color: var(--oc-primary);
  font-size: var(--oc-text-sm);
  font-weight: var(--oc-font-normal);
  margin: 8px 0;
  line-height: var(--oc-line-height-normal);
}

.bloc_gauche {
  text-align: left;
}

.bloc_droit {
  text-align: right;
}

.bloc_titre {
  text-align: left;
  font-size: var(--oc-text-sm);
  font-weight: var(--oc-font-semibold);
  margin: 20px 0;
}

/* ============================================
   FORM STYLES
   ============================================ */

form {
  display: inline-block;
  width: 100%;
  margin: 10px 0;
}

input,
select,
textarea {
  font-family: var(--oc-font-family);
  font-size: var(--oc-text-sm);
  font-weight: var(--oc-font-normal);
}

select {
  padding: var(--oc-control-padding-y) var(--oc-control-padding-x);
  border: var(--oc-border-width) solid var(--oc-border-color);
  border-radius: var(--oc-border-radius);
  font-size: var(--oc-text-sm);
  font-weight: var(--oc-font-normal);
  min-width: 150px;
  vertical-align: middle;
  background-color: var(--oc-white);
  color: var(--oc-gray-900);
  cursor: pointer;
  transition: border-color var(--oc-transition-fast), box-shadow var(--oc-transition-fast);
  font-family: var(--oc-font-family);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 24px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23352e26' d='M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
}

select:hover {
  border-color: var(--oc-primary);
}

select:focus {
  outline: none;
  border-color: var(--oc-primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 95, 0.1);
}

select:disabled {
  background-color: var(--oc-gray-100);
  color: var(--oc-gray-500);
  cursor: not-allowed;
  opacity: 0.6;
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="number"],
textarea {
  padding: var(--oc-control-padding-y) var(--oc-control-padding-x);
  border: var(--oc-border-width) solid var(--oc-border-color);
  border-radius: var(--oc-border-radius);
  font-size: var(--oc-text-sm);
  font-family: var(--oc-font-family);
  transition: border-color var(--oc-transition-fast), box-shadow var(--oc-transition-fast);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="search"]:hover,
input[type="number"]:hover,
textarea:hover {
  border-color: var(--oc-primary);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--oc-primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 95, 0.1);
}

button,
input[type="button"],
input[type="submit"] {
  padding: var(--oc-button-padding-y) var(--oc-button-padding-x);
  border: none;
  border-radius: var(--oc-radius-md);
  background-color: var(--oc-button-bg);
  color: var(--oc-button-text);
  font-family: var(--oc-font-family);
  font-weight: var(--oc-font-semibold);
  font-size: var(--oc-button-font-size);
  cursor: pointer;
  transition: background-color var(--oc-transition-fast), 
              transform var(--oc-transition-fast),
              box-shadow var(--oc-transition-fast);
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  background-color: var(--oc-button-bg-hover);
  box-shadow: 0 2px 8px rgba(0, 102, 95, 0.2);
}

button:active,
input[type="button"]:active,
input[type="submit"]:active {
  transform: scale(0.98);
}

button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled {
  background-color: var(--oc-gray-500);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Form validation states */
input:required {
  box-shadow: none;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="search"]::placeholder,
input[type="number"]::placeholder,
textarea::placeholder {
  color: var(--oc-gray-500);
  opacity: 1;
}

.form-group {
  margin-bottom: var(--oc-space-4);
}

.form-group label {
  display: block;
  margin-bottom: var(--oc-space-2);
  font-weight: var(--oc-font-semibold);
  font-size: var(--oc-text-sm);
  color: var(--oc-gray-900);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
}

.form-error {
  color: #dc2626;
  font-size: var(--oc-text-xs);
  font-weight: var(--oc-font-normal);
  margin-top: var(--oc-space-1);
}

.form-success {
  color: #16a34a;
  font-size: var(--oc-text-xs);
  font-weight: var(--oc-font-normal);
  margin-top: var(--oc-space-1);
}


/* Page contact */
.contact #from_email { border:0 !important;}
.contact label { display:block; margin-top: 14px; font-weight: var(--oc-font-semibold); font-size: var(--oc-text-sm); }
.contact input,
.contact select,
.contact textarea { width:100%; padding:10px; margin-top:6px; box-sizing:border-box; }
.contact textarea { min-height: 160px; resize: vertical; }
.contact button { margin-top: 16px; }
.contact button,
.oc-submitbar .oc-btn,
.contact input[type="submit"] {
  background-color: var(--oc-button-bg) !important;
  color: var(--oc-button-text) !important;
  border: 1px solid var(--oc-button-bg) !important;
}
.contact button:hover,
.oc-submitbar .oc-btn:hover,
.contact input[type="submit"]:hover {
  background-color: var(--oc-button-bg-hover) !important;
  color: var(--oc-button-text) !important;
}
.alert { padding: 12px; border-radius: 8px; margin: 14px 0; }
.ok { background: #e7f8ee; border: 1px solid #a7e2be; }
.err { background: #fdecec; border: 1px solid #f4b3b3; }
/* Honeypot caché */
.hp { position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }


/* ============================================
   TABLE STYLES - UNIFIED & OPTIMIZED
   ============================================ */

.extranet_body,
#etatStockTab,
#echeancier,
#capitalSocialTab,
#tabBulletins,
#tabFacture,
table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin-top: 16px;
  font-size: var(--oc-text-xs);
  font-weight: var(--oc-font-normal);
  background-color: var(--oc-white);
}

/* All table cells */
table th,
table td,
.ligne_contenu > td,
.resultat > td,
.tirage > td,
.titre > td,
.titre > th {
  border: var(--oc-border-width) solid var(--oc-border-color);
  padding: 8px;
  text-align: left;
  vertical-align: top;
  line-height: var(--oc-line-height-tight);
  word-break: break-word;
}

/* Header cells - improved hierarchy */
  thead th,
  thead tr th,
  .titre > th,
  .titre > td {
  height: 44px;
  line-height: 44px;
  padding: 8px 16px;
  vertical-align: middle;
  font-family: var(--oc-font-family-display);
  font-weight: var(--oc-font-bold);
  font-size: var(--oc-text-lg);
  color: var(--oc-white);
  background: linear-gradient(180deg, var(--oc-primary), var(--oc-action-color-hover));
  border-bottom: var(--oc-border-width-thick) solid rgba(0,0,0,0.12);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.04);
  text-shadow: 0 1px 0 rgba(0,0,0,0.18);
  -webkit-font-smoothing: antialiased;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Row styling */
tbody > tr {
  page-break-inside: avoid;
  transition: background-color var(--oc-transition-fast);
}

.ligne_contenu > td {
  border-top: var(--oc-border-width) solid var(--oc-border-color);
  border-bottom: var(--oc-border-width) solid var(--oc-border-color);
}

.ligne_contenu:nth-child(odd) {
  background-color: var(--oc-gray-50);
}

.ligne_contenu:nth-child(even) {
  background-color: var(--oc-white);
}

.ligne_contenu:hover {
  background-color: var(--oc-gray-100);
}

/* Special row styling - results/totals */
.resultat > td,
.tirage > td {
  border-top: var(--oc-border-width-thick) solid var(--oc-gray-500);
  border-bottom: var(--oc-border-width-thick) solid var(--oc-gray-500);
  font-weight: var(--oc-font-bold);
  font-size: var(--oc-text-xs);
  background-color: var(--oc-gray-50);
}

.resultat > td:first-child,
.tirage > td:first-child {
  text-align: left;
  font-weight: var(--oc-font-bold);
}

/* Section headers */
.famille {
  text-align: center;
  font-weight: var(--oc-font-bold);
  font-size: var(--oc-text-sm);
  padding: 10px 8px;
  color: var(--oc-gray-900);
}

/* ============================================
   COLUMN ALIGNMENTS & TEXT STYLES
   ============================================ */

.right {
  text-align: right !important;
}

.libelle {
  font-weight: var(--oc-font-semibold);
  font-size: var(--oc-text-xs);
  color: var(--oc-gray-900);
}

.donnees {
  color: var(--oc-gray-900);
  font-variant-numeric: tabular-nums;
}

.entete {
  color: var(--oc-primary);
  font-size: var(--oc-text-xs);
  font-weight: var(--oc-font-semibold);
}

.libelle_adh {
  font-weight: var(--oc-font-medium);
  font-size: var(--oc-text-xs);
  width: 40%;
  background-color: var(--oc-gray-50);
}

.donnees_adh {
  width: 60%;
  color: var(--oc-gray-900);
}

.bandeau_coordonnees {
  margin: 15px 0;
}

/* ============================================
   EXPORT & CONTROLS - OPTIMIZED
   ============================================ */

#ignore,
.export-container {
  margin: 15px 0;
  padding: 15px;
  background: var(--oc-gray-50);
  border: var(--oc-border-width) solid var(--oc-border-color);
  border-radius: var(--oc-border-radius);
}

.export-container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.export,
.cmd {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.cmd {
  margin: 10px 0;
}

.export svg,
#anneeForm > svg.cursor-pointer,
.export svg.cursor-pointer {
  cursor: pointer;
  transition: opacity var(--oc-transition-fast), transform var(--oc-transition-fast);
  color: var(--oc-action-color);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
  margin-left: 4px;
}

svg[data-oc-action="submit-form"],
svg[data-oc-action="printjs"],
svg[data-oc-action="export-csv"],
svg[data-oc-action="export-csv-container"] {
  color: var(--oc-action-color);
}

.export svg:hover,
#anneeForm > svg.cursor-pointer:hover,
.export svg.cursor-pointer:hover {
  opacity: 0.8;
  transform: scale(1.1);
}

.export svg:active {
  transform: scale(0.95);
}

.export svg + svg {
  margin-left: 0;
}

/* ============================================
   SPECIAL STYLES
   ============================================ */

.text-center.py-5 {
  padding: 30px 0;
  text-align: center;
}

.pagebreak {
  display: block;
  width: 100%;
  height: 0;
  clear: both;
  page-break-after: always;
  break-after: page;
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  font-family: var(--oc-font-family);
}

/* ============================================
   HIDE/SHOW UTILITIES
   ============================================ */

.hide {
  display: none;
}

.show {
  display: inline-block;
}

/* ============================================
   ANIMATION & TRANSITION UTILITIES
   ============================================ */

.transition-all {
  transition: all var(--oc-transition-normal);
}

.transition-colors {
  transition: color var(--oc-transition-normal), background-color var(--oc-transition-normal), border-color var(--oc-transition-normal);
}

.transition-fast {
  transition-duration: var(--oc-transition-fast);
}

.transition-slow {
  transition-duration: var(--oc-transition-slow);
}

/* ============================================
   ACCESSIBILITY UTILITIES
   ============================================ */

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--oc-primary);
  color: var(--oc-white);
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

.focus-visible:focus,
a:focus,
button:focus {
  outline: 2px solid var(--oc-primary);
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  :root {
    --oc-border-color: #000;
  }

  a {
    text-decoration: underline;
  }
}

@media (prefers-contrast: less) {
  :root {
    --oc-border-color: #ddd;
  }
}

/* ============================================
   TEXT TRANSFORMATION UTILITIES
   ============================================ */

.uppercase {
  text-transform: uppercase;
}

.lowercase {
  text-transform: lowercase;
}

.capitalize {
  text-transform: capitalize;
}

.normal-case {
  text-transform: none;
}

.whitespace-nowrap {
  white-space: nowrap;
}

.whitespace-pre {
  white-space: pre;
}

.whitespace-normal {
  white-space: normal;
}

.break-words {
  word-break: break-word;
}

.break-all {
  word-break: break-all;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   LIST UTILITIES
   ============================================ */

ul, ol {
  padding-left: 1.5rem;
}

ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

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

.list-none {
  list-style: none;
  padding: 0;
}

/* ============================================
   MAX-WIDTH & CONTAINER UTILITIES
   ============================================ */

.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--oc-space-3);
  padding-right: var(--oc-space-3);
}

.max-w-sm {
  max-width: 24rem;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-lg {
  max-width: 32rem;
}

.max-w-xl {
  max-width: 36rem;
}

.max-w-full {
  max-width: 100%;
}

.max-w-none {
  max-width: none;
}

/* ============================================
   POSITIONING UTILITIES
   ============================================ */

.static {
  position: static;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.sticky {
  position: sticky;
}

.top-0 {
  top: 0;
}

.bottom-0 {
  bottom: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

.z-10 {
  z-index: 10;
}

.z-50 {
  z-index: 50;
}

.z-auto {
  z-index: auto;
}

/* ============================================
   BORDER & SHADOW UTILITIES
   ============================================ */

.border {
  border: var(--oc-border-width) solid var(--oc-border-color);
}

.border-top {
  border-top: var(--oc-border-width) solid var(--oc-border-color);
}

.border-bottom {
  border-bottom: var(--oc-border-width) solid var(--oc-border-color);
}

.border-left {
  border-left: var(--oc-border-width) solid var(--oc-border-color);
}

.border-right {
  border-right: var(--oc-border-width) solid var(--oc-border-color);
}

.rounded {
  border-radius: var(--oc-border-radius);
}

.shadow {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.shadow-sm {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.shadow-lg {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   BACKGROUND UTILITIES
   ============================================ */

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

.bg-gray-50 {
  background-color: var(--oc-gray-50);
}

.bg-gray-100 {
  background-color: var(--oc-gray-100);
}

.bg-gray-200 {
  background-color: var(--oc-gray-200);
}

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

/* ============================================
   BACKWARD COMPATIBILITY - INLINE STYLE CLASSES
   (These should be gradually replaced with utility classes)
   ============================================ */

/* Deprecated: Use .text-center instead */
.oc-inline-cdd8ca06 { text-align: center; }

/* Deprecated: Color styles - use color variable instead */
.oc-inline-42bfb508 { color: var(--oc-gray-900); }

/* Deprecated: Use .d-inline-block and width utilities */
.oc-inline-ca635840,
.oc-inline-6db55fe4,
.oc-inline-c2773ddd,
.oc-inline-2ac7bde7,
.oc-inline-7029fdda { display: inline-block; }

.oc-inline-ca635840 { width: 20%; }
.oc-inline-6db55fe4 { width: 10%; }
.oc-inline-c2773ddd { width: 48%; }
.oc-inline-2ac7bde7 { width: 96%; }
.oc-inline-7029fdda { width: 60%; }
.oc-inline-199b6f0e { width: 100%; }

/* Deprecated: Use .oc-icon instead */
.oc-inline-9176d9c2 { width: 1.5rem; height: 1.5rem; }

/* Deprecated: Use margin/padding utilities instead */
.oc-inline-16941974 { padding-right: 15px; }

/* Deprecated: Combine text alignment and color utilities */
.oc-inline-9f7aaa7e { text-align: center; color: var(--oc-gray-900); }

/* Deprecated: Already available as .oc-link */
.oc-inline-969e181c { color: var(--oc-secondary); }

/* Deprecated: Use word-break utilities */
.oc-inline-10832086 { word-break: break-all; }

/* Deprecated: Use .invisible or opacity utilities */
.oc-inline-e5626b03 { opacity: 0; }

/* Deprecated: Combine color and text-center utilities */
.oc-inline-821791b3 { color: var(--oc-primary); text-align: center; }

/* Deprecated: Combine font-weight and text-center utilities */
.oc-inline-ca534fa8 { font-weight: bold; text-align: center; }



/* ============================================
   ENGAGEMENTS WIDGET - LAYOUT FIXES (screen)
   Ensures the printable area and tables use full width
   ============================================ */

/* Wrapper to avoid theme/container max-width constraints */
.oc-engagements-widget,
.oc-engagements-widget #content,
.oc-engagements-widget #surface-tables {
  width: 100% !important;
  max-width: 100% !important;
}

/* Tables should always fill their container */
.oc-engagements-widget table,
.oc-engagements-widget table.extranet_body,
.oc-engagements-widget table.engagements-table {
  width: 100% !important;
}

/* If parent uses flex/inline-block, force block layout */
.oc-engagements-widget #content {
  display: block !important;
}
/* ============================================
   PRINT (clean + readable + stable)
   Place this AT THE VERY END of oc-widgets.css
   ============================================ */

@media print {

  /* Page setup */
  @page {
    size: A4;
    margin: 10mm;
  }

  html, body {
    background: #fff !important;
  }

  body {
    margin: 0 !important;
    padding: 0 !important;
    color: #000 !important;
    font-family: var(--oc-font-family) !important;
    font-size: 10pt !important;
    line-height: 1.35 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide controls / non printable UI */
  #ignore,
  .export-container,
  .export,
  .cmd,
  svg[data-oc-action],
  svg[data-oc-printable],
  svg[data-oc-table],
  svg[data-oc-container],
  .no-print {
    display: none !important;
  }

  /* Avoid layout constraints from theme */
  * {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    max-width: none !important;
  }

  #surface-tables,
  #content,
  .contenu,
  .content,
  main, section, article, aside, form, div {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  /* Header block (cartouche) */
  .bloc_info {
    display: flex !important;
    gap: 10mm !important;
    padding: 6mm !important;
    margin: 0 0 6mm 0 !important;
    border: 1px solid #000 !important;
    border-left: 4mm solid #000 !important;
    border-radius: 0 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .bloc_info > div > p {
    color: #000 !important;
    font-size: 9pt !important;
    margin: 0 0 2mm 0 !important;
  }

  /* Title */
  h1, h2, h3, h4, h5 {
    color: #000 !important;
    margin: 0 0 4mm 0 !important;
  }

  h3.famille {
    font-size: 12pt !important;
    text-align: center !important;
  }

  /* Page breaks helper */
  .pagebreak {
    display: block !important;
    height: 0 !important;
    page-break-after: always !important;
    break-after: page !important;
  }

  /* Tables: readable + safe breaks */
  table,
  table.extranet_body {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    table-layout: fixed !important; /* prevents “exploding width” */
    margin: 0 0 6mm 0 !important;
  }

  thead { display: table-header-group !important; } /* repeat headers on each page */
  tfoot { display: table-footer-group !important; }

  tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  th, td {
    border: 1px solid #000 !important;
    padding: 2mm 2.5mm !important;
    vertical-align: top !important;
    font-size: 8.5pt !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  /* Important: keep headers readable even if background graphics are OFF */
  thead th,
  .titre > th,
  .titre > td {
    background: #eaeaea !important;
    color: #000 !important;   /* <-- prevents white-on-white */
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
  }

  /* Rows */
  .tirage > td {
    background: #f3f3f3 !important;
    font-weight: 700 !important;
  }

  .resultat > td {
    font-weight: 700 !important;
    border-top: 2px solid #000 !important;
  }

  /* Alignment */
  .donnees, .right {
    text-align: right !important;
    font-variant-numeric: tabular-nums !important;
  }

  /* Links */
  a, a:visited {
    color: #000 !important;
    text-decoration: none !important;
  }
}


/* ============================================
   COMMANDE WIDGET
   ============================================ */

/* ===== FULL WIDTH LAYOUT ===== */
.oc-order-wrap{
    width:100%;
    max-width:100%;
    margin:0;
    padding:40px 60px;
    background:#f4f6f9;
    box-sizing:border-box;
    font-family:inherit;
}

.oc-order-title{
    font-size:var(--oc-text-2xl);
    font-weight:var(--oc-font-semibold);
    margin-bottom:30px;
    text-align:left;
    color:var(--oc-gray-900);
}



/* Table */
.oc-order-table{
    width:100%;
    border-collapse:collapse;
    margin-bottom:30px;
}
.oc-order-table th{
    background: linear-gradient(180deg, var(--oc-primary), var(--oc-action-color-hover));
    color:var(--oc-white);
    padding:12px;
    font-size:var(--oc-text-xs);
    text-transform:uppercase;
}
.oc-order-table td{
    background:#fff;
    padding:10px;
    border-bottom:1px solid #e2e8f0;
}

.oc-order-table th:nth-child(1),
.oc-order-table td:nth-child(1){
    width:200px;
}

.oc-order-table th:nth-child(4),
.oc-order-table td:nth-child(4){
    width:100px;
}

.oc-order-table th:nth-child(5),
.oc-order-table td:nth-child(5){
    width:140px;
}

.oc-order-table th:nth-child(6),
.oc-order-table td:nth-child(6){
    width:160px;
}


.oc-order-table select,
.oc-order-table input{
    width:100%;
    padding:6px 8px;
    border:1px solid #cbd5e1;
    border-radius:var(--oc-radius-md);
    font-size:var(--oc-text-sm);
}
.oc-order-table input[readonly]{
    background:#f1f5f9;
}
.oc-row-del{
    background:#ef4444;
    font-size:20px !important;
    text-transform:uppercase !important;
    color:#000 !important;
    border:none;
    width:28px;
    height:28px;
    border-radius:6px;
    cursor:pointer;
    display:flex;
    align-items:center;      /* centre verticalement */
    justify-content:center;  /* centre horizontalement */
    padding:0;               /* important pour éviter le décalage */
}

/* Bottom */
.oc-bottom{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:30px;
}
.oc-options label{
    display:block;
    margin-bottom:10px;
    font-size:var(--oc-text-sm);
}
.oc-remarks{
    width:100%;
    min-height:90px;
    border-radius:var(--oc-radius-md);
    border:1px solid #cbd5e1;
    padding:10px;
    font-size:var(--oc-text-sm);
}

/* Totals */
.oc-totals{
    background:#0f172a;
    color:#fff;
    padding:20px;
    border-radius:12px;
}
.oc-totals .row{
    display:flex;
    justify-content:space-between;
    margin-bottom:10px;
}
.oc-totals .sep{
    height:1px;
    background:rgba(255,255,255,0.2);
    margin:12px 0;
}

/* Alerts */
.oc-alert{
    padding:15px;
    border-radius:8px;
    margin-bottom:20px;
}
.oc-alert.ok{
    background:#dcfce7;
    color:#166534;
}
.oc-alert.err{
    background:#fee2e2;
    color:#991b1b;
}

/* Submit */
.oc-submitbar{
    margin-top:30px;
    text-align:right;
}
.oc-btn{
    background:var(--oc-button-bg);
    color:var(--oc-button-text) !important;
    border:none;
    padding:var(--oc-button-padding-y) calc(var(--oc-button-padding-x) * 1.75);
    font-size:var(--oc-button-font-size);
    border-radius:var(--oc-radius-md);
    cursor:pointer;
    border:1px solid var(--oc-button-bg);
    font-family: var(--oc-font-family);
    font-weight: var(--oc-font-semibold);
}
.oc-btn:hover{
    background:var(--oc-button-bg-hover);
    color:var(--oc-button-text);
}

/* Honeypot */
.oc-hp{position:absolute;left:-9999px;top:-9999px;height:1px;width:1px;overflow:hidden;}
